summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/machdep.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index 2fe71a9..82fa97b 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -45,7 +45,7 @@
int ibrs_enable(void);
-static struct cpu_info g_bsp_ci = {0};
+struct cpu_info g_bsp_ci = {0};
static struct gdtr bsp_gdtr = {
.limit = sizeof(struct gdt_entry) * 256 - 1,
.offset = (uintptr_t)&g_gdt_data[0]
@@ -99,15 +99,16 @@ this_cpu(void)
}
void
-cpu_startup(void)
+cpu_startup(struct cpu_info *ci)
{
gdt_load(&bsp_gdtr);
idt_load();
setup_vectors();
- amd64_write_gs_base((uintptr_t)&g_bsp_ci);
- init_tss(&g_bsp_ci);
+ amd64_write_gs_base((uintptr_t)ci);
+ init_tss(ci);
try_mitigate_spectre();
+ __ASMV("sti"); /* Unmask interrupts */
lapic_init();
}