diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2024-03-19 13:03:52 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2024-03-19 13:03:52 -0400 |
commit | f004c1ade8d617a82cea2fe249434cccb47a2358 (patch) | |
tree | 34571e76039cf2ee2fee93c3f1bdb1bc6d2de5f6 /arch/x86_64/paging.h | |
parent | dd5d9e1d48396cbc226ff14fe557a55613c91fcb (diff) | |
download | jove-kernel-f004c1ade8d617a82cea2fe249434cccb47a2358.tar.gz jove-kernel-f004c1ade8d617a82cea2fe249434cccb47a2358.tar.bz2 jove-kernel-f004c1ade8d617a82cea2fe249434cccb47a2358.zip |
rename abi to sys. better memory allocation
Diffstat (limited to 'arch/x86_64/paging.h')
-rw-r--r-- | arch/x86_64/paging.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/arch/x86_64/paging.h b/arch/x86_64/paging.h index 1e88a0b..28dfad2 100644 --- a/arch/x86_64/paging.h +++ b/arch/x86_64/paging.h @@ -2,9 +2,8 @@ #define JOVE_ARCH_x86_64_PAGING_H 1 #include <stdint.h> -#include "mem/memory.h" -union PageEntry +typedef union PageMappingLevelEntry { struct { uint8_t p : 1; /* Present */ @@ -24,21 +23,6 @@ union PageEntry uint8_t xd : 1; }__attribute__((packed)); uint64_t value; -}__attribute__((packed)); - -struct PageDirectory -{ - union PageEntry *pml4_vaddr; - physptr_t pml4_paddr; - size_t references; -}; - -extern struct PageDirectory *mem_current_pd; - -void mem_pd_new(struct PageDirectory *pd); -void mem_pd_clone(struct PageDirectory *pd, struct PageDirectory *parent); - -void mem_pd_ensure_4k(struct PageDirectory *pd, uintptr_t virt, uint8_t flg); -void mem_pd_ensure_range(struct PageDirectory *pd, uintptr_t from, uintptr_t to, uint8_t flg); +} __attribute__((packed)) pmle_t; #endif |