mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
sys_memory_get_page_attribute faked correctly
This commit is contained in:
parent
6a996fcd0a
commit
1065eb17de
4 changed files with 43 additions and 10 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
#include "cellSpurs.h"
|
||||
#include "cellSpursJq.h"
|
||||
|
||||
Module* cellSpursJq = nullptr;
|
||||
|
@ -761,6 +762,39 @@ void cellSpursJq_init()
|
|||
REG_FUNC(cellSpursJq, cellSpursJobQueueUnsetExceptionEventHandler);
|
||||
|
||||
#ifdef PRX_DEBUG
|
||||
CallAfter([]()
|
||||
{
|
||||
libspurs_jq = Memory.PRXMem.AllocAlign(sizeof(libspurs_jq_data), 4096);
|
||||
memcpy(Memory + libspurs_jq, libspurs_jq_data, sizeof(libspurs_jq_data));
|
||||
libspurs_jq_rtoc = libspurs_jq + 0x17E80;
|
||||
|
||||
extern Module* sysPrxForUser;
|
||||
extern Module* cellSpurs;
|
||||
//extern Module* cellFiber;
|
||||
|
||||
FIX_IMPORT(cellSpurs, cellSpursSendWorkloadSignal , libspurs_jq + 0x6728);
|
||||
FIX_IMPORT(cellSpurs, cellSpursWorkloadAttributeSetName , libspurs_jq + 0x6748);
|
||||
FIX_IMPORT(cellSpurs, cellSpursRemoveWorkload , libspurs_jq + 0x6768);
|
||||
FIX_IMPORT(cellSpurs, cellSpursWaitForWorkloadShutdown , libspurs_jq + 0x6788);
|
||||
FIX_IMPORT(cellSpurs, cellSpursWakeUp , libspurs_jq + 0x67A8);
|
||||
FIX_IMPORT(cellSpurs, cellSpursShutdownWorkload , libspurs_jq + 0x67C8);
|
||||
FIX_IMPORT(cellSpurs, cellSpursAddWorkloadWithAttribute , libspurs_jq + 0x67E8);
|
||||
FIX_IMPORT(cellSpurs, cellSpursSetExceptionEventHandler , libspurs_jq + 0x6808);
|
||||
FIX_IMPORT(cellSpurs, _cellSpursWorkloadAttributeInitialize , libspurs_jq + 0x6828);
|
||||
FIX_IMPORT(cellSpurs, cellFiberPpuSelf , libspurs_jq + 0x6848); // !
|
||||
FIX_IMPORT(cellSpurs, cellFiberPpuWaitSignal , libspurs_jq + 0x6868); // !
|
||||
FIX_IMPORT(sysPrxForUser, _sys_strncmp , libspurs_jq + 0x6888);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_snprintf , libspurs_jq + 0x68A8);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwcond_destroy , libspurs_jq + 0x68C8);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_create , libspurs_jq + 0x68E8);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_memset , libspurs_jq + 0x6908);
|
||||
FIX_IMPORT(sysPrxForUser, _sys_printf , libspurs_jq + 0x6928);
|
||||
fix_import(sysPrxForUser, 0x9FB6228E , libspurs_jq + 0x6948);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwmutex_destroy , libspurs_jq + 0x6968);
|
||||
FIX_IMPORT(sysPrxForUser, sys_lwcond_create , libspurs_jq + 0x6988);
|
||||
fix_import(sysPrxForUser, 0xE75C40F2 , libspurs_jq + 0x69A8);
|
||||
|
||||
fix_relocs(cellSpursJq, libspurs_jq, 0xFF70, 0x12370, 0xED00);
|
||||
});
|
||||
#endif
|
||||
}
|
|
@ -414,11 +414,11 @@ void cellSync2_init()
|
|||
|
||||
extern Module* sysPrxForUser;
|
||||
extern Module* cellSpurs;
|
||||
//extern Module* cellSpursJq;
|
||||
extern Module* cellSpursJq;
|
||||
//extern Module* cellFiber;
|
||||
|
||||
FIX_IMPORT(cellSpurs, _cellSpursSendSignal , libsync2 + 0x61F0);
|
||||
FIX_IMPORT(cellSync2, cellSpursJobQueueSendSignal , libsync2 + 0x6210); // !
|
||||
FIX_IMPORT(cellSpursJq, cellSpursJobQueueSendSignal , libsync2 + 0x6210);
|
||||
FIX_IMPORT(cellSync2, cellFiberPpuUtilWorkerControlSendSignal , libsync2 + 0x6230); // !
|
||||
FIX_IMPORT(cellSync2, cellFiberPpuSelf , libsync2 + 0x6250); // !
|
||||
FIX_IMPORT(cellSync2, cellFiberPpuWaitSignal , libsync2 + 0x6270); // !
|
||||
|
|
|
@ -91,10 +91,9 @@ s32 sys_memory_get_page_attribute(u32 addr, mem_ptr_t<sys_page_attr_t> attr)
|
|||
sys_memory.Warning("sys_memory_get_page_attribute(addr=0x%x, attr_addr=0x%x)", addr, attr.GetAddr());
|
||||
|
||||
// TODO: Implement per thread page attribute setting.
|
||||
attr->attribute = 0;
|
||||
attr->page_size = 0;
|
||||
attr->access_right = 0;
|
||||
attr->pad = 0;
|
||||
attr->attribute = 0x40000ull; // SYS_MEMORY_PROT_READ_WRITE
|
||||
attr->access_right = 0xFull; // SYS_MEMORY_ACCESS_RIGHT_ANY
|
||||
attr->page_size = 4096;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -24,10 +24,10 @@ struct sys_memory_info_t
|
|||
|
||||
struct sys_page_attr_t
|
||||
{
|
||||
u64 attribute;
|
||||
u64 access_right;
|
||||
u32 page_size;
|
||||
u32 pad;
|
||||
be_t<u64> attribute;
|
||||
be_t<u64> access_right;
|
||||
be_t<u32> page_size;
|
||||
be_t<u32> pad;
|
||||
};
|
||||
|
||||
struct MemoryContainerInfo
|
||||
|
|
Loading…
Add table
Reference in a new issue