mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-10 10:09:22 +00:00
cellgcm: use offset table to get the corresponding address to io address
This commit is contained in:
parent
c2b2dee56d
commit
ce98c962f8
1 changed files with 6 additions and 3 deletions
|
@ -919,12 +919,15 @@ s32 cellGcmIoOffsetToAddress(u32 ioOffset, vm::ptr<u32> address)
|
||||||
{
|
{
|
||||||
cellGcmSys.trace("cellGcmIoOffsetToAddress(ioOffset=0x%x, address=*0x%x)", ioOffset, address);
|
cellGcmSys.trace("cellGcmIoOffsetToAddress(ioOffset=0x%x, address=*0x%x)", ioOffset, address);
|
||||||
|
|
||||||
u32 realAddr;
|
const u32 upper12Bits = offsetTable.eaAddress[ioOffset >> 20];
|
||||||
|
|
||||||
if (!RSXIOMem.getRealAddr(ioOffset, realAddr))
|
if (static_cast<s16>(upper12Bits) < 0)
|
||||||
|
{
|
||||||
|
cellGcmSys.error("cellGcmIoOffsetToAddress: CELL_GCM_ERROR_FAILURE");
|
||||||
return CELL_GCM_ERROR_FAILURE;
|
return CELL_GCM_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
*address = realAddr;
|
*address = (upper12Bits << 20) | (ioOffset & 0xFFFFF);
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue