mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-15 23:09:09 +00:00
Log as error for null pointer
This commit is contained in:
parent
3662c4e9bf
commit
5597f95aba
1 changed files with 202 additions and 122 deletions
|
@ -9,11 +9,13 @@ Module cellSpurs(0x000a, cellSpurs_init);
|
||||||
int cellSpursInitialize(mem_ptr_t<CellSpurs> spurs, int nSpus, int spuPriority,
|
int cellSpursInitialize(mem_ptr_t<CellSpurs> spurs, int nSpus, int spuPriority,
|
||||||
int ppuPriority, bool exitIfNoWork)
|
int ppuPriority, bool exitIfNoWork)
|
||||||
{
|
{
|
||||||
cellSpurs.Warning("cellSpursInitialize(spurs_addr=0x%x, nSpus=%u, spuPriority=%u, ppuPriority=%u, exitIfNoWork=%u)",
|
cellSpurs.Warning("cellSpursInitialize(spurs_addr=0x%x, nSpus=%u, spuPriority=%u, ppuPriority=%u, exitIfNoWork=%u)", spurs.GetAddr(), nSpus, spuPriority, ppuPriority, exitIfNoWork);
|
||||||
spurs.GetAddr(), nSpus, spuPriority, ppuPriority, exitIfNoWork);
|
|
||||||
|
|
||||||
if(!spurs.IsGood())
|
if (!spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursInitialize : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
SPURSManagerAttribute *attr = new SPURSManagerAttribute(nSpus, spuPriority, ppuPriority, exitIfNoWork);
|
SPURSManagerAttribute *attr = new SPURSManagerAttribute(nSpus, spuPriority, ppuPriority, exitIfNoWork);
|
||||||
spurs->spurs = new SPURSManager(attr);
|
spurs->spurs = new SPURSManager(attr);
|
||||||
|
@ -25,8 +27,11 @@ int cellSpursFinalize(mem_ptr_t<CellSpurs> spurs)
|
||||||
{
|
{
|
||||||
cellSpurs.Warning("cellSpursFinalize(spurs_addr=0x%x)", spurs.GetAddr());
|
cellSpurs.Warning("cellSpursFinalize(spurs_addr=0x%x)", spurs.GetAddr());
|
||||||
|
|
||||||
if(!spurs.IsGood())
|
if (!spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursFinalize : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
spurs->spurs->Finalize();
|
spurs->spurs->Finalize();
|
||||||
|
|
||||||
|
@ -38,8 +43,11 @@ int cellSpursInitializeWithAttribute(mem_ptr_t<CellSpurs> spurs, const mem_ptr_t
|
||||||
cellSpurs.Warning("cellSpursInitializeWithAttribute(spurs_addr=0x%x, spurs_addr=0x%x)",
|
cellSpurs.Warning("cellSpursInitializeWithAttribute(spurs_addr=0x%x, spurs_addr=0x%x)",
|
||||||
spurs.GetAddr(), attr.GetAddr());
|
spurs.GetAddr(), attr.GetAddr());
|
||||||
|
|
||||||
if(!attr.IsGood() || !spurs.IsGood())
|
if (!attr.IsGood() || !spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursInitializeWithAttribute : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
spurs->spurs = new SPURSManager(attr->attr);
|
spurs->spurs = new SPURSManager(attr->attr);
|
||||||
|
|
||||||
|
@ -51,22 +59,26 @@ int cellSpursInitializeWithAttribute2(mem_ptr_t<CellSpurs2> spurs, const mem_ptr
|
||||||
cellSpurs.Warning("cellSpursInitializeWithAttribute2(spurs_addr=0x%x, spurs_addr=0x%x)",
|
cellSpurs.Warning("cellSpursInitializeWithAttribute2(spurs_addr=0x%x, spurs_addr=0x%x)",
|
||||||
spurs.GetAddr(), attr.GetAddr());
|
spurs.GetAddr(), attr.GetAddr());
|
||||||
|
|
||||||
if(!attr.IsGood() || !spurs.IsGood())
|
if (!attr.IsGood() || !spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursInitializeWithAttribute2 : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
spurs->spurs = new SPURSManager(attr->attr);
|
spurs->spurs = new SPURSManager(attr->attr);
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _cellSpursAttributeInitialize(mem_ptr_t<CellSpursAttribute> attr, int nSpus, int spuPriority,
|
int _cellSpursAttributeInitialize(mem_ptr_t<CellSpursAttribute> attr, int nSpus, int spuPriority, int ppuPriority, bool exitIfNoWork)
|
||||||
int ppuPriority, bool exitIfNoWork)
|
|
||||||
{
|
{
|
||||||
cellSpurs.Warning("_cellSpursAttributeInitialize(attr_addr=0x%x, nSpus=%u, spuPriority=%u, ppuPriority=%u, exitIfNoWork=%u)",
|
cellSpurs.Warning("_cellSpursAttributeInitialize(attr_addr=0x%x, nSpus=%u, spuPriority=%u, ppuPriority=%u, exitIfNoWork=%u)", attr.GetAddr(), nSpus, spuPriority, ppuPriority, exitIfNoWork);
|
||||||
attr.GetAddr(), nSpus, spuPriority, ppuPriority, exitIfNoWork);
|
|
||||||
|
|
||||||
if(!attr.IsGood())
|
if (!attr.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("_cellSpursAttributeInitialize : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
attr->attr = new SPURSManagerAttribute(nSpus, spuPriority, ppuPriority, exitIfNoWork);
|
attr->attr = new SPURSManagerAttribute(nSpus, spuPriority, ppuPriority, exitIfNoWork);
|
||||||
|
|
||||||
|
@ -75,11 +87,13 @@ int _cellSpursAttributeInitialize(mem_ptr_t<CellSpursAttribute> attr, int nSpus,
|
||||||
|
|
||||||
int cellSpursAttributeSetMemoryContainerForSpuThread(mem_ptr_t<CellSpursAttribute> attr, u32 container)
|
int cellSpursAttributeSetMemoryContainerForSpuThread(mem_ptr_t<CellSpursAttribute> attr, u32 container)
|
||||||
{
|
{
|
||||||
cellSpurs.Warning("cellSpursAttributeSetMemoryContainerForSpuThread(attr_addr=0x%x, container=0x%x)",
|
cellSpurs.Warning("cellSpursAttributeSetMemoryContainerForSpuThread(attr_addr=0x%x, container=0x%x)", attr.GetAddr(), container);
|
||||||
attr.GetAddr(), container);
|
|
||||||
|
|
||||||
if(!attr.IsGood())
|
if (!attr.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursAttributeSetMemoryContainerForSpuThread : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
attr->attr->_setMemoryContainerForSpuThread(container);
|
attr->attr->_setMemoryContainerForSpuThread(container);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
|
@ -87,13 +101,15 @@ int cellSpursAttributeSetMemoryContainerForSpuThread(mem_ptr_t<CellSpursAttribut
|
||||||
|
|
||||||
int cellSpursAttributeSetNamePrefix(mem_ptr_t<CellSpursAttribute> attr, const mem8_t prefix, u32 size)
|
int cellSpursAttributeSetNamePrefix(mem_ptr_t<CellSpursAttribute> attr, const mem8_t prefix, u32 size)
|
||||||
{
|
{
|
||||||
cellSpurs.Warning("cellSpursAttributeSetNamePrefix(attr_addr=0x%x, prefix_addr=0x%x, size=0x%x)",
|
cellSpurs.Warning("cellSpursAttributeSetNamePrefix(attr_addr=0x%x, prefix_addr=0x%x, size=0x%x)", attr.GetAddr(), prefix.GetAddr(), size);
|
||||||
attr.GetAddr(), prefix.GetAddr(), size);
|
|
||||||
|
|
||||||
if(!attr.IsGood() || !prefix.IsGood())
|
if (!attr.IsGood() || !prefix.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursAttributeSetNamePrefix : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
if(size > 15)
|
if (size > 15)
|
||||||
return CELL_SPURS_CORE_ERROR_INVAL;
|
return CELL_SPURS_CORE_ERROR_INVAL;
|
||||||
|
|
||||||
attr->attr->_setNamePrefix(Memory.ReadString(prefix.GetAddr(), size).c_str(), size);
|
attr->attr->_setNamePrefix(Memory.ReadString(prefix.GetAddr(), size).c_str(), size);
|
||||||
|
@ -105,8 +121,11 @@ int cellSpursAttributeEnableSpuPrintfIfAvailable(mem_ptr_t<CellSpursAttribute> a
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursAttributeEnableSpuPrintfIfAvailable(attr_addr=0x%x)", attr.GetAddr());
|
cellSpurs.Error("cellSpursAttributeEnableSpuPrintfIfAvailable(attr_addr=0x%x)", attr.GetAddr());
|
||||||
|
|
||||||
if(!attr.IsGood())
|
if (!attr.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursAttributeEnableSpuPrintfIfAvailable : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -121,8 +140,11 @@ int cellSpursAttributeSetSpuThreadGroupType(mem_ptr_t<CellSpursAttribute> attr,
|
||||||
{
|
{
|
||||||
cellSpurs.Warning("cellSpursAttributeSetSpuThreadGroupType(attr_addr=0x%x, type=%u)", attr.GetAddr(), type);
|
cellSpurs.Warning("cellSpursAttributeSetSpuThreadGroupType(attr_addr=0x%x, type=%u)", attr.GetAddr(), type);
|
||||||
|
|
||||||
if(!attr.IsGood())
|
if (!attr.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursAttributeSetSpuThreadGroupType : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
attr->attr->_setSpuThreadGroupType(type);
|
attr->attr->_setSpuThreadGroupType(type);
|
||||||
|
|
||||||
|
@ -132,14 +154,16 @@ int cellSpursAttributeSetSpuThreadGroupType(mem_ptr_t<CellSpursAttribute> attr,
|
||||||
int cellSpursAttributeEnableSystemWorkload(mem_ptr_t<CellSpursAttribute> attr, const u8 priority[CELL_SPURS_MAX_SPU],
|
int cellSpursAttributeEnableSystemWorkload(mem_ptr_t<CellSpursAttribute> attr, const u8 priority[CELL_SPURS_MAX_SPU],
|
||||||
u32 maxSpu, const bool isPreemptible[CELL_SPURS_MAX_SPU])
|
u32 maxSpu, const bool isPreemptible[CELL_SPURS_MAX_SPU])
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursAttributeEnableSystemWorkload(attr_addr=0x%x, priority[%u], maxSpu=%u, isPreemptible[%u])",
|
cellSpurs.Error("cellSpursAttributeEnableSystemWorkload(attr_addr=0x%x, priority[%u], maxSpu=%u, isPreemptible[%u])", attr.GetAddr(), priority, maxSpu, isPreemptible);
|
||||||
attr.GetAddr(), priority, maxSpu, isPreemptible);
|
|
||||||
|
|
||||||
if(!attr.IsGood())
|
if (!attr.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursAttributeEnableSystemWorkload : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < CELL_SPURS_MAX_SPU; i++)
|
for (int i = 0; i < CELL_SPURS_MAX_SPU; i++)
|
||||||
if(priority[i] != 1 || maxSpu == 0)
|
if (priority[i] != 1 || maxSpu == 0)
|
||||||
return CELL_SPURS_CORE_ERROR_INVAL;
|
return CELL_SPURS_CORE_ERROR_INVAL;
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
|
@ -147,88 +171,104 @@ int cellSpursAttributeEnableSystemWorkload(mem_ptr_t<CellSpursAttribute> attr, c
|
||||||
|
|
||||||
int cellSpursGetSpuThreadGroupId(mem_ptr_t<CellSpurs> spurs, mem32_t group)
|
int cellSpursGetSpuThreadGroupId(mem_ptr_t<CellSpurs> spurs, mem32_t group)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursGetSpuThreadGroupId(spurs_addr=0x%x, group_addr=0x%x)",
|
cellSpurs.Error("cellSpursGetSpuThreadGroupId(spurs_addr=0x%x, group_addr=0x%x)", spurs.GetAddr(), group.GetAddr());
|
||||||
spurs.GetAddr(), group.GetAddr());
|
|
||||||
|
|
||||||
if(!spurs.IsGood() || group.IsGood())
|
if (!spurs.IsGood() || group.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursGetSpuThreadGroupId : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursGetNumSpuThread(mem_ptr_t<CellSpurs> spurs, mem32_t nThreads)
|
int cellSpursGetNumSpuThread(mem_ptr_t<CellSpurs> spurs, mem32_t nThreads)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursGetNumSpuThread(spurs_addr=0x%x, nThreads_addr=0x%x)",
|
cellSpurs.Error("cellSpursGetNumSpuThread(spurs_addr=0x%x, nThreads_addr=0x%x)", spurs.GetAddr(), nThreads.GetAddr());
|
||||||
spurs.GetAddr(), nThreads.GetAddr());
|
|
||||||
|
|
||||||
if(!spurs.IsGood() || nThreads.IsGood())
|
if (!spurs.IsGood() || nThreads.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursGetNumSpuThread : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursGetSpuThreadId(mem_ptr_t<CellSpurs> spurs, mem32_t thread, mem32_t nThreads)
|
int cellSpursGetSpuThreadId(mem_ptr_t<CellSpurs> spurs, mem32_t thread, mem32_t nThreads)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursGetSpuThreadId(spurs_addr=0x%x, thread_addr=0x%x, nThreads_addr=0x%x)",
|
cellSpurs.Error("cellSpursGetSpuThreadId(spurs_addr=0x%x, thread_addr=0x%x, nThreads_addr=0x%x)", spurs.GetAddr(), thread.GetAddr(), nThreads.GetAddr());
|
||||||
spurs.GetAddr(), thread.GetAddr(), nThreads.GetAddr());
|
|
||||||
|
|
||||||
if(!spurs.IsGood() || !thread.IsGood() || nThreads.IsGood())
|
if (!spurs.IsGood() || !thread.IsGood() || nThreads.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursGetSpuThreadId : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursSetMaxContention(mem_ptr_t<CellSpurs> spurs, u32 workloadId, u32 maxContention)
|
int cellSpursSetMaxContention(mem_ptr_t<CellSpurs> spurs, u32 workloadId, u32 maxContention)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursSetMaxContention(spurs_addr=0x%x, workloadId=%u, maxContention=%u)",
|
cellSpurs.Error("cellSpursSetMaxContention(spurs_addr=0x%x, workloadId=%u, maxContention=%u)", spurs.GetAddr(), workloadId, maxContention);
|
||||||
spurs.GetAddr(), workloadId, maxContention);
|
|
||||||
|
|
||||||
if(!spurs.IsGood())
|
if (!spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursSetMaxContention : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursSetPriorities(mem_ptr_t<CellSpurs> spurs, u32 workloadId, const u8 priorities[CELL_SPURS_MAX_SPU])
|
int cellSpursSetPriorities(mem_ptr_t<CellSpurs> spurs, u32 workloadId, const u8 priorities[CELL_SPURS_MAX_SPU])
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursSetPriorities(spurs_addr=0x%x, workloadId=%u, priorities[%u])",
|
cellSpurs.Error("cellSpursSetPriorities(spurs_addr=0x%x, workloadId=%u, priorities[%u])", spurs.GetAddr(), workloadId, priorities);
|
||||||
spurs.GetAddr(), workloadId, priorities);
|
|
||||||
|
|
||||||
if(!spurs.IsGood())
|
if (!spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursSetPriorities : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursSetPriority(mem_ptr_t<CellSpurs> spurs, u32 workloadId, u32 spuId, u32 priority)
|
int cellSpursSetPriority(mem_ptr_t<CellSpurs> spurs, u32 workloadId, u32 spuId, u32 priority)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursSetPriority(spurs_addr=0x%x, workloadId=%u, spuId=%u, priority=%u)",
|
cellSpurs.Error("cellSpursSetPriority(spurs_addr=0x%x, workloadId=%u, spuId=%u, priority=%u)", spurs.GetAddr(), workloadId, spuId, priority);
|
||||||
spurs.GetAddr(), workloadId, spuId, priority);
|
|
||||||
|
|
||||||
if(!spurs.IsGood())
|
if (!spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursSetPriority : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursSetPreemptionVictimHints(mem_ptr_t<CellSpurs> spurs, const bool isPreemptible[CELL_SPURS_MAX_SPU])
|
int cellSpursSetPreemptionVictimHints(mem_ptr_t<CellSpurs> spurs, const bool isPreemptible[CELL_SPURS_MAX_SPU])
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursSetPreemptionVictimHints(spurs_addr=0x%x, isPreemptible[%u])",
|
cellSpurs.Error("cellSpursSetPreemptionVictimHints(spurs_addr=0x%x, isPreemptible[%u])", spurs.GetAddr(), isPreemptible);
|
||||||
spurs.GetAddr(), isPreemptible);
|
|
||||||
|
|
||||||
if(!spurs.IsGood())
|
if (!spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursSetPreemptionVictimHints : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursAttachLv2EventQueue(mem_ptr_t<CellSpurs> spurs, u32 queue, mem8_t port, int isDynamic)
|
int cellSpursAttachLv2EventQueue(mem_ptr_t<CellSpurs> spurs, u32 queue, mem8_t port, int isDynamic)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursAttachLv2EventQueue(spurs_addr=0x%x, queue=0x%x, port_addr=0x%x, isDynamic=%u)",
|
cellSpurs.Error("cellSpursAttachLv2EventQueue(spurs_addr=0x%x, queue=0x%x, port_addr=0x%x, isDynamic=%u)", spurs.GetAddr(), queue, port.GetAddr(), isDynamic);
|
||||||
spurs.GetAddr(), queue, port.GetAddr(), isDynamic);
|
|
||||||
|
|
||||||
if(!spurs.IsGood() || !port.IsGood())
|
if (!spurs.IsGood() || !port.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursAttachLv2EventQueue : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -237,20 +277,26 @@ int cellSpursDetachLv2EventQueue(mem_ptr_t<CellSpurs> spurs, u8 port)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursDetachLv2EventQueue(spurs_addr=0x%x, port=0x%x)", spurs.GetAddr(), port);
|
cellSpurs.Error("cellSpursDetachLv2EventQueue(spurs_addr=0x%x, port=0x%x)", spurs.GetAddr(), port);
|
||||||
|
|
||||||
if(!spurs.IsGood())
|
if (!spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursDetachLv2EventQueue : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _cellSpursEventFlagInitialize(mem_ptr_t<CellSpurs> spurs, mem_ptr_t<CellSpursTaskset> taskset,
|
int _cellSpursEventFlagInitialize(mem_ptr_t<CellSpurs> spurs, mem_ptr_t<CellSpursTaskset> taskset, mem_ptr_t<CellSpursEventFlag> eventFlag, u32 flagClearMode, u32 flagDirection)
|
||||||
mem_ptr_t<CellSpursEventFlag> eventFlag, u32 flagClearMode, u32 flagDirection)
|
|
||||||
{
|
{
|
||||||
cellSpurs.Error("_cellSpursEventFlagInitialize(spurs_addr=0x%x, taskset_addr=0x%x, eventFlag_addr=0x%x, flagClearMode=%u, flagDirection=%u)",
|
cellSpurs.Error("_cellSpursEventFlagInitialize(spurs_addr=0x%x, taskset_addr=0x%x, eventFlag_addr=0x%x, flagClearMode=%u, flagDirection=%u)", spurs.GetAddr(), taskset.GetAddr(), eventFlag.GetAddr(), flagClearMode, flagDirection);
|
||||||
spurs.GetAddr(), taskset.GetAddr(), eventFlag.GetAddr(), flagClearMode, flagDirection);
|
|
||||||
|
|
||||||
if(!spurs.IsGood() || !taskset.IsGood() || !eventFlag.IsGood())
|
// Somehow Arkedo Series 01/02/03 always return spurs_addr as 0x0 but not other titles .Temporarily disable this memory checking.
|
||||||
|
/* if (!spurs.IsGood() || !taskset.IsGood() || !eventFlag.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("_cellSpursEventFlagInitialize : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -259,8 +305,11 @@ int cellSpursEventFlagAttachLv2EventQueue(mem_ptr_t<CellSpursEventFlag> event_fl
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursEventFlagAttachLv2EventQueue(event_flag_addr=0x%x)", event_flag.GetAddr());
|
cellSpurs.Error("cellSpursEventFlagAttachLv2EventQueue(event_flag_addr=0x%x)", event_flag.GetAddr());
|
||||||
|
|
||||||
if(!event_flag.IsGood())
|
if (!event_flag.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursEventFlagAttachLv2EventQueue : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -269,19 +318,24 @@ int cellSpursEventFlagDetachLv2EventQueue(mem_ptr_t<CellSpursEventFlag> event_fl
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursEventFlagDetachLv2EventQueue(event_flag_addr=0x%x)", event_flag.GetAddr());
|
cellSpurs.Error("cellSpursEventFlagDetachLv2EventQueue(event_flag_addr=0x%x)", event_flag.GetAddr());
|
||||||
|
|
||||||
if(!event_flag.IsGood())
|
if (!event_flag.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursEventFlagDetachLv2EventQueue : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursEventFlagWait(mem_ptr_t<CellSpursEventFlag> event_flag, mem16_t flag_bits, u32 wait_mode)
|
int cellSpursEventFlagWait(mem_ptr_t<CellSpursEventFlag> event_flag, mem16_t flag_bits, u32 wait_mode)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursEventFlagWait(event_flag_addr=0x%x, flag_bits_addr=0x%x, wait_mode=%u)",
|
cellSpurs.Error("cellSpursEventFlagWait(event_flag_addr=0x%x, flag_bits_addr=0x%x, wait_mode=%u)", event_flag.GetAddr(), flag_bits.GetAddr(), wait_mode);
|
||||||
event_flag.GetAddr(), flag_bits.GetAddr(), wait_mode);
|
|
||||||
|
|
||||||
if(!event_flag.IsGood() || !flag_bits.IsGood())
|
if (!event_flag.IsGood() || !flag_bits.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursEventFlagWait : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -368,20 +422,24 @@ int cellSpursEnableExceptionEventHandler(mem_ptr_t<CellSpurs> spurs, bool flag)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursEnableExceptionEventHandler(spurs_addr=0x%x, flag=%u)", spurs.GetAddr(), flag);
|
cellSpurs.Error("cellSpursEnableExceptionEventHandler(spurs_addr=0x%x, flag=%u)", spurs.GetAddr(), flag);
|
||||||
|
|
||||||
if(!spurs.IsGood())
|
if (!spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursEnableExceptionEventHandler : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursSetGlobalExceptionEventHandler(mem_ptr_t<CellSpurs> spurs,
|
int cellSpursSetGlobalExceptionEventHandler(mem_ptr_t<CellSpurs> spurs, mem_func_ptr_t<CellSpursGlobalExceptionEventHandler> eaHandler, mem_ptr_t<void> arg)
|
||||||
mem_func_ptr_t<CellSpursGlobalExceptionEventHandler> eaHandler, mem_ptr_t<void> arg)
|
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursEnableExceptionEventHandler(spurs_addr=0x%x, eaHandler_addr=0x%x, arg_addr=0x%x,)",
|
cellSpurs.Error("cellSpursEnableExceptionEventHandler(spurs_addr=0x%x, eaHandler_addr=0x%x, arg_addr=0x%x,)", spurs.GetAddr(), eaHandler.GetAddr(), arg.GetAddr());
|
||||||
spurs.GetAddr(), eaHandler.GetAddr(), arg.GetAddr());
|
|
||||||
|
|
||||||
if(!spurs.IsGood() || eaHandler.IsGood())
|
if (!spurs.IsGood() || eaHandler.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursSetGlobalExceptionEventHandler : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -390,8 +448,11 @@ int cellSpursUnsetGlobalExceptionEventHandler(mem_ptr_t<CellSpurs> spurs)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursUnsetGlobalExceptionEventHandler(spurs_addr=0x%x)", spurs.GetAddr());
|
cellSpurs.Error("cellSpursUnsetGlobalExceptionEventHandler(spurs_addr=0x%x)", spurs.GetAddr());
|
||||||
|
|
||||||
if(!spurs.IsGood())
|
if (!spurs.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursUnsetGlobalExceptionEventHandler : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -400,8 +461,11 @@ int cellSpursGetInfo(mem_ptr_t<CellSpurs> spurs, mem_ptr_t<CellSpursInfo> info)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursGetInfo(spurs_addr=0x%x, info_addr=0x%x)", spurs.GetAddr(), info.GetAddr());
|
cellSpurs.Error("cellSpursGetInfo(spurs_addr=0x%x, info_addr=0x%x)", spurs.GetAddr(), info.GetAddr());
|
||||||
|
|
||||||
if(!spurs.IsGood() || !info.IsGood())
|
if (!spurs.IsGood() || !info.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("cellSpursGetInfo : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -410,8 +474,11 @@ int _cellSpursSendSignal(mem_ptr_t<CellSpursTaskset> taskset, u32 taskID)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("_cellSpursSendSignal(taskset_addr=0x%x, taskID=%u)", taskset.GetAddr(), taskID);
|
cellSpurs.Error("_cellSpursSendSignal(taskset_addr=0x%x, taskID=%u)", taskset.GetAddr(), taskID);
|
||||||
|
|
||||||
if(!taskset.IsGood())
|
if (!taskset.IsGood())
|
||||||
|
{
|
||||||
|
cellSpurs.Error("_cellSpursSendSignal : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -452,14 +519,15 @@ int cellSpursCreateTasksetWithAttribute()
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSpursCreateTaskset(mem_ptr_t<CellSpurs> spurs, mem_ptr_t<CellSpursTaskset> taskset,
|
int cellSpursCreateTaskset(mem_ptr_t<CellSpurs> spurs, mem_ptr_t<CellSpursTaskset> taskset, u64 args, mem8_t priority, u32 maxContention)
|
||||||
u64 args, mem8_t priority, u32 maxContention)
|
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursCreateTaskset(spurs_addr=0x%x, taskset_addr=0x%x, args=0x%x, priority_addr=0x%x, maxContention=%u)",
|
cellSpurs.Error("cellSpursCreateTaskset(spurs_addr=0x%x, taskset_addr=0x%x, args=0x%x, priority_addr=0x%x, maxContention=%u)", spurs.GetAddr(), taskset.GetAddr(), args, priority.GetAddr(), maxContention);
|
||||||
spurs.GetAddr(), taskset.GetAddr(), args, priority.GetAddr(), maxContention);
|
|
||||||
|
|
||||||
if(!spurs.IsGood() || !taskset.IsGood())
|
if (!spurs.IsGood() || !taskset.IsGood())
|
||||||
return CELL_SPURS_TASK_ERROR_NULL_POINTER;
|
{
|
||||||
|
cellSpurs.Error("cellSpursCreateTaskset : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -468,8 +536,11 @@ int cellSpursJoinTaskset(mem_ptr_t<CellSpursTaskset> taskset)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursJoinTaskset(taskset_addr=0x%x)", taskset.GetAddr());
|
cellSpurs.Error("cellSpursJoinTaskset(taskset_addr=0x%x)", taskset.GetAddr());
|
||||||
|
|
||||||
if(!taskset.IsGood())
|
if (!taskset.IsGood())
|
||||||
return CELL_SPURS_TASK_ERROR_NULL_POINTER;
|
{
|
||||||
|
cellSpurs.Error("cellSpursJoinTaskset : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -478,8 +549,11 @@ int cellSpursGetTasksetId(mem_ptr_t<CellSpursTaskset> taskset, mem32_t workloadI
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursGetTasksetId(taskset_addr=0x%x, workloadId_addr=0x%x)", taskset.GetAddr(), workloadId.GetAddr());
|
cellSpurs.Error("cellSpursGetTasksetId(taskset_addr=0x%x, workloadId_addr=0x%x)", taskset.GetAddr(), workloadId.GetAddr());
|
||||||
|
|
||||||
if(!taskset.IsGood() || !workloadId.IsGood())
|
if (!taskset.IsGood() || !workloadId.IsGood())
|
||||||
return CELL_SPURS_TASK_ERROR_NULL_POINTER;
|
{
|
||||||
|
cellSpurs.Error("cellSpursGetTasksetId : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -488,8 +562,11 @@ int cellSpursShutdownTaskset(mem_ptr_t<CellSpursTaskset> taskset)
|
||||||
{
|
{
|
||||||
cellSpurs.Error("cellSpursShutdownTaskset(taskset_addr=0x%x)", taskset.GetAddr());
|
cellSpurs.Error("cellSpursShutdownTaskset(taskset_addr=0x%x)", taskset.GetAddr());
|
||||||
|
|
||||||
if(!taskset.IsGood())
|
if (!taskset.IsGood())
|
||||||
return CELL_SPURS_TASK_ERROR_NULL_POINTER;
|
{
|
||||||
|
cellSpurs.Error("cellSpursShutdownTaskset : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -501,8 +578,11 @@ int cellSpursCreateTask(mem_ptr_t<CellSpursTaskset> taskset, mem32_t taskID, mem
|
||||||
cellSpurs.Error("cellSpursCreateTask(taskset_addr=0x%x, taskID_addr=0x%x, elf_addr_addr=0x%x, context_addr_addr=0x%x, context_size=%u, lsPattern_addr=0x%x, argument_addr=0x%x)",
|
cellSpurs.Error("cellSpursCreateTask(taskset_addr=0x%x, taskID_addr=0x%x, elf_addr_addr=0x%x, context_addr_addr=0x%x, context_size=%u, lsPattern_addr=0x%x, argument_addr=0x%x)",
|
||||||
taskset.GetAddr(), taskID.GetAddr(), elf_addr.GetAddr(), context_addr.GetAddr(), context_size, lsPattern.GetAddr(), argument.GetAddr());
|
taskset.GetAddr(), taskID.GetAddr(), elf_addr.GetAddr(), context_addr.GetAddr(), context_size, lsPattern.GetAddr(), argument.GetAddr());
|
||||||
|
|
||||||
if(!taskset.IsGood())
|
if (!taskset.IsGood())
|
||||||
return CELL_SPURS_TASK_ERROR_NULL_POINTER;
|
{
|
||||||
|
cellSpurs.Error("cellSpursCreateTask : CELL_SPURS_CORE_ERROR_NULL_POINTER");
|
||||||
|
return CELL_SPURS_CORE_ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
@ -674,7 +754,7 @@ void cellSpurs_init()
|
||||||
cellSpurs.AddFunc(0xb9bc6207, cellSpursAttachLv2EventQueue);
|
cellSpurs.AddFunc(0xb9bc6207, cellSpursAttachLv2EventQueue);
|
||||||
cellSpurs.AddFunc(0x4e66d483, cellSpursDetachLv2EventQueue);
|
cellSpurs.AddFunc(0x4e66d483, cellSpursDetachLv2EventQueue);
|
||||||
cellSpurs.AddFunc(0xe0a6dbe4, _cellSpursSendSignal);
|
cellSpurs.AddFunc(0xe0a6dbe4, _cellSpursSendSignal);
|
||||||
//cellSpurs.AddFunc(0x5ef96465, _cellSpursEventFlagInitialize);
|
cellSpurs.AddFunc(0x5ef96465, _cellSpursEventFlagInitialize);
|
||||||
cellSpurs.AddFunc(0x87630976, cellSpursEventFlagAttachLv2EventQueue);
|
cellSpurs.AddFunc(0x87630976, cellSpursEventFlagAttachLv2EventQueue);
|
||||||
cellSpurs.AddFunc(0x22aab31d, cellSpursEventFlagDetachLv2EventQueue);
|
cellSpurs.AddFunc(0x22aab31d, cellSpursEventFlagDetachLv2EventQueue);
|
||||||
cellSpurs.AddFunc(0x373523d4, cellSpursEventFlagWait);
|
cellSpurs.AddFunc(0x373523d4, cellSpursEventFlagWait);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue