Skip to content

Commit

Permalink
Add sys_rsx_context_iomap workaround
Browse files Browse the repository at this point in the history
Don't fail with CELL_EINVAL on vm::main.
  • Loading branch information
Nekotekina committed Jun 16, 2019
1 parent 185fd3d commit 0fe26f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_rsx.cpp
Expand Up @@ -186,7 +186,7 @@ error_code sys_rsx_context_iomap(u32 context_id, u32 io, u32 ea, u32 size, u64 f

for (u32 addr = ea, end = ea + size; addr < end; addr += 0x100000)
{
if (!vm::check_addr(addr, 1, vm::page_allocated | vm::page_1m_size))
if (!vm::check_addr(addr, 1, vm::page_allocated | (addr < 0x20000000 ? 0 : vm::page_1m_size)))
{
return CELL_EINVAL;
}
Expand Down Expand Up @@ -537,4 +537,4 @@ error_code sys_rsx_attribute(u32 packageId, u32 a2, u32 a3, u32 a4, u32 a5)
sys_rsx.warning("sys_rsx_attribute(packageId=0x%x, a2=0x%x, a3=0x%x, a4=0x%x, a5=0x%x)", packageId, a2, a3, a4, a5);

return CELL_OK;
}
}

0 comments on commit 0fe26f8

Please sign in to comment.