From 5a9a57177f730d1c00ab2b47f91e5ea2660a4f77 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 13 Apr 2021 15:31:45 +0200 Subject: Enable .bss zeroing and improve paging --- src/boot/boot.S | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/boot') diff --git a/src/boot/boot.S b/src/boot/boot.S index e436cbb..9777fbf 100644 --- a/src/boot/boot.S +++ b/src/boot/boot.S @@ -3,6 +3,8 @@ .extern bringelle .extern gdt_memcpy .extern mb_load_fb_tag +.extern _bss_start +.extern _bss_end .set STACK_LOCATION, 0x1FFFFF @@ -73,6 +75,17 @@ movl $STACK_LOCATION,%esp mov $0x38, %eax ltr %ax +# Zeroing the .bss section +mov $_bss_start, %eax +mov $_bss_end, %ebx +start_zeroing: + movb $0x0, (%eax) + cmp %eax, %ebx + je end_zeroing + inc %eax + jmp start_zeroing +end_zeroing: + # Start kernel main function call bringelle -- cgit v1.2.3