From 9e092c80c0347c0da50eb4e2419e158395edb0dc Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 21 Jan 2023 22:16:01 +0200 Subject: [PATCH] Kernel: Cleanup boot.S --- kernel/arch/i386/boot.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/arch/i386/boot.S b/kernel/arch/i386/boot.S index efe1c65f8..f2baacd0e 100644 --- a/kernel/arch/i386/boot.S +++ b/kernel/arch/i386/boot.S @@ -32,7 +32,8 @@ # Reserve memory for paging structures, # we will identity map first 4 MiB - # 0 MiB -> 2 MiB: kernel + # 0 MiB -> 1 MiB: bootloader stuff + # 1 MiB -> 2 MiB: kernel # 2 MiB -> 3 MiB: kmalloc # 3 MiB -> 4 Mib: kmalloc_eternal .align 32 @@ -116,10 +117,13 @@ _start: # call global constuctors call _init - # call to the kernel itself + # call to the kernel itself (clear ebp for stacktrace) xorl %ebp, %ebp call kernel_main + # call global destructors + call _fini + system_halt: xchgw %bx, %bx cli