diff options
author | ngie <ngie@FreeBSD.org> | 2015-12-09 05:35:46 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-12-09 05:35:46 +0000 |
commit | dcd31244e8ecc492a511e48ed4c631615e092491 (patch) | |
tree | 9651a748c83288640926c2d597a2e1b13816acc4 /sys/amd64/include/smp.h | |
parent | 51e48e07fddf9730600dec32c469c760f731bed5 (diff) | |
parent | 81405113199dc2ec33e9cd60464efa5f2423a65c (diff) | |
download | FreeBSD-src-dcd31244e8ecc492a511e48ed4c631615e092491.zip FreeBSD-src-dcd31244e8ecc492a511e48ed4c631615e092491.tar.gz |
MFhead @ r292005
Diffstat (limited to 'sys/amd64/include/smp.h')
-rw-r--r-- | sys/amd64/include/smp.h | 89 |
1 files changed, 4 insertions, 85 deletions
diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h index 9c93e5c..212d1ee 100644 --- a/sys/amd64/include/smp.h +++ b/sys/amd64/include/smp.h @@ -19,106 +19,25 @@ #ifndef LOCORE -#include <sys/bus.h> -#include <machine/frame.h> -#include <machine/intr_machdep.h> -#include <x86/apicvar.h> -#include <machine/pcb.h> +#include <x86/x86_smp.h> -struct pmap; +extern int pmap_pcid_enabled; +extern int invpcid_works; /* 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 int cpu_apic_ids[]; -extern void *dpcpu; -extern char *bootSTK; -extern int bootAP; -extern void *bootstacks[]; -extern volatile u_int cpu_ipi_pending[]; -extern volatile int aps_ready; -extern struct mtx ap_boot_mtx; -extern int cpu_logical; -extern int cpu_cores; -extern int pmap_pcid_enabled; -extern int invpcid_works; -extern u_int xhits_gbl[]; -extern u_int xhits_pg[]; -extern u_int xhits_rng[]; -extern u_int ipi_global; -extern u_int ipi_page; -extern u_int ipi_range; -extern u_int ipi_range_size; -extern struct pmap *smp_tlb_pmap; - -extern volatile int smp_tlb_wait; - -struct cpu_info { - int cpu_present:1; - int cpu_bsp:1; - int cpu_disabled:1; - int cpu_hyperthread:1; -}; -extern struct cpu_info cpu_info[]; - -#ifdef COUNT_IPIS -extern u_long *ipi_invltlb_counts[MAXCPU]; -extern u_long *ipi_invlrng_counts[MAXCPU]; -extern u_long *ipi_invlpg_counts[MAXCPU]; -extern u_long *ipi_invlcache_counts[MAXCPU]; -extern u_long *ipi_rendezvous_counts[MAXCPU]; -#endif - /* IPI handlers */ inthand_t - IDTVEC(invltlb), /* TLB shootdowns - global */ IDTVEC(invltlb_pcid), /* TLB shootdowns - global, pcid */ IDTVEC(invltlb_invpcid),/* TLB shootdowns - global, invpcid */ - IDTVEC(invlpg), /* TLB shootdowns - 1 page */ - IDTVEC(invlrng), /* TLB shootdowns - page range */ - IDTVEC(invlcache), /* Write back and invalidate cache */ - IDTVEC(ipi_intr_bitmap_handler), /* Bitmap based IPIs */ - IDTVEC(cpustop), /* CPU stops & waits to be restarted */ - IDTVEC(cpususpend), /* CPU suspends & waits to be resumed */ - IDTVEC(justreturn), /* interrupt CPU with minimum overhead */ - IDTVEC(rendezvous); /* handle CPU rendezvous */ + IDTVEC(justreturn); /* interrupt CPU with minimum overhead */ -/* functions in mp_machdep.c */ -void assign_cpu_ids(void); -void cpu_add(u_int apic_id, char boot_cpu); -void cpustop_handler(void); -void cpususpend_handler(void); -void init_secondary_tail(void); -void invltlb_handler(void); void invltlb_pcid_handler(void); void invltlb_invpcid_handler(void); -void invlpg_handler(void); -void invlrng_handler(void); -void invlcache_handler(void); -void init_secondary(void); -void ipi_startup(int apic_id, int vector); -void ipi_all_but_self(u_int ipi); -void ipi_bitmap_handler(struct trapframe frame); -void ipi_cpu(int cpu, u_int ipi); -int ipi_nmi_handler(void); -void ipi_selected(cpuset_t cpus, u_int ipi); -u_int mp_bootaddress(u_int); -void set_interrupt_apic_ids(void); -void smp_cache_flush(void); -void smp_masked_invlpg(cpuset_t mask, vm_offset_t addr); -void smp_masked_invlpg_range(cpuset_t mask, vm_offset_t startva, - vm_offset_t endva); -void smp_masked_invltlb(cpuset_t mask, struct pmap *pmap); int native_start_all_aps(void); -void mem_range_AP_init(void); -void topo_probe(void); -void ipi_send_cpu(int cpu, u_int ipi); #endif /* !LOCORE */ #endif /* SMP */ |