From 15e62510104bc0e2b9180b66e5845d985cac03cc Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Wed, 10 Jan 2024 00:17:29 -0500 Subject: partial (largely untested) memory block device and tar file system support --- kernel/paging.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'kernel/paging.cpp') diff --git a/kernel/paging.cpp b/kernel/paging.cpp index 3bd27d0..8c27abc 100644 --- a/kernel/paging.cpp +++ b/kernel/paging.cpp @@ -96,6 +96,13 @@ namespace mercury::kernel::paging { return 0; } + void *map_new_kernel_pages(uint64_t count) { + uint64_t vaddr = find_unmapped_vram_region(count); + for (uint64_t i = 0; i < count; ++i) + map_kernel_page(take_pram_page(), vaddr + i * 4096, true, false); + return (void *)vaddr; + } + uint64_t get_used_vram_page_count() { uint64_t count = 0; for (uint64_t i = 0; i < kernel_vram_pages; ++i) -- cgit v1.2.3