diff options
| author | Tianhao Wang <shrik3@mailbox.org> | 2024-06-03 21:31:24 +0200 |
|---|---|---|
| committer | Tianhao Wang <shrik3@mailbox.org> | 2024-06-11 15:17:11 +0200 |
| commit | f4b50dd826b81295dc9628b655fc5f360445230b (patch) | |
| tree | dd56d4da407b94cb293bd40d54b0646d61ee5834 /src/machine/mod.rs | |
| parent | ae9df3200fd9e7fcc952945d105e516f9ffcf314 (diff) | |
mm: provide high memory kernel mapping in asm code.
we use the first pml4 entry (+one pdp table) to map phy 0~512G
to virt 0~512G for init code. This doesn't change.
For the kernel to work in higher half memory, we also need to create
mapping for it. We take the 256th entry of pml4 entry (hence one
additional pdp table).
Entry 0~63 are mapped to to the physical memory
(with offset 0xffff_8000_0000_0000)
Entry 64~127 are not used
Entry 128~191 are mapped to the kernel image (text and code)
(with offset 0xffff_8020_0000_0000)
details in docs/mem_layout.txt
Diffstat (limited to 'src/machine/mod.rs')
0 files changed, 0 insertions, 0 deletions
