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

Function KernelMapVirtualMemory2M

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

Source from the content-addressed store, hash-verified

506 }
507
508 void KernelMapVirtualMemory2M(uint64_t phys, uint64_t virt, uint64_t amount){
509 uint64_t pageDirIndex = PAGE_DIR_GET_INDEX(virt);
510
511 while(amount--){
512 kernelHeapDir[pageDirIndex] = 0x83;
513 SetPageFrame(&(kernelHeapDir[pageDirIndex]), phys);
514 kernelHeapDir[pageDirIndex] |= 0x83;
515 pageDirIndex++;
516 phys += PAGE_SIZE_2M;
517 }
518 }
519
520 void KernelMapVirtualMemory4K(uint64_t phys, uint64_t virt, uint64_t amount, uint64_t flags){
521 uint64_t pageDirIndex, pageIndex;

Callers

nothing calls this directly

Calls 1

SetPageFrameFunction · 0.85

Tested by

no test coverage detected