[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.
This commit is contained in:
Justin C. Miller
2022-03-13 17:36:33 -07:00
parent 54aef00913
commit 95252e793c

View File

@@ -85,7 +85,7 @@ bsp_early_init()
cpu->idt = new (&g_bsp_idt) IDT; cpu->idt = new (&g_bsp_idt) IDT;
cpu->tss = new (&g_bsp_tss) TSS; cpu->tss = new (&g_bsp_tss) TSS;
cpu->gdt = new (&g_bsp_gdt) GDT {cpu->tss}; cpu->gdt = new (&g_bsp_gdt) GDT {cpu->tss};
cpu->rsp0 = idle_stack_end; cpu->rsp0 = reinterpret_cast<uintptr_t>(&idle_stack_end);
cpu_early_init(cpu); cpu_early_init(cpu);
return cpu; return cpu;