mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 07:51:28 +12:00
SPU loader fix
This commit is contained in:
parent
ea1bad8724
commit
936aeed0a5
2 changed files with 16 additions and 5 deletions
|
@ -86,7 +86,16 @@ namespace loader
|
|||
{
|
||||
case MACHINE_MIPS: break;
|
||||
case MACHINE_ARM: arm7_thread(m_ehdr.is_le() ? m_ehdr.data_le.e_entry : m_ehdr.data_be.e_entry, "main_thread").args({ Emu.GetPath()/*, "-emu"*/ }).run(); break;
|
||||
case MACHINE_SPU: spu_thread(m_ehdr.is_le() ? m_ehdr.data_le.e_entry : m_ehdr.data_be.e_entry, "main_thread").args({ Emu.GetPath()/*, "-emu"*/ }).run(); break;
|
||||
case MACHINE_SPU:
|
||||
{
|
||||
if (!Emu.IsStopped())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
spu_thread(m_ehdr.is_le() ? m_ehdr.data_le.e_entry : m_ehdr.data_be.e_entry, "main_thread").args({ Emu.GetPath()/*, "-emu"*/ }).run();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
|
@ -94,6 +103,8 @@ namespace loader
|
|||
|
||||
handler::error_code elf32::load_data(u32 offset)
|
||||
{
|
||||
Elf_Machine machine = (Elf_Machine)(u16)(m_ehdr.is_le() ? m_ehdr.data_le.e_machine : m_ehdr.data_be.e_machine);
|
||||
|
||||
for (auto &phdr : m_phdrs)
|
||||
{
|
||||
u32 memsz = m_ehdr.is_le() ? phdr.data_le.p_memsz : phdr.data_be.p_memsz;
|
||||
|
@ -106,7 +117,7 @@ namespace loader
|
|||
case 0x00000001: //LOAD
|
||||
if (phdr.data_le.p_memsz)
|
||||
{
|
||||
if (!vm::alloc(vaddr, memsz, vm::main))
|
||||
if (machine != MACHINE_SPU && !vm::alloc(vaddr, memsz, vm::main))
|
||||
{
|
||||
LOG_ERROR(LOADER, "%s(): AllocFixed(0x%llx, 0x%x) failed", __FUNCTION__, vaddr, memsz);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue