Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/include/pcpu.h
Show All 36 Lines | |||||
#include <machine/segments.h> | #include <machine/segments.h> | ||||
#include <machine/tss.h> | #include <machine/tss.h> | ||||
#include <sys/_lock.h> | #include <sys/_lock.h> | ||||
#include <sys/_mutex.h> | #include <sys/_mutex.h> | ||||
/* | /* | ||||
* The SMP parts are setup in pmap.c and locore.s for the BSP, and | * The SMP parts are setup in pmap.c and machdep.c for the BSP, and | ||||
* mp_machdep.c sets up the data for the AP's to "see" when they awake. | * pmap.c and mp_machdep.c sets up the data for the AP's to "see" when | ||||
* The reason for doing it via a struct is so that an array of pointers | * they awake. The reason for doing it via a struct is so that an | ||||
* to each CPU's data can be set up for things like "check curproc on all | * array of pointers to each CPU's data can be set up for things like | ||||
* other processors" | * "check curproc on all other processors" | ||||
*/ | */ | ||||
#define PCPU_MD_FIELDS \ | #define PCPU_MD_FIELDS \ | ||||
char pc_monitorbuf[128] __aligned(128); /* cache line */ \ | char pc_monitorbuf[128] __aligned(128); /* cache line */ \ | ||||
struct pcpu *pc_prvspace; /* Self-reference */ \ | struct pcpu *pc_prvspace; /* Self-reference */ \ | ||||
struct pmap *pc_curpmap; \ | struct pmap *pc_curpmap; \ | ||||
struct i386tss pc_common_tss; \ | |||||
struct segment_descriptor pc_common_tssd; \ | struct segment_descriptor pc_common_tssd; \ | ||||
struct segment_descriptor *pc_tss_gdt; \ | struct segment_descriptor *pc_tss_gdt; \ | ||||
struct segment_descriptor *pc_fsgs_gdt; \ | struct segment_descriptor *pc_fsgs_gdt; \ | ||||
struct i386tss *pc_common_tssp; \ | |||||
u_int pc_kesp0; \ | |||||
u_int pc_trampstk; \ | |||||
int pc_currentldt; \ | int pc_currentldt; \ | ||||
u_int pc_acpi_id; /* ACPI CPU id */ \ | u_int pc_acpi_id; /* ACPI CPU id */ \ | ||||
u_int pc_apic_id; \ | u_int pc_apic_id; \ | ||||
int pc_private_tss; /* Flag indicating private tss*/\ | int pc_private_tss; /* Flag indicating private tss*/\ | ||||
u_int pc_cmci_mask; /* MCx banks for CMCI */ \ | u_int pc_cmci_mask; /* MCx banks for CMCI */ \ | ||||
u_int pc_vcpu_id; /* Xen vCPU ID */ \ | u_int pc_vcpu_id; /* Xen vCPU ID */ \ | ||||
struct mtx pc_cmap_lock; \ | struct mtx pc_cmap_lock; \ | ||||
void *pc_cmap_pte1; \ | void *pc_cmap_pte1; \ | ||||
void *pc_cmap_pte2; \ | void *pc_cmap_pte2; \ | ||||
caddr_t pc_cmap_addr1; \ | caddr_t pc_cmap_addr1; \ | ||||
caddr_t pc_cmap_addr2; \ | caddr_t pc_cmap_addr2; \ | ||||
vm_offset_t pc_qmap_addr; /* KVA for temporary mappings */\ | vm_offset_t pc_qmap_addr; /* KVA for temporary mappings */\ | ||||
vm_offset_t pc_copyout_maddr; \ | |||||
vm_offset_t pc_copyout_saddr; \ | |||||
struct mtx pc_copyout_mlock; \ | |||||
struct sx pc_copyout_slock; \ | |||||
uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ | uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ | ||||
char __pad[445] | char __pad[550] | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) | #if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) | ||||
/* | /* | ||||
* Evaluates to the byte offset of the per-cpu variable name. | * Evaluates to the byte offset of the per-cpu variable name. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |