summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-12-12 19:26:33 +0100
committerLioncash <mathew1800@gmail.com>2018-12-12 21:08:06 +0100
commiteb5f3f67f62534126e9598e9ea3e165238590b93 (patch)
treedb2132c09e41aa886851138f4887a4bfc2d1c958 /src/core/hle
parentvm_manager: Migrate memory querying to the VMManager interface (diff)
downloadyuzu-eb5f3f67f62534126e9598e9ea3e165238590b93.tar
yuzu-eb5f3f67f62534126e9598e9ea3e165238590b93.tar.gz
yuzu-eb5f3f67f62534126e9598e9ea3e165238590b93.tar.bz2
yuzu-eb5f3f67f62534126e9598e9ea3e165238590b93.tar.lz
yuzu-eb5f3f67f62534126e9598e9ea3e165238590b93.tar.xz
yuzu-eb5f3f67f62534126e9598e9ea3e165238590b93.tar.zst
yuzu-eb5f3f67f62534126e9598e9ea3e165238590b93.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/vm_manager.cpp8
-rw-r--r--src/core/hle/kernel/vm_manager.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index 21bcee192..d3b55a51e 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -28,7 +28,7 @@ static const char* GetMemoryStateName(MemoryState state) {
"IpcBuffer0", "Stack",
"ThreadLocal", "TransferMemoryIsolated",
"TransferMemory", "ProcessMemory",
- "Unknown2", "IpcBuffer1",
+ "Inaccessible", "IpcBuffer1",
"IpcBuffer3", "KernelStack",
};
@@ -312,10 +312,10 @@ MemoryInfo VMManager::QueryMemory(VAddr address) const {
memory_info.size = vma->second.size;
memory_info.state = ToSvcMemoryState(vma->second.meminfo_state);
} else {
- memory_info.base_address = 0;
+ memory_info.base_address = address_space_end;
memory_info.permission = static_cast<u32>(VMAPermission::None);
- memory_info.size = 0;
- memory_info.state = static_cast<u32>(MemoryState::Unmapped);
+ memory_info.size = 0 - address_space_end;
+ memory_info.state = static_cast<u32>(MemoryState::Inaccessible);
}
return memory_info;
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h
index 91e8e8c8c..7befa3526 100644
--- a/src/core/hle/kernel/vm_manager.h
+++ b/src/core/hle/kernel/vm_manager.h
@@ -105,6 +105,9 @@ enum class MemoryState : u32 {
ProcessMemory = 0x0F | FlagIPC3 | FlagIPC1 | FlagMapped | FlagMemoryPoolAllocated,
+ // Used to signify an inaccessible or invalid memory region with memory queries
+ Inaccessible = 0x10,
+
IpcBuffer1 = 0x11 | FlagIPC3 | FlagIPC1 | FlagMapped | FlagQueryPhysicalAddressAllowed |
FlagSharedDevice | FlagSharedDeviceAligned | FlagMemoryPoolAllocated,