vm_manager: Add backing functionality for memory attributes

Adds the barebones enumeration constants and functions in place to
handle memory attributes, while also essentially leaving the attribute
itself non-functional.
This commit is contained in:
Lioncash
2018-12-14 18:19:12 -05:00
parent 2f2fc47af2
commit 34b24a47e9
2 changed files with 85 additions and 1 deletions

View File

@ -38,7 +38,7 @@ static const char* GetMemoryStateName(MemoryState state) {
bool VirtualMemoryArea::CanBeMergedWith(const VirtualMemoryArea& next) const {
ASSERT(base + size == next.base);
if (permissions != next.permissions || meminfo_state != next.meminfo_state ||
type != next.type) {
attribute != next.attribute || type != next.type) {
return false;
}
if (type == VMAType::AllocatedMemoryBlock &&
@ -308,6 +308,7 @@ MemoryInfo VMManager::QueryMemory(VAddr address) const {
if (IsValidHandle(vma)) {
memory_info.base_address = vma->second.base;
memory_info.attributes = ToSvcMemoryAttribute(vma->second.attribute);
memory_info.permission = static_cast<u32>(vma->second.permissions);
memory_info.size = vma->second.size;
memory_info.state = ToSvcMemoryState(vma->second.meminfo_state);