From a8cc03502b41b44150af71535d2b662a7ee3390c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 12 Dec 2018 11:34:01 -0500 Subject: vm_manager: Migrate memory querying to the VMManager interface Gets rid of the need to directly access the managed VMAs outside of the memory manager itself just for querying memory. --- src/core/hle/kernel/vm_manager.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core/hle/kernel/vm_manager.h') diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h index 35f0f276e..91e8e8c8c 100644 --- a/src/core/hle/kernel/vm_manager.h +++ b/src/core/hle/kernel/vm_manager.h @@ -153,7 +153,7 @@ constexpr u32 ToSvcMemoryState(MemoryState state) { struct MemoryInfo { u64 base_address; u64 size; - u32 type; + u32 state; u32 attributes; u32 permission; u32 device_refcount; @@ -288,6 +288,14 @@ public: ResultCode MirrorMemory(VAddr dst_addr, VAddr src_addr, u64 size, MemoryState state); + /// Queries the memory manager for information about the given address. + /// + /// @param address The address to query the memory manager about for information. + /// + /// @return A MemoryInfo instance containing information about the given address. + /// + MemoryInfo QueryMemory(VAddr address) const; + /** * Scans all VMAs and updates the page table range of any that use the given vector as backing * memory. This should be called after any operation that causes reallocation of the vector. -- cgit v1.2.3