Files
pepperOS/src/mem/paging/paging.c

13 lines
279 B
C

#include "paging.h"
#include <kernel.h>
void paging_init()
{
uint64_t cr3;
asm volatile ("mov %%cr3, %0" : "=r"(cr3));
// Root directory address (cr3 without 12 less significant bits)
uint64_t* pml4 = PHYS_TO_VIRT(cr3 & ~0xFFF);
DEBUG("pml4=0x%p", pml4);
}