VMM - touch_page stops at P2 for huge pages
This commit is contained in:
@@ -73,6 +73,9 @@ int touch_page(void *P4, uintptr_t addr, uint16_t flags)
|
||||
{
|
||||
if(!P4) return -1;
|
||||
|
||||
int huge=(flags & PAGE_HUGE)?1:0;
|
||||
flags ^= PAGE_HUGE*huge;
|
||||
|
||||
if((!P4e(P4, addr).present)
|
||||
&& (!(P4e(P4, addr).value = pmm_alloc())))
|
||||
return -1;
|
||||
@@ -83,6 +86,8 @@ int touch_page(void *P4, uintptr_t addr, uint16_t flags)
|
||||
return -1;
|
||||
P3e(P4, addr).value |= flags | PAGE_PRESENT;
|
||||
|
||||
if(huge) return 0;
|
||||
|
||||
if((!P2e(P4, addr).present)
|
||||
&& (!(P2e(P4, addr).value = pmm_alloc())))
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user