summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Subv2017-08-07 13:37:16 -0500
committerGravatar Subv2017-09-15 14:26:18 -0500
commitf18a176b601c8dc15b372607a4e9f289bdc25ee4 (patch)
tree009f039d4ad8fb1fe98c0ac0686e930aa1f7cac7
parentKernel/Threads: Don't clear the CPU instruction cache when performing a conte... (diff)
downloadyuzu-f18a176b601c8dc15b372607a4e9f289bdc25ee4.tar.gz
yuzu-f18a176b601c8dc15b372607a4e9f289bdc25ee4.tar.xz
yuzu-f18a176b601c8dc15b372607a4e9f289bdc25ee4.zip
Kernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping.
-rw-r--r--src/core/memory.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 4dcbf2274..4d16736f5 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -208,8 +208,7 @@ bool IsValidVirtualAddress(const VAddr vaddr) {
208} 208}
209 209
210bool IsValidPhysicalAddress(const PAddr paddr) { 210bool IsValidPhysicalAddress(const PAddr paddr) {
211 boost::optional<VAddr> vaddr = PhysicalToVirtualAddress(paddr); 211 return GetPhysicalPointer(paddr) != nullptr;
212 return vaddr && IsValidVirtualAddress(*vaddr);
213} 212}
214 213
215u8* GetPointer(const VAddr vaddr) { 214u8* GetPointer(const VAddr vaddr) {