The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/x86/include/x86_smp.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * ----------------------------------------------------------------------------
    3  * "THE BEER-WARE LICENSE" (Revision 42):
    4  * <phk@FreeBSD.org> wrote this file.  As long as you retain this notice you
    5  * can do whatever you want with this stuff. If we meet some day, and you think
    6  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
    7  * ----------------------------------------------------------------------------
    8  *
    9  * $FreeBSD: releng/11.2/sys/x86/include/x86_smp.h 329462 2018-02-17 18:00:01Z kib $
   10  *
   11  */
   12 
   13 #ifndef _X86_X86_SMP_H_
   14 #define _X86_X86_SMP_H_
   15 
   16 #include <sys/bus.h>
   17 #include <machine/frame.h>
   18 #include <machine/intr_machdep.h>
   19 #include <x86/apicvar.h>
   20 #include <machine/pcb.h>
   21 
   22 struct pmap;
   23 
   24 /* global data in mp_x86.c */
   25 extern int mp_naps;
   26 extern int boot_cpu_id;
   27 extern struct pcb stoppcbs[];
   28 extern int cpu_apic_ids[];
   29 extern int bootAP;
   30 extern void *dpcpu;
   31 extern char *bootSTK;
   32 extern void *bootstacks[];
   33 extern volatile u_int cpu_ipi_pending[];
   34 extern volatile int aps_ready;
   35 extern struct mtx ap_boot_mtx;
   36 extern int cpu_logical;
   37 extern int cpu_cores;
   38 extern volatile uint32_t smp_tlb_generation;
   39 extern struct pmap *smp_tlb_pmap;
   40 extern vm_offset_t smp_tlb_addr1, smp_tlb_addr2;
   41 extern u_int xhits_gbl[];
   42 extern u_int xhits_pg[];
   43 extern u_int xhits_rng[];
   44 extern u_int ipi_global;
   45 extern u_int ipi_page;
   46 extern u_int ipi_range;
   47 extern u_int ipi_range_size;
   48 
   49 extern int nmi_kdb_lock;
   50 extern int nmi_is_broadcast;
   51 
   52 struct cpu_info {
   53         int     cpu_present:1;
   54         int     cpu_bsp:1;
   55         int     cpu_disabled:1;
   56         int     cpu_hyperthread:1;
   57 };
   58 extern struct cpu_info cpu_info[];
   59 
   60 #ifdef COUNT_IPIS
   61 extern u_long *ipi_invltlb_counts[MAXCPU];
   62 extern u_long *ipi_invlrng_counts[MAXCPU];
   63 extern u_long *ipi_invlpg_counts[MAXCPU];
   64 extern u_long *ipi_invlcache_counts[MAXCPU];
   65 extern u_long *ipi_rendezvous_counts[MAXCPU];
   66 #endif
   67 
   68 /* IPI handlers */
   69 inthand_t
   70         IDTVEC(invltlb),        /* TLB shootdowns - global */
   71         IDTVEC(invlpg),         /* TLB shootdowns - 1 page */
   72         IDTVEC(invlrng),        /* TLB shootdowns - page range */
   73         IDTVEC(invlcache),      /* Write back and invalidate cache */
   74         IDTVEC(ipi_intr_bitmap_handler), /* Bitmap based IPIs */ 
   75         IDTVEC(cpustop),        /* CPU stops & waits to be restarted */
   76         IDTVEC(cpususpend),     /* CPU suspends & waits to be resumed */
   77         IDTVEC(rendezvous);     /* handle CPU rendezvous */
   78 
   79 /* functions in x86_mp.c */
   80 void    assign_cpu_ids(void);
   81 void    cpu_add(u_int apic_id, char boot_cpu);
   82 void    cpustop_handler(void);
   83 void    cpususpend_handler(void);
   84 void    init_secondary_tail(void);
   85 void    invltlb_handler(void);
   86 void    invlpg_handler(void);
   87 void    invlrng_handler(void);
   88 void    invlcache_handler(void);
   89 void    init_secondary(void);
   90 void    ipi_startup(int apic_id, int vector);
   91 void    ipi_all_but_self(u_int ipi);
   92 void    ipi_bitmap_handler(struct trapframe frame);
   93 void    ipi_cpu(int cpu, u_int ipi);
   94 int     ipi_nmi_handler(void);
   95 void    ipi_selected(cpuset_t cpus, u_int ipi);
   96 u_int   mp_bootaddress(u_int);
   97 void    set_interrupt_apic_ids(void);
   98 void    smp_cache_flush(void);
   99 void    smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, struct pmap *pmap);
  100 void    smp_masked_invlpg_range(cpuset_t mask, vm_offset_t startva,
  101             vm_offset_t endva, struct pmap *pmap);
  102 void    smp_masked_invltlb(cpuset_t mask, struct pmap *pmap);
  103 void    mem_range_AP_init(void);
  104 void    topo_probe(void);
  105 void    ipi_send_cpu(int cpu, u_int ipi);
  106 
  107 #endif

Cache object: cc6fda8520b1db5a3745cab4a10bd736


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.