feat: Started om paging
This commit is contained in:
parent
2bbc7dd70f
commit
fc4de346a3
9 changed files with 275 additions and 9 deletions
|
@ -6,9 +6,12 @@
|
|||
|
||||
extern uint64_t hhdm_offset;
|
||||
extern struct limine_memmap_response *memmap;
|
||||
extern uint64_t kvirt;
|
||||
extern uint64_t kphys;
|
||||
extern uint64_t kstack_top;
|
||||
|
||||
#define HIGHER_HALF(ptr) ((void *)((uint64_t)ptr) + hhdm_offset)
|
||||
#define PHYSICAL(ptr) ((void *)((uint64_t)ptr) - hhdm_offset)
|
||||
#define HIGHER_HALF(ptr) ((void *)((uint64_t)(ptr) < hhdm_offset ? (uint64_t)(ptr) + hhdm_offset : (uint64_t)(ptr)))
|
||||
#define PHYSICAL(ptr) ((void *)((uint64_t)(ptr) >= hhdm_offset ? (uint64_t)(ptr) - hhdm_offset : (uint64_t)(ptr)))
|
||||
|
||||
#define BIT(x) (1ULL << (x))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue