2005-01-05 20:17:21 +00:00
|
|
|
/*-
|
1997-04-26 11:46:25 +00:00
|
|
|
* ----------------------------------------------------------------------------
|
|
|
|
* "THE BEER-WARE LICENSE" (Revision 42):
|
|
|
|
* <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
|
|
|
|
* can do whatever you want with this stuff. If we meet some day, and you think
|
|
|
|
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
|
|
|
* ----------------------------------------------------------------------------
|
|
|
|
*
|
1999-08-28 01:08:13 +00:00
|
|
|
* $FreeBSD$
|
1997-04-26 11:46:25 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MACHINE_SMP_H_
|
|
|
|
#define _MACHINE_SMP_H_
|
|
|
|
|
2003-11-17 08:58:16 +00:00
|
|
|
#ifdef _KERNEL
|
|
|
|
|
|
|
|
#ifdef SMP
|
|
|
|
|
|
|
|
#ifndef LOCORE
|
|
|
|
|
|
|
|
#include <sys/bus.h>
|
|
|
|
#include <machine/frame.h>
|
|
|
|
#include <machine/intr_machdep.h>
|
|
|
|
#include <machine/apicvar.h>
|
|
|
|
|
|
|
|
/* global symbols in mpboot.S */
|
|
|
|
extern char mptramp_start[];
|
|
|
|
extern char mptramp_end[];
|
|
|
|
extern u_int32_t mptramp_pagetables;
|
|
|
|
|
|
|
|
/* global data in mp_machdep.c */
|
|
|
|
extern int mp_naps;
|
|
|
|
extern int boot_cpu_id;
|
|
|
|
extern struct pcb stoppcbs[];
|
|
|
|
extern struct mtx smp_tlb_mtx;
|
|
|
|
|
|
|
|
/* IPI handlers */
|
|
|
|
inthand_t
|
|
|
|
IDTVEC(invltlb), /* TLB shootdowns - global */
|
|
|
|
IDTVEC(invlpg), /* TLB shootdowns - 1 page */
|
|
|
|
IDTVEC(invlrng), /* TLB shootdowns - page range */
|
2005-01-21 06:01:20 +00:00
|
|
|
IDTVEC(ipi_intr_bitmap_handler), /* Bitmap based IPIs */
|
2003-11-17 08:58:16 +00:00
|
|
|
IDTVEC(cpustop), /* CPU stops & waits to be restarted */
|
2004-05-16 22:11:50 +00:00
|
|
|
IDTVEC(rendezvous); /* handle CPU rendezvous */
|
2003-11-17 08:58:16 +00:00
|
|
|
|
|
|
|
/* functions in mp_machdep.c */
|
|
|
|
void cpu_add(u_int apic_id, char boot_cpu);
|
|
|
|
void init_secondary(void);
|
|
|
|
void ipi_selected(u_int cpus, u_int ipi);
|
|
|
|
void ipi_all(u_int ipi);
|
|
|
|
void ipi_all_but_self(u_int ipi);
|
|
|
|
void ipi_self(u_int ipi);
|
2005-01-21 06:01:20 +00:00
|
|
|
void ipi_bitmap_handler(struct clockframe frame);
|
2003-11-17 08:58:16 +00:00
|
|
|
u_int mp_bootaddress(u_int);
|
|
|
|
int mp_grab_cpu_hlt(void);
|
2004-01-28 23:51:16 +00:00
|
|
|
void mp_topology(void);
|
2003-11-17 08:58:16 +00:00
|
|
|
void smp_invlpg(vm_offset_t addr);
|
|
|
|
void smp_masked_invlpg(u_int mask, vm_offset_t addr);
|
|
|
|
void smp_invlpg_range(vm_offset_t startva, vm_offset_t endva);
|
|
|
|
void smp_masked_invlpg_range(u_int mask, vm_offset_t startva,
|
|
|
|
vm_offset_t endva);
|
|
|
|
void smp_invltlb(void);
|
|
|
|
void smp_masked_invltlb(u_int mask);
|
|
|
|
|
2005-04-30 20:01:00 +00:00
|
|
|
#ifdef KDB_STOP_NMI
|
|
|
|
int ipi_nmi_handler(void);
|
|
|
|
void ipi_nmi_selected(u_int32_t cpus);
|
|
|
|
#endif
|
|
|
|
|
2003-11-17 08:58:16 +00:00
|
|
|
#endif /* !LOCORE */
|
|
|
|
#endif /* SMP */
|
|
|
|
|
|
|
|
#endif /* _KERNEL */
|
1997-04-26 11:46:25 +00:00
|
|
|
#endif /* _MACHINE_SMP_H_ */
|