diff options
author | Benji Dial <benji6283@gmail.com> | 2021-02-16 20:38:53 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-02-16 20:38:53 -0500 |
commit | 47513bd32c256c4f35e3a8ced7d9fd7e15903530 (patch) | |
tree | cafdf75d52a954814726e07445063c41bb6599f9 /src/kernel/paging.c | |
parent | bd7facc4b5f53481dc85a15ba123361b2758655b (diff) | |
download | portland-os-47513bd32c256c4f35e3a8ced7d9fd7e15903530.tar.gz |
terminal application with ipc, shift+pause state dumper, hello world for terminal, meminfo popup program
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); |