1
0
mirror of https://github.com/taigrr/gopher-os synced 2026-03-23 09:22:23 -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:
Achilleas Anagnostopoulos
2017-07-12 23:40:56 +01:00
parent a2d58f8949
commit cc4364f55c
3 changed files with 7 additions and 4 deletions

View File

@@ -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