Browse Source

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

pull/15/merge
Subv 9 years ago
parent
commit
f18a176b60
  1. 3
      src/core/memory.cpp

3
src/core/memory.cpp

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

Loading…
Cancel
Save