diff options
author | Markus Wick <markus@selfnet.de> | 2020-01-12 17:04:15 +0100 |
---|---|---|
committer | Markus Wick <markus@selfnet.de> | 2020-01-18 08:38:47 +0100 |
commit | 56672b8c9809d8f5585d208f5b85549bc3fe2a0e (patch) | |
tree | 9ac5f757fb4dbb26272c2b169e0a33bc6164d4e9 /src/core/memory.cpp | |
parent | core/hle: Simplify PhysicalMemory usage in vm_manager. (diff) | |
download | yuzu-56672b8c9809d8f5585d208f5b85549bc3fe2a0e.tar yuzu-56672b8c9809d8f5585d208f5b85549bc3fe2a0e.tar.gz yuzu-56672b8c9809d8f5585d208f5b85549bc3fe2a0e.tar.bz2 yuzu-56672b8c9809d8f5585d208f5b85549bc3fe2a0e.tar.lz yuzu-56672b8c9809d8f5585d208f5b85549bc3fe2a0e.tar.xz yuzu-56672b8c9809d8f5585d208f5b85549bc3fe2a0e.tar.zst yuzu-56672b8c9809d8f5585d208f5b85549bc3fe2a0e.zip |
Diffstat (limited to 'src/core/memory.cpp')
-rw-r--r-- | src/core/memory.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 3c2a29d9b..f0888327f 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -14,6 +14,7 @@ #include "common/swap.h" #include "core/arm/arm_interface.h" #include "core/core.h" +#include "core/hle/kernel/physical_memory.h" #include "core/hle/kernel/process.h" #include "core/hle/kernel/vm_manager.h" #include "core/memory.h" @@ -38,6 +39,11 @@ struct Memory::Impl { system.ArmInterface(3).PageTableChanged(*current_page_table, address_space_width); } + void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, + Kernel::PhysicalMemory& memory, VAddr offset) { + MapMemoryRegion(page_table, base, size, memory.data() + offset); + } + void MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, u8* target) { ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: {:016X}", size); ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: {:016X}", base); @@ -601,6 +607,11 @@ void Memory::SetCurrentPageTable(Kernel::Process& process) { impl->SetCurrentPageTable(process); } +void Memory::MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, + Kernel::PhysicalMemory& memory, VAddr offset) { + impl->MapMemoryRegion(page_table, base, size, memory, offset); +} + void Memory::MapMemoryRegion(Common::PageTable& page_table, VAddr base, u64 size, u8* target) { impl->MapMemoryRegion(page_table, base, size, target); } |