fix start heap alignment

This commit is contained in:
2023-11-27 19:21:00 +01:00
parent a20514ef9d
commit ea41e2e8d3

View File

@@ -72,7 +72,8 @@ extern "C" void _start(void) {
}
uint64_t real_new_cr3 = (uint64_t) HHDM_V2P(KERN_AddressSpace_PML4);
uint64_t *new_stack_top = &KERN_stack[KERN_STACK_SIZE - 1];// Don't forget in which direction the stack grows...
uint64_t *new_stack_top = &KERN_stack[KERN_STACK_SIZE - 1]; // Don't forget in which direction the stack grows...
new_stack_top = reinterpret_cast<uint64_t *>(((uint64_t) new_stack_top) & (~0xFULL));// correct alignment for sse
barrier();
__asm__ volatile("movq %[new_stack_top], %%rsp; movq %[real_new_cr3], %%cr3; call real_start"