wip: change the C function set_mem_size to asm
This commit is contained in:
@ -34,6 +34,7 @@ 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.
|
||||
@ -89,6 +90,10 @@ _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
|
||||
@ -113,9 +118,6 @@ _start:
|
||||
# Set up the stack.
|
||||
mov $stack_top, %esp
|
||||
|
||||
push %eax
|
||||
push %ebx
|
||||
|
||||
# Enter the high-level kernel.
|
||||
call kernel_main
|
||||
|
||||
|
||||
Reference in New Issue
Block a user