mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-07 03:58:09 +00:00
Fix SPU ELF loader
This commit is contained in:
parent
0055d84bd6
commit
72e6e87d82
@ -319,20 +319,18 @@ bool spu_thread::write_reg(const u32 addr, const u32 value)
|
||||
|
||||
void spu_load_exec(const spu_exec_object& elf)
|
||||
{
|
||||
auto ls0 = vm::addr_t{RAW_SPU_BASE_ADDR};
|
||||
|
||||
spu_thread::g_raw_spu_ctr++;
|
||||
|
||||
auto spu = idm::make_ptr<named_thread<spu_thread>>("TEST_SPU", nullptr, 0, "", 0);
|
||||
|
||||
for (const auto& prog : elf.progs)
|
||||
{
|
||||
if (prog.p_type == 0x1u /* LOAD */ && prog.p_memsz)
|
||||
{
|
||||
std::memcpy(vm::base(ls0 + prog.p_vaddr), prog.bin.data(), prog.p_filesz);
|
||||
std::memcpy(spu->_ptr<void>(prog.p_vaddr), prog.bin.data(), prog.p_filesz);
|
||||
}
|
||||
}
|
||||
|
||||
auto spu = idm::make_ptr<named_thread<spu_thread>>("TEST_SPU", nullptr, 0, "", 0);
|
||||
|
||||
spu_thread::g_raw_spu_id[0] = spu->id;
|
||||
|
||||
spu->status_npc = {SPU_STATUS_RUNNING, elf.header.e_entry};
|
||||
|
Loading…
Reference in New Issue
Block a user