summaryrefslogtreecommitdiffstats
path: root/src/tests/core
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2017-08-07 21:30:01 +0200
committerSubv <subv2112@gmail.com>2017-09-15 21:26:20 +0200
commit3bde97ea059f7bff4e7ebbc59077a1211ae068f7 (patch)
tree5e60ecbcd8d273d03f01e91d441713e62068aabc /src/tests/core
parentKernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping. (diff)
downloadyuzu-3bde97ea059f7bff4e7ebbc59077a1211ae068f7.tar
yuzu-3bde97ea059f7bff4e7ebbc59077a1211ae068f7.tar.gz
yuzu-3bde97ea059f7bff4e7ebbc59077a1211ae068f7.tar.bz2
yuzu-3bde97ea059f7bff4e7ebbc59077a1211ae068f7.tar.lz
yuzu-3bde97ea059f7bff4e7ebbc59077a1211ae068f7.tar.xz
yuzu-3bde97ea059f7bff4e7ebbc59077a1211ae068f7.tar.zst
yuzu-3bde97ea059f7bff4e7ebbc59077a1211ae068f7.zip
Diffstat (limited to 'src/tests/core')
-rw-r--r--src/tests/core/arm/arm_test_common.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/tests/core/arm/arm_test_common.cpp b/src/tests/core/arm/arm_test_common.cpp
index 1df6c5677..8384ce744 100644
--- a/src/tests/core/arm/arm_test_common.cpp
+++ b/src/tests/core/arm/arm_test_common.cpp
@@ -3,20 +3,30 @@
// Refer to the license.txt file included.
#include "core/core.h"
+#include "core/memory.h"
#include "core/memory_setup.h"
#include "tests/core/arm/arm_test_common.h"
namespace ArmTests {
+static Memory::PageTable page_table;
+
TestEnvironment::TestEnvironment(bool mutable_memory_)
: mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)) {
- Memory::MapIoRegion(0x00000000, 0x80000000, test_memory);
- Memory::MapIoRegion(0x80000000, 0x80000000, test_memory);
+
+ page_table.pointers.fill(nullptr);
+ page_table.attributes.fill(Memory::PageType::Unmapped);
+ page_table.cached_res_count.fill(0);
+
+ Memory::MapIoRegion(page_table, 0x00000000, 0x80000000, test_memory);
+ Memory::MapIoRegion(page_table, 0x80000000, 0x80000000, test_memory);
+
+ Memory::current_page_table = &page_table;
}
TestEnvironment::~TestEnvironment() {
- Memory::UnmapRegion(0x80000000, 0x80000000);
- Memory::UnmapRegion(0x00000000, 0x80000000);
+ Memory::UnmapRegion(page_table, 0x80000000, 0x80000000);
+ Memory::UnmapRegion(page_table, 0x00000000, 0x80000000);
}
void TestEnvironment::SetMemory64(VAddr vaddr, u64 value) {