Kernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping.

This commit is contained in:
Subv
2017-08-07 13:37:16 -05:00
parent 304f937f24
commit b27892dacb

View File

@@ -208,8 +208,7 @@ bool IsValidVirtualAddress(const VAddr vaddr) {
}
bool IsValidPhysicalAddress(const PAddr paddr) {
boost::optional<VAddr> vaddr = PhysicalToVirtualAddress(paddr);
return vaddr && IsValidVirtualAddress(*vaddr);
return GetPhysicalPointer(paddr) != nullptr;
}
u8* GetPointer(const VAddr vaddr) {