mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-29 21:44:50 +00:00
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:
parent
f15ffe87b6
commit
f57583168d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user