Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/machdep.c
Show First 20 Lines • Show All 1,441 Lines • ▼ Show 20 Lines | |||||
#ifdef XENHVM | #ifdef XENHVM | ||||
setidt(IDT_EVTCHN, pti ? &IDTVEC(xen_intr_upcall_pti) : | setidt(IDT_EVTCHN, pti ? &IDTVEC(xen_intr_upcall_pti) : | ||||
&IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_KPL, 0); | &IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_KPL, 0); | ||||
#endif | #endif | ||||
r_idt.rd_limit = sizeof(idt0) - 1; | r_idt.rd_limit = sizeof(idt0) - 1; | ||||
r_idt.rd_base = (long) idt; | r_idt.rd_base = (long) idt; | ||||
lidt(&r_idt); | lidt(&r_idt); | ||||
finishidentcpu(); /* Final stage of CPU initialization */ | |||||
/* | /* | ||||
* Initialize the clock before the console so that console | * Initialize the clock before the console so that console | ||||
* initialization can use DELAY(). | * initialization can use DELAY(). | ||||
*/ | */ | ||||
clock_init(); | clock_init(); | ||||
markj: A more conservative approach is to move the clock_init() call instead, but ok. | |||||
/* | /* | ||||
* Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) | * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) | ||||
* transition). | * transition). | ||||
* Once bootblocks have updated, we can test directly for | * Once bootblocks have updated, we can test directly for | ||||
* efi_systbl != NULL here... | * efi_systbl != NULL here... | ||||
*/ | */ | ||||
if (efi_boot) | if (efi_boot) | ||||
Show All 11 Lines | #endif | ||||
TUNABLE_INT_FETCH("hw.mds_disable", &hw_mds_disable); | TUNABLE_INT_FETCH("hw.mds_disable", &hw_mds_disable); | ||||
TUNABLE_INT_FETCH("machdep.mitigations.mds.disable", &hw_mds_disable); | TUNABLE_INT_FETCH("machdep.mitigations.mds.disable", &hw_mds_disable); | ||||
TUNABLE_INT_FETCH("machdep.mitigations.taa.enable", &x86_taa_enable); | TUNABLE_INT_FETCH("machdep.mitigations.taa.enable", &x86_taa_enable); | ||||
TUNABLE_INT_FETCH("machdep.mitigations.rndgs.enable", | TUNABLE_INT_FETCH("machdep.mitigations.rndgs.enable", | ||||
&x86_rngds_mitg_enable); | &x86_rngds_mitg_enable); | ||||
finishidentcpu(); /* Final stage of CPU initialization */ | |||||
initializecpu(); /* Initialize CPU registers */ | initializecpu(); /* Initialize CPU registers */ | ||||
amd64_bsp_ist_init(pc); | amd64_bsp_ist_init(pc); | ||||
/* Set the IO permission bitmap (empty due to tss seg limit) */ | /* Set the IO permission bitmap (empty due to tss seg limit) */ | ||||
pc->pc_common_tss.tss_iobase = sizeof(struct amd64tss) + | pc->pc_common_tss.tss_iobase = sizeof(struct amd64tss) + | ||||
IOPERM_BITMAP_SIZE; | IOPERM_BITMAP_SIZE; | ||||
▲ Show 20 Lines • Show All 402 Lines • Show Last 20 Lines |
A more conservative approach is to move the clock_init() call instead, but ok.