diff options
| author | 2018-03-14 22:06:57 -0400 | |
|---|---|---|
| committer | 2018-03-16 18:32:22 -0400 | |
| commit | 69ee9edd8d769ca14b812a6c0dbba45b2c7702e8 (patch) | |
| tree | 304a2751c8175ba58d08218ce0943cacf96c224d /src/core | |
| parent | process: Fix stack memory state. (diff) | |
| download | yuzu-69ee9edd8d769ca14b812a6c0dbba45b2c7702e8.tar.gz yuzu-69ee9edd8d769ca14b812a6c0dbba45b2c7702e8.tar.xz yuzu-69ee9edd8d769ca14b812a6c0dbba45b2c7702e8.zip | |
memory: Add regions for map region, "new" map region, etc.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/memory.h | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/src/core/memory.h b/src/core/memory.h index f3ace7a98..f406cc848 100644 --- a/src/core/memory.h +++ b/src/core/memory.h | |||
| @@ -129,21 +129,6 @@ enum : VAddr { | |||
| 129 | PROCESS_IMAGE_MAX_SIZE = 0x08000000, | 129 | PROCESS_IMAGE_MAX_SIZE = 0x08000000, |
| 130 | PROCESS_IMAGE_VADDR_END = PROCESS_IMAGE_VADDR + PROCESS_IMAGE_MAX_SIZE, | 130 | PROCESS_IMAGE_VADDR_END = PROCESS_IMAGE_VADDR + PROCESS_IMAGE_MAX_SIZE, |
| 131 | 131 | ||
| 132 | /// Area where IPC buffers are mapped onto. | ||
| 133 | IPC_MAPPING_VADDR = 0x04000000, | ||
| 134 | IPC_MAPPING_SIZE = 0x04000000, | ||
| 135 | IPC_MAPPING_VADDR_END = IPC_MAPPING_VADDR + IPC_MAPPING_SIZE, | ||
| 136 | |||
| 137 | /// Application heap (includes stack). | ||
| 138 | HEAP_VADDR = 0x108000000, | ||
| 139 | HEAP_SIZE = 0xF0000000, | ||
| 140 | HEAP_VADDR_END = HEAP_VADDR + HEAP_SIZE, | ||
| 141 | |||
| 142 | /// Area where shared memory buffers are mapped onto. | ||
| 143 | SHARED_MEMORY_VADDR = 0x10000000, | ||
| 144 | SHARED_MEMORY_SIZE = 0x04000000, | ||
| 145 | SHARED_MEMORY_VADDR_END = SHARED_MEMORY_VADDR + SHARED_MEMORY_SIZE, | ||
| 146 | |||
| 147 | /// Maps 1:1 to an offset in FCRAM. Used for HW allocations that need to be linear in physical | 132 | /// Maps 1:1 to an offset in FCRAM. Used for HW allocations that need to be linear in physical |
| 148 | /// memory. | 133 | /// memory. |
| 149 | LINEAR_HEAP_VADDR = 0x14000000, | 134 | LINEAR_HEAP_VADDR = 0x14000000, |
| @@ -176,14 +161,39 @@ enum : VAddr { | |||
| 176 | SHARED_PAGE_SIZE = 0x00001000, | 161 | SHARED_PAGE_SIZE = 0x00001000, |
| 177 | SHARED_PAGE_VADDR_END = SHARED_PAGE_VADDR + SHARED_PAGE_SIZE, | 162 | SHARED_PAGE_VADDR_END = SHARED_PAGE_VADDR + SHARED_PAGE_SIZE, |
| 178 | 163 | ||
| 179 | /// Area where TLS (Thread-Local Storage) buffers are allocated. | ||
| 180 | TLS_AREA_VADDR = 0x228000000, | ||
| 181 | TLS_ENTRY_SIZE = 0x200, | ||
| 182 | |||
| 183 | /// Equivalent to LINEAR_HEAP_VADDR, but expanded to cover the extra memory in the New 3DS. | 164 | /// Equivalent to LINEAR_HEAP_VADDR, but expanded to cover the extra memory in the New 3DS. |
| 184 | NEW_LINEAR_HEAP_VADDR = 0x30000000, | 165 | NEW_LINEAR_HEAP_VADDR = 0x30000000, |
| 185 | NEW_LINEAR_HEAP_SIZE = 0x10000000, | 166 | NEW_LINEAR_HEAP_SIZE = 0x10000000, |
| 186 | NEW_LINEAR_HEAP_VADDR_END = NEW_LINEAR_HEAP_VADDR + NEW_LINEAR_HEAP_SIZE, | 167 | NEW_LINEAR_HEAP_VADDR_END = NEW_LINEAR_HEAP_VADDR + NEW_LINEAR_HEAP_SIZE, |
| 168 | |||
| 169 | /// Area where TLS (Thread-Local Storage) buffers are allocated. | ||
| 170 | TLS_AREA_VADDR = NEW_LINEAR_HEAP_VADDR_END, | ||
| 171 | TLS_ENTRY_SIZE = 0x200, | ||
| 172 | TLS_AREA_SIZE = 0x10000000, | ||
| 173 | TLS_ADREA_VADDR_END = TLS_AREA_VADDR + TLS_AREA_SIZE, | ||
| 174 | |||
| 175 | /// Application stack | ||
| 176 | STACK_VADDR = TLS_ADREA_VADDR_END, | ||
| 177 | STACK_SIZE = 0x10000, | ||
| 178 | STACK_VADDR_END = STACK_VADDR + STACK_SIZE, | ||
| 179 | |||
| 180 | /// Application heap | ||
| 181 | /// Size is confirmed to be a static value on fw 3.0.0 | ||
| 182 | HEAP_VADDR = 0x108000000, | ||
| 183 | HEAP_SIZE = 0x180000000, | ||
| 184 | HEAP_VADDR_END = HEAP_VADDR + HEAP_SIZE, | ||
| 185 | |||
| 186 | /// New map region | ||
| 187 | /// Size is confirmed to be a static value on fw 3.0.0 | ||
| 188 | NEW_MAP_REGION_VADDR = HEAP_VADDR_END, | ||
| 189 | NEW_MAP_REGION_SIZE = 0x80000000, | ||
| 190 | NEW_MAP_REGION_VADDR_END = NEW_MAP_REGION_VADDR + NEW_MAP_REGION_SIZE, | ||
| 191 | |||
| 192 | /// Map region | ||
| 193 | /// Size is confirmed to be a static value on fw 3.0.0 | ||
| 194 | MAP_REGION_VADDR = NEW_MAP_REGION_VADDR_END, | ||
| 195 | MAP_REGION_SIZE = 0x1000000000, | ||
| 196 | MAP_REGION_VADDR_END = MAP_REGION_VADDR + MAP_REGION_SIZE, | ||
| 187 | }; | 197 | }; |
| 188 | 198 | ||
| 189 | /// Currently active page table | 199 | /// Currently active page table |