CoreTiming: wrap into class
This commit is contained in:
@@ -16,10 +16,10 @@ static Memory::PageTable* page_table = nullptr;
|
||||
TestEnvironment::TestEnvironment(bool mutable_memory_)
|
||||
: mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)) {
|
||||
|
||||
CoreTiming::Init();
|
||||
// HACK: some memory functions are currently referring kernel from the global instance,
|
||||
// so we need to create the kernel object there.
|
||||
// Change this when all global states are eliminated.
|
||||
Core::System::GetInstance().timing = std::make_unique<Core::Timing>();
|
||||
Core::System::GetInstance().kernel = std::make_unique<Kernel::KernelSystem>(0);
|
||||
kernel = Core::System::GetInstance().kernel.get();
|
||||
|
||||
@@ -38,8 +38,6 @@ TestEnvironment::TestEnvironment(bool mutable_memory_)
|
||||
TestEnvironment::~TestEnvironment() {
|
||||
Memory::UnmapRegion(*page_table, 0x80000000, 0x80000000);
|
||||
Memory::UnmapRegion(*page_table, 0x00000000, 0x80000000);
|
||||
|
||||
CoreTiming::Shutdown();
|
||||
}
|
||||
|
||||
void TestEnvironment::SetMemory64(VAddr vaddr, u64 value) {
|
||||
|
||||
Reference in New Issue
Block a user