summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-26 19:09:12 +0100
committerLioncash <mathew1800@gmail.com>2019-11-27 03:53:34 +0100
commit323680e5ad3ca0e27f2dd1de26816741b3243bed (patch)
treeac7a9e683831493f0f14c8b9566c0d570807ad62 /src/core/hle/kernel
parentcore/memory: Introduce skeleton of Memory class (diff)
downloadyuzu-323680e5ad3ca0e27f2dd1de26816741b3243bed.tar
yuzu-323680e5ad3ca0e27f2dd1de26816741b3243bed.tar.gz
yuzu-323680e5ad3ca0e27f2dd1de26816741b3243bed.tar.bz2
yuzu-323680e5ad3ca0e27f2dd1de26816741b3243bed.tar.lz
yuzu-323680e5ad3ca0e27f2dd1de26816741b3243bed.tar.xz
yuzu-323680e5ad3ca0e27f2dd1de26816741b3243bed.tar.zst
yuzu-323680e5ad3ca0e27f2dd1de26816741b3243bed.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/vm_manager.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index e6eee09d7..a9a20ef76 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -16,7 +16,6 @@
#include "core/hle/kernel/resource_limit.h"
#include "core/hle/kernel/vm_manager.h"
#include "core/memory.h"
-#include "core/memory_setup.h"
namespace Kernel {
namespace {
@@ -786,19 +785,21 @@ void VMManager::MergeAdjacentVMA(VirtualMemoryArea& left, const VirtualMemoryAre
}
void VMManager::UpdatePageTableForVMA(const VirtualMemoryArea& vma) {
+ auto& memory = system.Memory();
+
switch (vma.type) {
case VMAType::Free:
- Memory::UnmapRegion(page_table, vma.base, vma.size);
+ memory.UnmapRegion(page_table, vma.base, vma.size);
break;
case VMAType::AllocatedMemoryBlock:
- Memory::MapMemoryRegion(page_table, vma.base, vma.size,
- vma.backing_block->data() + vma.offset);
+ memory.MapMemoryRegion(page_table, vma.base, vma.size,
+ vma.backing_block->data() + vma.offset);
break;
case VMAType::BackingMemory:
- Memory::MapMemoryRegion(page_table, vma.base, vma.size, vma.backing_memory);
+ memory.MapMemoryRegion(page_table, vma.base, vma.size, vma.backing_memory);
break;
case VMAType::MMIO:
- Memory::MapIoRegion(page_table, vma.base, vma.size, vma.mmio_handler);
+ memory.MapIoRegion(page_table, vma.base, vma.size, vma.mmio_handler);
break;
}
}