test map/unmap

This commit is contained in:
2026-02-24 10:50:12 +01:00
parent 50dfd49d43
commit 6c9e7d8a27
3 changed files with 67 additions and 21 deletions

View File

@@ -38,8 +38,14 @@ Thread::Thread (bool kernel, void * startframe, int num_pages): queue_link(null
StackPointer.user = (void*)(0x61FF000+STACK_SIZE);
paging_tree = (four_lvl_paging_t*)PageFrameAllocator::alloc(true);
memset(paging_tree, 0, 4096);
create_basic_page_table(paging_tree, &identity_table);
appcode_table = (pagetable_t*) PageFrameAllocator::alloc(true);
memset(appcode_table, 0, 4096);
appstack_table = (pagetable_t*) PageFrameAllocator::alloc(true);
memset(appstack_table, 0, 4096);
assert(num_pages < 512); //limit for application code size is 2M
for(uint8_t i=0; i<num_pages; i++){