yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

vm_manager: Add support for storing and getting main code region

Used as root for one region of cheats, set by loader
This commit is contained in:
Zach Hilman 2018-12-22 21:29:52 -05:00
parent 4495bf5706
commit b952a30555
2 changed files with 28 additions and 0 deletions

View File

@ -786,6 +786,23 @@ u64 VMManager::GetNewMapRegionSize() const {
return new_map_region_end - new_map_region_base; return new_map_region_end - new_map_region_base;
} }
void VMManager::SetMainCodeRegion(VAddr begin, VAddr end) {
main_code_region_base = begin;
main_code_region_end = end;
}
VAddr VMManager::GetMainCodeRegionBaseAddress() const {
return main_code_region_base;
}
VAddr VMManager::GetMainCodeRegionEndAddress() const {
return main_code_region_end;
}
u64 VMManager::GetMainCodeRegionSize() const {
return main_code_region_end - main_code_region_base;
}
VAddr VMManager::GetTLSIORegionBaseAddress() const { VAddr VMManager::GetTLSIORegionBaseAddress() const {
return tls_io_region_base; return tls_io_region_base;
} }

View File

@ -480,6 +480,14 @@ public:
/// Gets the total size of the new map region in bytes. /// Gets the total size of the new map region in bytes.
u64 GetNewMapRegionSize() const; u64 GetNewMapRegionSize() const;
void SetMainCodeRegion(VAddr begin, VAddr end);
VAddr GetMainCodeRegionBaseAddress() const;
VAddr GetMainCodeRegionEndAddress() const;
u64 GetMainCodeRegionSize() const;
/// Gets the base address of the TLS IO region. /// Gets the base address of the TLS IO region.
VAddr GetTLSIORegionBaseAddress() const; VAddr GetTLSIORegionBaseAddress() const;
@ -598,6 +606,9 @@ private:
VAddr new_map_region_base = 0; VAddr new_map_region_base = 0;
VAddr new_map_region_end = 0; VAddr new_map_region_end = 0;
VAddr main_code_region_base = 0;
VAddr main_code_region_end = 0;
VAddr tls_io_region_base = 0; VAddr tls_io_region_base = 0;
VAddr tls_io_region_end = 0; VAddr tls_io_region_end = 0;