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/i386/include/smp.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
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/5.3/sys/i386/include/smp.h 140341 2005-01-16 08:29:13Z kensmith $
   10  *
   11  */
   12 
   13 #ifndef _MACHINE_SMP_H_
   14 #define _MACHINE_SMP_H_
   15 
   16 #ifdef _KERNEL
   17 
   18 #ifdef SMP
   19 
   20 #ifndef LOCORE
   21 
   22 /*
   23  * For sending values to POST displays.
   24  * XXX FIXME: where does this really belong, isa.h/isa.c perhaps?
   25  */
   26 extern int current_postcode;  /** XXX currently in mp_machdep.c */
   27 #define POSTCODE(X)     current_postcode = (X), \
   28                         outb(0x80, current_postcode)
   29 #define POSTCODE_LO(X)  current_postcode &= 0xf0, \
   30                         current_postcode |= ((X) & 0x0f), \
   31                         outb(0x80, current_postcode)
   32 #define POSTCODE_HI(X)  current_postcode &= 0x0f, \
   33                         current_postcode |= (((X) << 4) & 0xf0), \
   34                         outb(0x80, current_postcode)
   35 
   36 #include <sys/bus.h>
   37 #include <machine/frame.h>
   38 #include <machine/intr_machdep.h>
   39 #include <machine/apicvar.h>
   40 
   41 /* global data in mpboot.s */
   42 extern int                      bootMP_size;
   43 
   44 /* functions in mpboot.s */
   45 void    bootMP(void);
   46 
   47 /* global data in mp_machdep.c */
   48 extern int                      mp_naps;
   49 extern int                      boot_cpu_id;
   50 extern struct pcb               stoppcbs[];
   51 extern struct mtx               smp_tlb_mtx;
   52 
   53 /* IPI handlers */
   54 inthand_t
   55         IDTVEC(invltlb),        /* TLB shootdowns - global */
   56         IDTVEC(invlpg),         /* TLB shootdowns - 1 page */
   57         IDTVEC(invlrng),        /* TLB shootdowns - page range */
   58         IDTVEC(ipi_intr_bitmap_handler), /* Bitmap based IPIs */ 
   59         IDTVEC(cpustop),        /* CPU stops & waits to be restarted */
   60         IDTVEC(rendezvous),     /* handle CPU rendezvous */
   61         IDTVEC(lazypmap);       /* handle lazy pmap release */
   62 
   63 /* functions in mp_machdep.c */
   64 void    cpu_add(u_int apic_id, char boot_cpu);
   65 void    init_secondary(void);
   66 void    ipi_selected(u_int cpus, u_int ipi);
   67 void    ipi_all(u_int ipi);
   68 void    ipi_all_but_self(u_int ipi);
   69 void    ipi_self(u_int ipi);
   70 void    forward_statclock(void);
   71 void    forward_hardclock(void);
   72 void    ipi_bitmap_handler(struct clockframe frame);
   73 u_int   mp_bootaddress(u_int);
   74 int     mp_grab_cpu_hlt(void);
   75 void    mp_topology(void);
   76 void    smp_invlpg(vm_offset_t addr);
   77 void    smp_masked_invlpg(u_int mask, vm_offset_t addr);
   78 void    smp_invlpg_range(vm_offset_t startva, vm_offset_t endva);
   79 void    smp_masked_invlpg_range(u_int mask, vm_offset_t startva,
   80             vm_offset_t endva);
   81 void    smp_invltlb(void);
   82 void    smp_masked_invltlb(u_int mask);
   83 
   84 #endif /* !LOCORE */
   85 #endif /* SMP */
   86 
   87 #endif /* _KERNEL */
   88 #endif /* _MACHINE_SMP_H_ */

Cache object: 9ea0fc9e8ac53543cb5f48ed448b7480


[ 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.