summaryrefslogtreecommitdiff
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorGravatar MerryMage2018-02-12 21:53:32 +0000
committerGravatar MerryMage2018-02-12 21:53:32 +0000
commit6085d32cf5d5ca4f9a5c0dc2f261505ed86c6539 (patch)
treec4422ff9c0fff43c035551f72ae3e84952d068f6 /src/core/memory.h
parentMerge pull request #179 from gdkchan/audren_stubs (diff)
downloadyuzu-6085d32cf5d5ca4f9a5c0dc2f261505ed86c6539.tar.gz
yuzu-6085d32cf5d5ca4f9a5c0dc2f261505ed86c6539.tar.xz
yuzu-6085d32cf5d5ca4f9a5c0dc2f261505ed86c6539.zip
arm_dynarmic: Support direct page table access
Diffstat (limited to 'src/core/memory.h')
-rw-r--r--src/core/memory.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/memory.h b/src/core/memory.h
index b2158ca46..f3ace7a98 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -25,10 +25,11 @@ namespace Memory {
25 * Page size used by the ARM architecture. This is the smallest granularity with which memory can 25 * Page size used by the ARM architecture. This is the smallest granularity with which memory can
26 * be mapped. 26 * be mapped.
27 */ 27 */
28const int PAGE_BITS = 12; 28constexpr size_t PAGE_BITS = 12;
29const u64 PAGE_SIZE = 1 << PAGE_BITS; 29constexpr u64 PAGE_SIZE = 1 << PAGE_BITS;
30const u64 PAGE_MASK = PAGE_SIZE - 1; 30constexpr u64 PAGE_MASK = PAGE_SIZE - 1;
31const size_t PAGE_TABLE_NUM_ENTRIES = 1ULL << (36 - PAGE_BITS); 31constexpr size_t ADDRESS_SPACE_BITS = 36;
32constexpr size_t PAGE_TABLE_NUM_ENTRIES = 1ULL << (ADDRESS_SPACE_BITS - PAGE_BITS);
32 33
33enum class PageType : u8 { 34enum class PageType : u8 {
34 /// Page is unmapped and should cause an access error. 35 /// Page is unmapped and should cause an access error.