1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Make Memory::Lookup return false on unmapped pages.

This commit is contained in:
Jonas 'Sortie' Termansen 2013-01-12 15:16:19 +01:00
parent a685a9d68f
commit b0c01f2c6a

View file

@ -440,6 +440,8 @@ namespace Sortix
} }
addr_t entry = (PMLS[1] + offset)->entry[pmlchildid[1]]; addr_t entry = (PMLS[1] + offset)->entry[pmlchildid[1]];
if ( !(entry & PML_PRESENT) ) { return false; }
int entryflags = entry & PML_ADDRESS; int entryflags = entry & PML_ADDRESS;
int entryprot = PMLFlagsToProtection(entryflags); int entryprot = PMLFlagsToProtection(entryflags);
prot &= entryprot; prot &= entryprot;