aboutsummaryrefslogtreecommitdiff
path: root/src/boot/boot.S
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-04-28 10:46:36 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-04-28 10:46:36 +0200
commit152f14654bfb438d074833e3c8d5392d300f5095 (patch)
tree633e4dad7153a1d01f7f24b8fd0386c6fe7848ca /src/boot/boot.S
parentf13b26eeb4f9afba3a1aed2516655b34139979aa (diff)
Debug trampoline and paging
Diffstat (limited to 'src/boot/boot.S')
-rw-r--r--src/boot/boot.S12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/boot/boot.S b/src/boot/boot.S
index 73ee637..d8795d0 100644
--- a/src/boot/boot.S
+++ b/src/boot/boot.S
@@ -1,8 +1,6 @@
.globl _start
-.globl MB_INFO
.extern _bss_start
.extern _bss_end
-.extern higherhalf
.section .multiboot
@@ -35,7 +33,7 @@ mb_header_start:
# ----------- End tag
# ----------- Ask framebuffer tag
.align 8
-.short 6
+.short 5
.short 1
.int 20
.int 0
@@ -55,6 +53,7 @@ MB_INFO: # Will contains the Multiboot2 information data structure address
_start:
mov %ebx, (MB_INFO)
+
# ----- Setup PAE Paging (identity on the first 10MB)
mov $8192, %ecx # 8*4096/4 (8 tables of 4096 byte each divide by 4 because of movl)
mov $0, %eax
@@ -122,8 +121,12 @@ mov %ax, %gs
mov %ax, %ss
mov $__stack_pma, %esp
-# Setup
+# Setup
+movq (MB_INFO), %rdi
+mov $0xFFFFFFFF,%rax
+and %rax, %rdi
call trampoline
+movq %rax, (MB_INFO)
mov $__kernel_vma, %rsp
# Zeroing the .bss section
@@ -138,6 +141,7 @@ start_zeroing:
end_zeroing:
# Launch kernel
+movq (MB_INFO), %rdi
call boucane
# GDT