Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/include/pcpu.h
Show All 29 Lines | |||||
#ifndef _MACHINE_PCPU_H_ | #ifndef _MACHINE_PCPU_H_ | ||||
#define _MACHINE_PCPU_H_ | #define _MACHINE_PCPU_H_ | ||||
#ifndef _SYS_CDEFS_H_ | #ifndef _SYS_CDEFS_H_ | ||||
#error "sys/cdefs.h is a prerequisite for this file" | #error "sys/cdefs.h is a prerequisite for this file" | ||||
#endif | #endif | ||||
#define PC_PTI_STACK_SZ 16 | |||||
/* | /* | ||||
* The SMP parts are setup in pmap.c and locore.s for the BSP, and | * The SMP parts are setup in pmap.c and locore.s for the BSP, and | ||||
* mp_machdep.c sets up the data for the AP's to "see" when they awake. | * mp_machdep.c sets up the data for the AP's to "see" when they awake. | ||||
* The reason for doing it via a struct is so that an array of pointers | * The reason for doing it via a struct is so that an array of pointers | ||||
* to each CPU's data can be set up for things like "check curproc on all | * to each CPU's data can be set up for things like "check curproc on all | ||||
* other processors" | * 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 amd64tss *pc_tssp; /* TSS segment active on CPU */ \ | struct amd64tss *pc_tssp; /* TSS segment active on CPU */ \ | ||||
struct amd64tss *pc_commontssp;/* Common TSS for the CPU */ \ | struct amd64tss *pc_commontssp;/* Common TSS for the CPU */ \ | ||||
uint64_t pc_kcr3; \ | |||||
uint64_t pc_ucr3; \ | |||||
register_t pc_rsp0; \ | register_t pc_rsp0; \ | ||||
register_t pc_scratch_rsp; /* User %rsp in syscall */ \ | register_t pc_scratch_rsp; /* User %rsp in syscall */ \ | ||||
register_t pc_scratch_rax; \ | |||||
u_int pc_apic_id; \ | u_int pc_apic_id; \ | ||||
u_int pc_acpi_id; /* ACPI CPU id */ \ | u_int pc_acpi_id; /* ACPI CPU id */ \ | ||||
/* Pointer to the CPU %fs descriptor */ \ | /* Pointer to the CPU %fs descriptor */ \ | ||||
struct user_segment_descriptor *pc_fs32p; \ | struct user_segment_descriptor *pc_fs32p; \ | ||||
/* Pointer to the CPU %gs descriptor */ \ | /* Pointer to the CPU %gs descriptor */ \ | ||||
struct user_segment_descriptor *pc_gs32p; \ | struct user_segment_descriptor *pc_gs32p; \ | ||||
/* Pointer to the CPU LDT descriptor */ \ | /* Pointer to the CPU LDT descriptor */ \ | ||||
struct system_segment_descriptor *pc_ldt; \ | struct system_segment_descriptor *pc_ldt; \ | ||||
/* Pointer to the CPU TSS descriptor */ \ | /* Pointer to the CPU TSS descriptor */ \ | ||||
struct system_segment_descriptor *pc_tss; \ | struct system_segment_descriptor *pc_tss; \ | ||||
uint64_t pc_pm_save_cnt; \ | uint64_t pc_pm_save_cnt; \ | ||||
u_int pc_cmci_mask; /* MCx banks for CMCI */ \ | u_int pc_cmci_mask; /* MCx banks for CMCI */ \ | ||||
uint64_t pc_dbreg[16]; /* ddb debugging regs */ \ | uint64_t pc_dbreg[16]; /* ddb debugging regs */ \ | ||||
uint64_t pc_pti_stack[PC_PTI_STACK_SZ]; \ | |||||
int pc_dbreg_cmd; /* ddb debugging reg cmd */ \ | int pc_dbreg_cmd; /* ddb debugging reg cmd */ \ | ||||
u_int pc_vcpu_id; /* Xen vCPU ID */ \ | u_int pc_vcpu_id; /* Xen vCPU ID */ \ | ||||
uint32_t pc_pcid_next; \ | uint32_t pc_pcid_next; \ | ||||
uint32_t pc_pcid_gen; \ | uint32_t pc_pcid_gen; \ | ||||
uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ | uint32_t pc_smp_tlb_done; /* TLB op acknowledgement */ \ | ||||
char __pad[384] /* be divisor of PAGE_SIZE \ | char __pad[232] /* be divisor of PAGE_SIZE \ | ||||
after cache alignment */ | after cache alignment */ | ||||
#define PC_DBREG_CMD_NONE 0 | #define PC_DBREG_CMD_NONE 0 | ||||
#define PC_DBREG_CMD_LOAD 1 | #define PC_DBREG_CMD_LOAD 1 | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) | #if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) | ||||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |