MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / CreatePageTable

Function CreatePageTable

Kernel/src/arch/x86_64/paging.cpp:257–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255 }
256
257 void CreatePageTable(uint16_t pdptIndex, uint16_t pageDirIndex, address_space_t* addressSpace){
258 page_table_t pTable = AllocatePageTable();
259 SetPageFrame(&(addressSpace->pageDirs[pdptIndex][pageDirIndex]),pTable.phys);
260 addressSpace->pageDirs[pdptIndex][pageDirIndex] |= PAGE_PRESENT | PAGE_WRITABLE | PAGE_USER;
261 addressSpace->pageTables[pdptIndex][pageDirIndex] = pTable.virt;
262 }
263
264 void* Allocate4KPages(uint64_t amount, address_space_t* addressSpace){
265 uint64_t offset = 0;

Callers 2

Allocate4KPagesFunction · 0.85
MapVirtualMemory4KFunction · 0.85

Calls 2

AllocatePageTableFunction · 0.85
SetPageFrameFunction · 0.85

Tested by

no test coverage detected