diff options
Diffstat (limited to 'src/kernel/paging.c')
-rw-r--r-- | src/kernel/paging.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kernel/paging.c b/src/kernel/paging.c index fbc33de..4672788 100644 --- a/src/kernel/paging.c +++ b/src/kernel/paging.c @@ -34,7 +34,7 @@ static void pd_map(void *pd, uint32_t physical_addr, uint32_t virtual_addr, bool } __attribute__ ((pure)) -static bool pd_is_mapped(void *pd, uint32_t vma) { +bool pd_is_mapped(const void *pd, uint32_t vma) { uint32_t pde = ((uint32_t *)pd)[vma >> 22]; return (pde & PE_PRESENT) && (((uint32_t *)(pde & PE_ADDR_MASK))[(vma >> 12) % 1024] & PE_PRESENT); } @@ -52,8 +52,7 @@ void free_task_pd(void *pd) { free_pages(pd, 1); } -__attribute__ ((aligned (4096))) -static uint32_t kmap[KERNEL_END / 4096]; +#define kmap ((uint32_t *)0x00060000) void *new_task_pd() { uint32_t *pd = allocate_kernel_pages(1); |