From 95252e793cb5a380ae7a3f1802456a10d2506183 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Sun, 13 Mar 2022 17:36:33 -0700 Subject: [PATCH] [kernel] Fix incorrect BSP idle rsp0 In bsp_early_init(), the BSP cpu_data's rsp0 was getting initialized to the _value_ at the idle_stack_end symbol, instead of its address. I don't believe this was causing any actual harm, but it was a red herring when debugging. --- src/kernel/cpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/cpu.cpp b/src/kernel/cpu.cpp index d827175..1433f12 100644 --- a/src/kernel/cpu.cpp +++ b/src/kernel/cpu.cpp @@ -85,7 +85,7 @@ bsp_early_init() cpu->idt = new (&g_bsp_idt) IDT; cpu->tss = new (&g_bsp_tss) TSS; cpu->gdt = new (&g_bsp_gdt) GDT {cpu->tss}; - cpu->rsp0 = idle_stack_end; + cpu->rsp0 = reinterpret_cast(&idle_stack_end); cpu_early_init(cpu); return cpu;