diff options
| author | bunnei <bunneidev@gmail.com> | 2018-02-12 19:17:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-12 19:17:31 -0500 |
| commit | 0a87eb71ba925f9d5564b6ef1d9d441f9430122d (patch) | |
| tree | c4422ff9c0fff43c035551f72ae3e84952d068f6 /src/core/memory.h | |
| parent | ce8006e85170032c586ba8b328e7f18127a6315d (diff) | |
| parent | 6085d32cf5d5ca4f9a5c0dc2f261505ed86c6539 (diff) | |
Merge pull request #180 from MerryMage/f/dynarmic/direct-page-table
arm_dynarmic: Support direct page table access
Diffstat (limited to 'src/core/memory.h')
| -rw-r--r-- | src/core/memory.h | 9 |
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 { * Page size used by the ARM architecture. This is the smallest granularity with which memory can * be mapped. */ -const int PAGE_BITS = 12; -const u64 PAGE_SIZE = 1 << PAGE_BITS; -const u64 PAGE_MASK = PAGE_SIZE - 1; -const size_t PAGE_TABLE_NUM_ENTRIES = 1ULL << (36 - PAGE_BITS); +constexpr size_t PAGE_BITS = 12; +constexpr u64 PAGE_SIZE = 1 << PAGE_BITS; +constexpr u64 PAGE_MASK = PAGE_SIZE - 1; +constexpr size_t ADDRESS_SPACE_BITS = 36; +constexpr size_t PAGE_TABLE_NUM_ENTRIES = 1ULL << (ADDRESS_SPACE_BITS - PAGE_BITS); enum class PageType : u8 { /// Page is unmapped and should cause an access error. |
