summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_memory_layout.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-11-11 15:45:29 +0100
committerGitHub <noreply@github.com>2023-11-11 15:45:29 +0100
commit40d4e9543b5792dfa761b44d4c6017d5692f77a3 (patch)
tree019cb6ca42ee3b89b400bb624e933abf695e150c /src/core/hle/kernel/k_memory_layout.h
parentMerge pull request #11981 from lucasreis1/patch (diff)
parentk_page_table: fix shutdown (diff)
downloadyuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar
yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.gz
yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.bz2
yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.lz
yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.xz
yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.zst
yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.zip
Diffstat (limited to 'src/core/hle/kernel/k_memory_layout.h')
-rw-r--r--src/core/hle/kernel/k_memory_layout.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_memory_layout.h b/src/core/hle/kernel/k_memory_layout.h
index c8122644f..d7adb3169 100644
--- a/src/core/hle/kernel/k_memory_layout.h
+++ b/src/core/hle/kernel/k_memory_layout.h
@@ -394,6 +394,14 @@ private:
return region.GetEndAddress();
}
+public:
+ static const KMemoryRegion* Find(const KMemoryLayout& layout, KVirtualAddress address) {
+ return Find(address, layout.GetVirtualMemoryRegionTree());
+ }
+ static const KMemoryRegion* Find(const KMemoryLayout& layout, KPhysicalAddress address) {
+ return Find(address, layout.GetPhysicalMemoryRegionTree());
+ }
+
private:
u64 m_linear_phys_to_virt_diff{};
u64 m_linear_virt_to_phys_diff{};