Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/machdep.c
Show First 20 Lines • Show All 1,452 Lines • ▼ Show 20 Lines | #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); | ||||
/* | /* | ||||
* Initialize the clock before the console so that console | |||||
* initialization can use DELAY(). | |||||
*/ | |||||
clock_init(); | |||||
/* | |||||
* 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) | ||||
vty_set_preferred(VTY_VT); | vty_set_preferred(VTY_VT); | ||||
Show All 10 Lines | #endif | ||||
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 */ | finishidentcpu(); /* Final stage of CPU initialization */ | ||||
/* | |||||
* Initialize the clock before the console so that console | |||||
* initialization can use DELAY(). | |||||
*/ | |||||
clock_init(); | |||||
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 |