Hardcode hardware accurate base address

Looking at our address space, all platforms will have this base address mapped, so there shouldn't be any problem in using it.
This commit is contained in:
Stephen Miller 2025-05-03 20:14:09 -05:00
parent f15ffe87b6
commit f57583168d

View File

@ -19,6 +19,7 @@ namespace Core {
using EntryFunc = PS4_SYSV_ABI int (*)(size_t args, const void* argp, void* param);
static constexpr u64 ModuleLoadBase = 0x800000000;
static u64 LoadOffset = 0;
static u64 GetAlignedSize(const elf_program_header& phdr) {
@ -112,7 +113,7 @@ void Module::LoadModuleToMemory(u32& max_tls_index) {
// Map module segments (and possible TLS trampolines)
void** out_addr = reinterpret_cast<void**>(&base_virtual_addr);
memory->MapMemory(out_addr, memory->SystemReservedVirtualBase() + LoadOffset,
memory->MapMemory(out_addr, ModuleLoadBase + LoadOffset,
aligned_base_size + TrampolineSize, MemoryProt::CpuReadWrite,
MemoryMapFlags::Fixed, VMAType::Code, name, true);
LoadOffset += aligned_base_size + TrampolineSize;