From 2a255b2d61a445fb2b83cc8af7632e3d720e1292 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 22 Oct 2023 21:16:38 -0400 Subject: kernel: add KPageTableBase Co-authored-by: Kelebek1 --- src/core/hle/kernel/k_memory_layout.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/hle/kernel/k_memory_layout.h') 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{}; -- cgit v1.2.3