mirror of
https://github.com/taigrr/gopher-os
synced 2026-03-23 08:12:26 -07:00
Pass the virtual page offset for the kernel to kernel.Kmain
Ths page offset is defined in arch/XXX/constants.inc and needs to be passed to the kernel so we can correctly calculate the physical frame addresses that correspond to the ELF section virtual memory addresses.
This commit is contained in:
@@ -51,6 +51,8 @@ _rt0_64_entry:
|
||||
extern _kernel_end
|
||||
extern kernel.Kmain
|
||||
|
||||
mov rax, PAGE_OFFSET
|
||||
push rax
|
||||
mov rax, _kernel_end - PAGE_OFFSET
|
||||
push rax
|
||||
mov rax, _kernel_start - PAGE_OFFSET
|
||||
|
||||
Reference in New Issue
Block a user