mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-21 18:22:33 +01:00
sys_rsx: Outlaw mapping sys_vm memory to RSX IO address-space
This commit is contained in:
parent
a0040e6fb1
commit
6ee9d0f35f
@ -231,7 +231,7 @@ CellError process_is_spu_lock_line_reservation_address(u32 addr, u64 flags)
|
||||
return CELL_EPERM;
|
||||
default:
|
||||
{
|
||||
if (auto vm0 = idm::get<sys_vm_t>(sys_vm_t::find_id(addr & -0x1000'0000)))
|
||||
if (auto vm0 = idm::get<sys_vm_t>(sys_vm_t::find_id(addr)))
|
||||
{
|
||||
// sys_vm area was not covering the address specified but made a reservation on the entire 256mb region
|
||||
if (vm0->addr + vm0->size - 1 < addr)
|
||||
|
@ -6,7 +6,9 @@
|
||||
#include "Emu/Cell/timers.hpp"
|
||||
#include "Emu/Memory/vm_locking.h"
|
||||
#include "Emu/RSX/RSXThread.h"
|
||||
#include "util/asm.hpp"
|
||||
#include "sys_event.h"
|
||||
#include "sys_vm.h"
|
||||
|
||||
LOG_CHANNEL(sys_rsx);
|
||||
|
||||
@ -324,6 +326,12 @@ error_code sys_rsx_context_iomap(cpu_thread& cpu, u32 context_id, u32 io, u32 ea
|
||||
{
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
if ((addr == ea || !(addr % 0x1000'0000)) && idm::check<sys_vm_t>(sys_vm_t::find_id(addr)))
|
||||
{
|
||||
// Virtual memory is disallowed
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
io >>= 20, ea >>= 20, size >>= 20;
|
||||
|
Loading…
Reference in New Issue
Block a user