1 #ifndef __LUNAIX_MM_DEFS_H
2 #define __LUNAIX_MM_DEFS_H
9 #define KSTACK_SIZE (KSTACK_PAGES * PAGE_SIZE)
12 Regardless architecture we need to draw the line very carefully, and must
13 take the size of VM into account. In general, we aims to achieve
14 "sufficiently large" of memory for kernel
17 * #768~1022 PTEs of PD (0x00000000c0000000, ~1GiB)
19 In light of upcomming x86_64 support (for Level 4&5 Paging):
20 * #510 entry of PML4 (0x0000ff0000000000, ~512GiB)
21 * #510 entry of PML5 (0x01fe000000000000, ~256TiB)
23 // Where the kernel getting re-mapped.
24 #define KERNEL_RESIDENT 0x0
26 // Pages reserved for kernel image
29 #define kernel_addr(addr) (addr)
31 #define to_kphysical(k_va) ((ptr_t)(k_va))
32 #define to_kvirtual(k_pa) ((ptr_t)(k_pa))
34 #endif /* __LUNAIX_MM_DEFS_H */