diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-14 20:44:38 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-15 02:11:16 +0200 |
commit | 90f8474fc183387f6d2daa437dcba4f88ced9b33 (patch) | |
tree | d8cc0787a00bbbd2ce2d40a18971a29fc610cc4d /src/core/hle/kernel/vm_manager.cpp | |
parent | Merge pull request #1492 from lioncash/proc (diff) | |
download | yuzu-90f8474fc183387f6d2daa437dcba4f88ced9b33.tar yuzu-90f8474fc183387f6d2daa437dcba4f88ced9b33.tar.gz yuzu-90f8474fc183387f6d2daa437dcba4f88ced9b33.tar.bz2 yuzu-90f8474fc183387f6d2daa437dcba4f88ced9b33.tar.lz yuzu-90f8474fc183387f6d2daa437dcba4f88ced9b33.tar.xz yuzu-90f8474fc183387f6d2daa437dcba4f88ced9b33.tar.zst yuzu-90f8474fc183387f6d2daa437dcba4f88ced9b33.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index e412309fd..1e28ccbda 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -393,30 +393,35 @@ void VMManager::InitializeMemoryRegionRanges(FileSys::ProgramAddressSpaceType ty switch (type) { case FileSys::ProgramAddressSpaceType::Is32Bit: + case FileSys::ProgramAddressSpaceType::Is32BitNoMap: address_space_width = 32; code_region_base = 0x200000; code_region_end = code_region_base + 0x3FE00000; - map_region_size = 0x40000000; - heap_region_size = 0x40000000; + aslr_region_base = 0x200000; + aslr_region_end = aslr_region_base + 0xFFE00000; + if (type == FileSys::ProgramAddressSpaceType::Is32Bit) { + map_region_size = 0x40000000; + heap_region_size = 0x40000000; + } else { + map_region_size = 0; + heap_region_size = 0x80000000; + } break; case FileSys::ProgramAddressSpaceType::Is36Bit: address_space_width = 36; code_region_base = 0x8000000; code_region_end = code_region_base + 0x78000000; + aslr_region_base = 0x8000000; + aslr_region_end = aslr_region_base + 0xFF8000000; map_region_size = 0x180000000; heap_region_size = 0x180000000; break; - case FileSys::ProgramAddressSpaceType::Is32BitNoMap: - address_space_width = 32; - code_region_base = 0x200000; - code_region_end = code_region_base + 0x3FE00000; - map_region_size = 0; - heap_region_size = 0x80000000; - break; case FileSys::ProgramAddressSpaceType::Is39Bit: address_space_width = 39; code_region_base = 0x8000000; code_region_end = code_region_base + 0x80000000; + aslr_region_base = 0x8000000; + aslr_region_end = aslr_region_base + 0x7FF8000000; map_region_size = 0x1000000000; heap_region_size = 0x180000000; new_map_region_size = 0x80000000; @@ -490,6 +495,18 @@ u64 VMManager::GetAddressSpaceWidth() const { return address_space_width; } +VAddr VMManager::GetASLRRegionBaseAddress() const { + return aslr_region_base; +} + +VAddr VMManager::GetASLRRegionEndAddress() const { + return aslr_region_end; +} + +u64 VMManager::GetASLRRegionSize() const { + return aslr_region_end - aslr_region_base; +} + VAddr VMManager::GetCodeRegionBaseAddress() const { return code_region_base; } |