diff options
Diffstat (limited to 'arch/i386/include/kernel/paging.h')
-rw-r--r-- | arch/i386/include/kernel/paging.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/i386/include/kernel/paging.h b/arch/i386/include/kernel/paging.h index 7f820e8..e949e32 100644 --- a/arch/i386/include/kernel/paging.h +++ b/arch/i386/include/kernel/paging.h @@ -23,9 +23,10 @@ #define ERR_RESERVED 0x8 #define ERR_INST 0x10 -#define PAGE_SIZE 4096 +#define PGROUNDUP(size) (((size)+PAGE_SIZE-1) & ~(PAGE_SIZE-1)) +#define PGROUNDDN(size) (((size)) & ~(PAGE_SIZE-1)) -uint32_t* init_page_table(uint32_t flags); +int init_page_directory(uintptr_t *pd, int user); void enable_paging(uintptr_t pd_addr); void paging_init(void); |