wip: multiboot struct is now in the page directory/page table

This commit is contained in:
2024-11-12 17:13:36 +01:00
parent 719c615c92
commit 11ef629a3a
5 changed files with 54 additions and 42 deletions

View File

@ -34,7 +34,6 @@ boot_page_table1:
# The kernel entry point.
.section .multiboot.text, "a"
.global _start
.global end_mem
.type _start, @function
_start:
# Physical address of boot_page_table1.
@ -90,10 +89,6 @@ _start:
movl $(boot_page_directory - 0xC0000000), %ecx
movl %ecx, %cr3
jmp set_mem_size
end_mem:
# Enable paging and the write-protect bit.
movl %cr0, %ecx
orl $0x80000000, %ecx
@ -118,6 +113,9 @@ end_mem:
# Set up the stack.
mov $stack_top, %esp
push %eax
push %ebx
# Enter the high-level kernel.
call kernel_main