diff options
| author | 2017-08-07 13:37:16 -0500 | |
|---|---|---|
| committer | 2017-09-15 14:26:18 -0500 | |
| commit | f18a176b601c8dc15b372607a4e9f289bdc25ee4 (patch) | |
| tree | 009f039d4ad8fb1fe98c0ac0686e930aa1f7cac7 /src/core/memory.cpp | |
| parent | Kernel/Threads: Don't clear the CPU instruction cache when performing a conte... (diff) | |
| download | yuzu-f18a176b601c8dc15b372607a4e9f289bdc25ee4.tar.gz yuzu-f18a176b601c8dc15b372607a4e9f289bdc25ee4.tar.xz yuzu-f18a176b601c8dc15b372607a4e9f289bdc25ee4.zip | |
Kernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping.
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 3 |
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 | ||
| 210 | bool IsValidPhysicalAddress(const PAddr paddr) { | 210 | bool 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 | ||
| 215 | u8* GetPointer(const VAddr vaddr) { | 214 | u8* GetPointer(const VAddr vaddr) { |