VMM - touch_page adds P3

This commit is contained in:
2017-12-27 23:08:41 +01:00
parent 28c8afe3c5
commit 1d4b689215
2 changed files with 26 additions and 0 deletions

View File

@@ -49,3 +49,13 @@ int vmm_set_page(void *P4, uintptr_t addr, uintptr_t page, uint16_t flags)
P1e(P4, addr).value = page | flags;
return 0;
}
int touch_page(void *P4, uintptr_t addr, uint16_t flags)
{
(void)flags;
if(!P4) return -1;
if(!P4e(P4, addr).present)
P4e(P4, addr).value = pmm_alloc();
return 0;
}