diff options
author | Benji Dial <benji@benjidial.net> | 2024-01-08 22:28:41 -0500 |
---|---|---|
committer | Benji Dial <benji@benjidial.net> | 2024-01-08 22:28:41 -0500 |
commit | c2f48fb5df0981df1df23de2b277274f9fe75080 (patch) | |
tree | 5202557438bbe3bdc7d10c7769731ab3594185f9 /kernel/paging.asm | |
download | hilbert-os-c2f48fb5df0981df1df23de2b277274f9fe75080.tar.gz |
first commit
Diffstat (limited to 'kernel/paging.asm')
-rw-r--r-- | kernel/paging.asm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/paging.asm b/kernel/paging.asm new file mode 100644 index 0000000..f1047a9 --- /dev/null +++ b/kernel/paging.asm @@ -0,0 +1,16 @@ +bits 64 + +;see also ../documentation/memory.txt + +global switch_to_kernel_p4 + +;from paging.cpp: +extern __kernel_p4_paddr + +section .text + +switch_to_kernel_p4: + mov rax, qword [__kernel_p4_paddr] + mov cr3, rax + mov rsp, 0xfffffffffffff000 + jmp rdi |