summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-27 21:20:53 +0100
committerGitHub <noreply@github.com>2018-01-27 21:20:53 +0100
commitc1a8e4bfe46255e850129b00c01e818b479fce8f (patch)
treeb26f2b8ce9725ff02a5cd1067fe237dc6f066a89 /src/core/hle/kernel
parentMerge pull request #149 from MerryMage/feature/remove-x86_64h (diff)
parentmemory: Replace all memory hooking with Special regions (diff)
downloadyuzu-c1a8e4bfe46255e850129b00c01e818b479fce8f.tar
yuzu-c1a8e4bfe46255e850129b00c01e818b479fce8f.tar.gz
yuzu-c1a8e4bfe46255e850129b00c01e818b479fce8f.tar.bz2
yuzu-c1a8e4bfe46255e850129b00c01e818b479fce8f.tar.lz
yuzu-c1a8e4bfe46255e850129b00c01e818b479fce8f.tar.xz
yuzu-c1a8e4bfe46255e850129b00c01e818b479fce8f.tar.zst
yuzu-c1a8e4bfe46255e850129b00c01e818b479fce8f.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/vm_manager.cpp6
-rw-r--r--src/core/hle/kernel/vm_manager.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index 93662a45e..6da77eb58 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -10,8 +10,8 @@
#include "core/hle/kernel/errors.h"
#include "core/hle/kernel/vm_manager.h"
#include "core/memory.h"
+#include "core/memory_hook.h"
#include "core/memory_setup.h"
-#include "core/mmio.h"
namespace Kernel {
@@ -60,8 +60,8 @@ void VMManager::Reset() {
vma_map.emplace(initial_vma.base, initial_vma);
page_table.pointers.fill(nullptr);
+ page_table.special_regions.clear();
page_table.attributes.fill(Memory::PageType::Unmapped);
- page_table.cached_res_count.fill(0);
UpdatePageTableForVMA(initial_vma);
}
@@ -121,7 +121,7 @@ ResultVal<VMManager::VMAHandle> VMManager::MapBackingMemory(VAddr target, u8* me
ResultVal<VMManager::VMAHandle> VMManager::MapMMIO(VAddr target, PAddr paddr, u64 size,
MemoryState state,
- Memory::MMIORegionPointer mmio_handler) {
+ Memory::MemoryHookPointer mmio_handler) {
// This is the appropriately sized VMA that will turn into our allocation.
CASCADE_RESULT(VMAIter vma_handle, CarveVMA(target, size));
VirtualMemoryArea& final_vma = vma_handle->second;
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h
index b17385c7c..8de704a60 100644
--- a/src/core/hle/kernel/vm_manager.h
+++ b/src/core/hle/kernel/vm_manager.h
@@ -10,7 +10,7 @@
#include "common/common_types.h"
#include "core/hle/result.h"
#include "core/memory.h"
-#include "core/mmio.h"
+#include "core/memory_hook.h"
namespace Kernel {
@@ -81,7 +81,7 @@ struct VirtualMemoryArea {
// Settings for type = MMIO
/// Physical address of the register area this VMA maps to.
PAddr paddr = 0;
- Memory::MMIORegionPointer mmio_handler = nullptr;
+ Memory::MemoryHookPointer mmio_handler = nullptr;
/// Tests if this area can be merged to the right with `next`.
bool CanBeMergedWith(const VirtualMemoryArea& next) const;
@@ -160,7 +160,7 @@ public:
* @param mmio_handler The handler that will implement read and write for this MMIO region.
*/
ResultVal<VMAHandle> MapMMIO(VAddr target, PAddr paddr, u64 size, MemoryState state,
- Memory::MMIORegionPointer mmio_handler);
+ Memory::MemoryHookPointer mmio_handler);
/// Unmaps a range of addresses, splitting VMAs as necessary.
ResultCode UnmapRange(VAddr target, u64 size);