diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-13 15:31:45 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-13 15:31:45 +0200 |
| commit | 5a9a57177f730d1c00ab2b47f91e5ea2660a4f77 (patch) | |
| tree | 8d98016687cba592133ca8c57934f60e06f94bbf /src/boot | |
| parent | 457a2117706cdaee34f894e67c89da7bf29f6143 (diff) | |
Enable .bss zeroing and improve paging
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/boot.S | 13 |
1 files changed, 13 insertions, 0 deletions
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 |
