diff options
author | Lioncash <mathew1800@gmail.com> | 2019-11-26 19:09:12 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-11-27 03:53:34 +0100 |
commit | 323680e5ad3ca0e27f2dd1de26816741b3243bed (patch) | |
tree | ac7a9e683831493f0f14c8b9566c0d570807ad62 /src/tests/core/arm | |
parent | core/memory: Introduce skeleton of Memory class (diff) | |
download | yuzu-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/tests/core/arm')
-rw-r--r-- | src/tests/core/arm/arm_test_common.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/tests/core/arm/arm_test_common.cpp b/src/tests/core/arm/arm_test_common.cpp index ac7ae3e52..17043346b 100644 --- a/src/tests/core/arm/arm_test_common.cpp +++ b/src/tests/core/arm/arm_test_common.cpp @@ -8,7 +8,6 @@ #include "core/core.h" #include "core/hle/kernel/process.h" #include "core/memory.h" -#include "core/memory_setup.h" #include "tests/core/arm/arm_test_common.h" namespace ArmTests { @@ -16,8 +15,9 @@ namespace ArmTests { TestEnvironment::TestEnvironment(bool mutable_memory_) : mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)), kernel{Core::System::GetInstance()} { - auto process = Kernel::Process::Create(Core::System::GetInstance(), "", - Kernel::Process::ProcessType::Userland); + auto& system = Core::System::GetInstance(); + + auto process = Kernel::Process::Create(system, "", Kernel::Process::ProcessType::Userland); page_table = &process->VMManager().page_table; std::fill(page_table->pointers.begin(), page_table->pointers.end(), nullptr); @@ -25,15 +25,16 @@ TestEnvironment::TestEnvironment(bool mutable_memory_) std::fill(page_table->attributes.begin(), page_table->attributes.end(), Common::PageType::Unmapped); - Memory::MapIoRegion(*page_table, 0x00000000, 0x80000000, test_memory); - Memory::MapIoRegion(*page_table, 0x80000000, 0x80000000, test_memory); + system.Memory().MapIoRegion(*page_table, 0x00000000, 0x80000000, test_memory); + system.Memory().MapIoRegion(*page_table, 0x80000000, 0x80000000, test_memory); kernel.MakeCurrentProcess(process.get()); } TestEnvironment::~TestEnvironment() { - Memory::UnmapRegion(*page_table, 0x80000000, 0x80000000); - Memory::UnmapRegion(*page_table, 0x00000000, 0x80000000); + auto& system = Core::System::GetInstance(); + system.Memory().UnmapRegion(*page_table, 0x80000000, 0x80000000); + system.Memory().UnmapRegion(*page_table, 0x00000000, 0x80000000); } void TestEnvironment::SetMemory64(VAddr vaddr, u64 value) { |