diff options
-rw-r--r-- | sys/arch/amd64/machdep.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/amd64/machdep.c b/sys/arch/amd64/machdep.c index 9a81c25..66778a6 100644 --- a/sys/arch/amd64/machdep.c +++ b/sys/arch/amd64/machdep.c @@ -86,23 +86,24 @@ processor_init(void) struct cpu_info *cur_cpu = NULL; + cur_cpu = this_cpu(); + interrupts_init(); gdt_load(&g_gdtr); + CPU_INFO_LOCK(cur_cpu); + init_tss(cur_cpu); + CPU_INFO_UNLOCK(cur_cpu); + if (!__TEST(init_flags, INIT_FLAG_IOAPIC)) { init_flags |= INIT_FLAG_IOAPIC; ioapic_init(); } lapic_init(); /* Per core */ - cur_cpu = this_cpu(); - - CPU_INFO_LOCK(cur_cpu); - cur_cpu->tss = NULL; - init_tss(cur_cpu); - CPU_INFO_UNLOCK(cur_cpu); /* Use spectre mitigation if enabled */ if (try_spectre_mitigate != NULL) try_spectre_mitigate(); + } |