summaryrefslogtreecommitdiff
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorGravatar Subv2017-09-26 17:27:44 -0500
committerGravatar Subv2017-09-26 17:27:44 -0500
commit35da7f57efd5153be37a05ffcbb57412da74265a (patch)
tree94e5c1b2719be32d6a6768ba472025335d6235b2 /src/core/memory.h
parentMerge pull request #2958 from Subv/audio_buffer_datatype (diff)
downloadyuzu-35da7f57efd5153be37a05ffcbb57412da74265a.tar.gz
yuzu-35da7f57efd5153be37a05ffcbb57412da74265a.tar.xz
yuzu-35da7f57efd5153be37a05ffcbb57412da74265a.zip
Memory: Allow IsValidVirtualAddress to be called with a specific process parameter.
There is still an overload of IsValidVirtualAddress that only takes the VAddr and will default to the current process.
Diffstat (limited to 'src/core/memory.h')
-rw-r--r--src/core/memory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/memory.h b/src/core/memory.h
index 1865bfea0..347c08c78 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -12,6 +12,10 @@
12#include "common/common_types.h" 12#include "common/common_types.h"
13#include "core/mmio.h" 13#include "core/mmio.h"
14 14
15namespace Kernel {
16class Process;
17}
18
15namespace Memory { 19namespace Memory {
16 20
17/** 21/**
@@ -185,7 +189,10 @@ enum : VAddr {
185void SetCurrentPageTable(PageTable* page_table); 189void SetCurrentPageTable(PageTable* page_table);
186PageTable* GetCurrentPageTable(); 190PageTable* GetCurrentPageTable();
187 191
192/// Determines if the given VAddr is valid for the specified process.
193bool IsValidVirtualAddress(const Kernel::Process& process, const VAddr vaddr);
188bool IsValidVirtualAddress(const VAddr addr); 194bool IsValidVirtualAddress(const VAddr addr);
195
189bool IsValidPhysicalAddress(const PAddr addr); 196bool IsValidPhysicalAddress(const PAddr addr);
190 197
191u8 Read8(VAddr addr); 198u8 Read8(VAddr addr);