diff options
author | B3n30 <bene_thomas@web.de> | 2017-09-25 08:29:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-25 08:29:32 +0200 |
commit | d881dee818e7e59b72cb11cea634eb70bdcd3d35 (patch) | |
tree | 4f9b241fb63b90647e2992e83d83de7d25bb5d42 /src/core/memory.cpp | |
parent | Merge pull request #2951 from huwpascoe/perf-4 (diff) | |
parent | ARM_Interface: Implement PageTableChanged (diff) | |
download | yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.gz yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.bz2 yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.lz yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.xz yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.tar.zst yuzu-d881dee818e7e59b72cb11cea634eb70bdcd3d35.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/memory.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 68a6b1ac2..a6b5f6c99 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -9,6 +9,8 @@ #include "common/common_types.h" #include "common/logging/log.h" #include "common/swap.h" +#include "core/arm/arm_interface.h" +#include "core/core.h" #include "core/hle/kernel/memory.h" #include "core/hle/kernel/process.h" #include "core/hle/lock.h" @@ -22,10 +24,17 @@ namespace Memory { static std::array<u8, Memory::VRAM_SIZE> vram; static std::array<u8, Memory::N3DS_EXTRA_RAM_SIZE> n3ds_extra_ram; -PageTable* current_page_table = nullptr; +static PageTable* current_page_table = nullptr; -std::array<u8*, PAGE_TABLE_NUM_ENTRIES>* GetCurrentPageTablePointers() { - return ¤t_page_table->pointers; +void SetCurrentPageTable(PageTable* page_table) { + current_page_table = page_table; + if (Core::System::GetInstance().IsPoweredOn()) { + Core::CPU().PageTableChanged(); + } +} + +PageTable* GetCurrentPageTable() { + return current_page_table; } static void MapPages(PageTable& page_table, u32 base, u32 size, u8* memory, PageType type) { |