diff options
Diffstat (limited to 'src/kernel/memory/paging.c')
-rw-r--r-- | src/kernel/memory/paging.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/kernel/memory/paging.c b/src/kernel/memory/paging.c index f355449..67c471f 100644 --- a/src/kernel/memory/paging.c +++ b/src/kernel/memory/paging.c @@ -112,6 +112,14 @@ void paging_map_user(struct page_directory *dir, uint32_t phys, uint32_t virt) } } +// Hmm +uint32_t paging_get_phys(uint32_t virt) +{ + uint32_t pdi = virt >> 22; + uint32_t pti = (virt >> 12) & 0x03FF; + return (*(uint32_t *)&paging_current_directory->tables[pdi]->pages[pti]) & 0xFFFFF000; +} + void paging_install() { kheap_init(); |