diff options
| author | 2017-09-01 23:10:03 -0400 | |
|---|---|---|
| committer | 2017-09-30 14:28:54 -0400 | |
| commit | f01472a5ffd03b535e8a66bb00d9a7548a0f61bf (patch) | |
| tree | d11874933de837f7ce57ccb259f1f869db70bdb7 /src/core/memory.h | |
| parent | arm: Use 64-bit addressing in a bunch of places. (diff) | |
| download | yuzu-f01472a5ffd03b535e8a66bb00d9a7548a0f61bf.tar.gz yuzu-f01472a5ffd03b535e8a66bb00d9a7548a0f61bf.tar.xz yuzu-f01472a5ffd03b535e8a66bb00d9a7548a0f61bf.zip | |
core: Various changes to support 64-bit addressing.
Diffstat (limited to 'src/core/memory.h')
| -rw-r--r-- | src/core/memory.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/memory.h b/src/core/memory.h index c8c56babd..e8d796d24 100644 --- a/src/core/memory.h +++ b/src/core/memory.h | |||
| @@ -16,10 +16,10 @@ namespace Memory { | |||
| 16 | * Page size used by the ARM architecture. This is the smallest granularity with which memory can | 16 | * Page size used by the ARM architecture. This is the smallest granularity with which memory can |
| 17 | * be mapped. | 17 | * be mapped. |
| 18 | */ | 18 | */ |
| 19 | const u32 PAGE_SIZE = 0x1000; | ||
| 20 | const u32 PAGE_MASK = PAGE_SIZE - 1; | ||
| 21 | const int PAGE_BITS = 12; | 19 | const int PAGE_BITS = 12; |
| 22 | const size_t PAGE_TABLE_NUM_ENTRIES = 1 << (32 - PAGE_BITS); | 20 | const u64 PAGE_SIZE = 1 << PAGE_BITS; |
| 21 | const u64 PAGE_MASK = PAGE_SIZE - 1; | ||
| 22 | const size_t PAGE_TABLE_NUM_ENTRIES = 1ULL << (64 - PAGE_BITS); | ||
| 23 | 23 | ||
| 24 | /// Physical memory regions as seen from the ARM11 | 24 | /// Physical memory regions as seen from the ARM11 |
| 25 | enum : PAddr { | 25 | enum : PAddr { |
| @@ -178,17 +178,17 @@ u8* GetPhysicalPointer(PAddr address); | |||
| 178 | * Adds the supplied value to the rasterizer resource cache counter of each | 178 | * Adds the supplied value to the rasterizer resource cache counter of each |
| 179 | * page touching the region. | 179 | * page touching the region. |
| 180 | */ | 180 | */ |
| 181 | void RasterizerMarkRegionCached(PAddr start, u32 size, int count_delta); | 181 | void RasterizerMarkRegionCached(PAddr start, u64 size, int count_delta); |
| 182 | 182 | ||
| 183 | /** | 183 | /** |
| 184 | * Flushes any externally cached rasterizer resources touching the given region. | 184 | * Flushes any externally cached rasterizer resources touching the given region. |
| 185 | */ | 185 | */ |
| 186 | void RasterizerFlushRegion(PAddr start, u32 size); | 186 | void RasterizerFlushRegion(PAddr start, u64 size); |
| 187 | 187 | ||
| 188 | /** | 188 | /** |
| 189 | * Flushes and invalidates any externally cached rasterizer resources touching the given region. | 189 | * Flushes and invalidates any externally cached rasterizer resources touching the given region. |
| 190 | */ | 190 | */ |
| 191 | void RasterizerFlushAndInvalidateRegion(PAddr start, u32 size); | 191 | void RasterizerFlushAndInvalidateRegion(PAddr start, u64 size); |
| 192 | 192 | ||
| 193 | enum class FlushMode { | 193 | enum class FlushMode { |
| 194 | /// Write back modified surfaces to RAM | 194 | /// Write back modified surfaces to RAM |
| @@ -201,12 +201,12 @@ enum class FlushMode { | |||
| 201 | * Flushes and invalidates any externally cached rasterizer resources touching the given virtual | 201 | * Flushes and invalidates any externally cached rasterizer resources touching the given virtual |
| 202 | * address region. | 202 | * address region. |
| 203 | */ | 203 | */ |
| 204 | void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode); | 204 | void RasterizerFlushVirtualRegion(VAddr start, u64 size, FlushMode mode); |
| 205 | 205 | ||
| 206 | /** | 206 | /** |
| 207 | * Dynarmic has an optimization to memory accesses when the pointer to the page exists that | 207 | * Dynarmic has an optimization to memory accesses when the pointer to the page exists that |
| 208 | * can be used by setting up the current page table as a callback. This function is used to | 208 | * can be used by setting up the current page table as a callback. This function is used to |
| 209 | * retrieve the current page table for that purpose. | 209 | * retrieve the current page table for that purpose. |
| 210 | */ | 210 | */ |
| 211 | std::array<u8*, PAGE_TABLE_NUM_ENTRIES>* GetCurrentPageTablePointers(); | 211 | //std::array<u8*, PAGE_TABLE_NUM_ENTRIES>* GetCurrentPageTablePointers(); |
| 212 | } | 212 | } |