106 #define MFC_LSA 0x3004 107 #define MFC_EAH 0x3008 108 #define MFC_EAL 0x300C 109 #define MFC_Size 0x3010 110 #define MFC_Class_CMD 0x3014 111 #define MFC_CMD_Status 0x3014 112 #define MFC_QStatus 0x3104 113 #define Prxy_QueryType 0x3204 114 #define Prxy_QueryMask 0x321C 115 #define Prxy_TagStatus 0x322C 116 #define SPU_Out_MBox 0x4004 117 #define SPU_In_MBox 0x400C 118 #define SPU_MBox_Status 0x4014 119 #define SPU_RunCtrl 0x401C 120 #define SPU_Status 0x4024 121 #define SPU_NextPC 0x4034 122 #define SPU_Sig_Notify_1 0x1400C 123 #define SPU_Sig_Notify_2 0x1C00C 125 #define SPU_THREAD_ATTR_NONE 0x00 127 #define SPU_THREAD_ATTR_ASYNC_INT_ENABLE 0x01 129 #define SPU_THREAD_ATTR_DEC_SYNC_TB_ENABLE 0x02 133 #define SPU_THREAD_EVENT_USER 0x01 134 #define SPU_THREAD_EVENT_DMA 0x02 138 #define SPU_THREAD_EVENT_USER_KEY 0xFFFFFFFF53505501ULL 139 #define SPU_THREAD_EVENT_DMA_KEY 0xFFFFFFFF53505502ULL 143 #define SPU_SIGNAL1_OVERWRITE 0x00 144 #define SPU_SIGNAL1_OR 0x01 146 #define SPU_SIGNAL2_OVERWRITE 0x00 148 #define SPU_SIGNAL2_OR 0x02 152 #define SPU_THREAD_BASE 0xF0000000ULL 153 #define SPU_THREAD_OFFSET 0x00100000ULL 155 #define SPU_RAW_BASE 0xE0000000ULL 157 #define SPU_RAW_OFFSET 0x00100000ULL 159 #define SPU_LOCAL_OFFSET 0x00000000ULL 161 #define SPU_PROBLEM_OFFSET 0x00040000ULL 167 #define SPU_RAW_GET_BASE_OFFSET(spu) \ 168 (SPU_RAW_BASE + (SPU_RAW_OFFSET*(spu))) 171 #define SPU_RAW_GET_LOCAL_STORAGE(spu,reg) \ 172 (SPU_RAW_GET_BASE_OFFSET(spu) + SPU_LOCAL_OFFSET + (reg)) 175 #define SPU_RAW_GET_PROBLEM_STORAGE(spu,reg) \ 176 (SPU_RAW_GET_BASE_OFFSET(spu) + SPU_PROBLEM_OFFSET + (reg)) 181 #define SPU_THREAD_GET_BASE_OFFSET(spu) \ 182 (SPU_THREAD_BASE + (SPU_THREAD_OFFSET*(spu))) 185 #define SPU_THREAD_GET_LOCAL_STORAGE(spu,reg) \ 186 (SPU_THREAD_GET_BASE_OFFSET(spu) + SPU_LOCAL_OFFSET + (reg)) 189 #define SPU_THREAD_GET_PROBLEM_STORAGE(spu,reg) \ 190 (SPU_THREAD_GET_BASE_OFFSET(spu) + SPU_PROBLEM_OFFSET + (reg)) 238 lv2syscall2(169,spus,rawspus);
239 return_to_user_prog(s32);
252 lv2syscall2(160,(u64)spu,(u64)attributes);
253 return_to_user_prog(s32);
264 lv2syscall1(161,spu);
265 return_to_user_prog(s32);
282 lv2syscall4(150,spu,classid,hardwarethread,(u64)tag);
283 return_to_user_prog(s32);
298 lv2syscall3(151,spu,classid,mask);
299 return_to_user_prog(s32);
314 lv2syscall3(152,spu,classid,(u64)mask);
315 return_to_user_prog(s32);
330 lv2syscall3(153, spu, classid, stat);
331 return_to_user_prog(s32);
346 lv2syscall3(154, spu, classid, (u64)stat);
347 return_to_user_prog(s32);
360 lv2syscall2(163, spu, (u64)value);
361 return_to_user_prog(s32);
378 lv2syscall2(196, spu, value);
379 return_to_user_prog(s32);
397 lv2syscall2(197, spu, (u64)value);
398 return_to_user_prog(s32);
409 lv2syscall1(199, spu);
410 return_to_user_prog(s32);
423 lv2syscall2(156, (u64)image, (u64)path);
424 return_to_user_prog(s32);
439 lv2syscall3(260, (u64)image, fd, offset);
440 return_to_user_prog(s32);
461 lv2syscall6(172, (u64)thread, group, spu, (u64)image, (u64)attributes, (u64)arguments);
462 return_to_user_prog(s32);
475 lv2syscall2(166, thread, (u64)arguments);
476 return_to_user_prog(s32);
491 lv2syscall2(165, thread, (u64)status);
492 return_to_user_prog(s32);
512 lv2syscall4(191, thread, queue, type, spup);
513 return_to_user_prog(s32);
531 lv2syscall3(192, thread, type, spup);
532 return_to_user_prog(s32);
547 lv2syscall3(193, thread, queue, spuq_num);
548 return_to_user_prog(s32);
561 lv2syscall2(194, thread, spuq_num);
562 return_to_user_prog(s32);
580 lv2syscall4(181, thread, address, value, type);
581 return_to_user_prog(s32);
599 lv2syscall4(182, thread, address, (u64)value, type);
600 return_to_user_prog(s32);
617 lv2syscall3(184,thread,signal,value);
618 return_to_user_prog(s32);
636 lv2syscall2(187, thread, value);
637 return_to_user_prog(s32);
656 lv2syscall2(188, thread, (u64)value);
657 return_to_user_prog(s32);
671 lv2syscall2(190, thread, value);
672 return_to_user_prog(s32);
684 lv2syscall1(198, thread);
685 return_to_user_prog(s32);
703 lv2syscall4(170,(u64)group,num,prio,(u64)attr);
704 return_to_user_prog(s32);
716 lv2syscall1(171,group);
717 return_to_user_prog(s32);
729 lv2syscall1(173,group);
730 return_to_user_prog(s32);
742 lv2syscall1(174,group);
743 return_to_user_prog(s32);
755 lv2syscall1(175,group);
756 return_to_user_prog(s32);
768 lv2syscall1(176,group);
769 return_to_user_prog(s32);
781 lv2syscall2(177,group,value);
782 return_to_user_prog(s32);
798 lv2syscall3(178,group,(u64)cause,(u64)status);
799 return_to_user_prog(s32);
813 lv2syscall2(179,group,prio);
814 return_to_user_prog(s32);
828 lv2syscall2(180,group,(u64)prio);
829 return_to_user_prog(s32);
832 LV2_SYSCALL sysSpuThreadGroupConnectEvent(sys_spu_group_t group,sys_event_queue_t eventQ,u32 eventType)
834 lv2syscall3(185,group,eventQ,eventType);
835 return_to_user_prog(s32);
838 LV2_SYSCALL sysSpuThreadGroupDisconnectEvent(sys_spu_group_t group,u32 eventType)
840 lv2syscall2(186,group,eventType);
841 return_to_user_prog(s32);
844 LV2_SYSCALL sysSpuThreadGroupConnectEventAllThreads(sys_spu_group_t group,sys_event_queue_t eventQ,u64 req,u8 *spup)
846 lv2syscall4(251,group,eventQ,req,(u64)spup);
847 return_to_user_prog(s32);
850 LV2_SYSCALL sysSpuThreadGroupDisonnectEventAllThreads(sys_spu_group_t group,u8 spup)
852 lv2syscall2(252,group,spup);
853 return_to_user_prog(s32);
856 static inline void sysSpuRawWriteProblemStorage(sys_raw_spu_t spu,u32 reg,u32 value)
861 static inline u32 sysSpuRawReadProblemStorage(sys_raw_spu_t spu,u32 reg)
866 static inline void sysSpuRawWriteLocalStorage(sys_raw_spu_t spu,u32 reg,u32 value)
871 static inline u32 sysSpuRawReadLocalStorage(sys_raw_spu_t spu,u32 reg)
876 static inline void sysSpuThreadWriteProblemStorage(sys_raw_spu_t spu,u32 reg,u32 value)
881 static inline u32 sysSpuThreadReadProblemStorage(sys_raw_spu_t spu,u32 reg)
u32 nameAddress
Effective address of the thread group's name string.
Definition: spu.h:223
LV2_SYSCALL sysSpuRawCreateInterrupTag(sys_raw_spu_t spu, u32 classid, u32 hardwarethread, u32 *tag)
Create an interrupt tag for a raw SPU.
Definition: spu.h:280
u32 groupType
Thread group type (0 for normal thread groups).
Definition: spu.h:224
#define SPU_RAW_GET_PROBLEM_STORAGE(spu, reg)
Returns the memory-mapped address of problem storage of a raw SPU.
Definition: spu.h:175
LV2_SYSCALL sysSpuImageOpen(sysSpuImage *image, const char *path)
Create a SPU image from an ELF file.
Definition: spu.h:421
LV2_SYSCALL sysSpuThreadDisconnectEvent(sys_spu_thread_t thread, u32 type, u8 spup)
Disconnect an event queue from a SPU thread.
Definition: spu.h:529
LV2_SYSCALL sysSpuRawGetConfirugation(sys_raw_spu_t spu, u32 *value)
Get the configuration of the raw SPU's signal notification.
Definition: spu.h:395
LV2_SYSCALL sysSpuThreadRecoverPageFault(sys_spu_thread_t thread)
Recover from a SPU thread page fault.
Definition: spu.h:682
LV2_SYSCALL sysSpuThreadGroupGetPriority(sys_spu_group_t group, u32 *prio)
Get a SPU thread group's priority.
Definition: spu.h:826
LV2_SYSCALL sysSpuThreadWriteLocalStorage(sys_spu_thread_t thread, u32 address, u64 value, u32 type)
Write a value to a SPU thread's local store memory.
Definition: spu.h:578
u64 arg0
First argument.
Definition: spu.h:199
LV2_SYSCALL sysSpuRawDestroy(sys_raw_spu_t spu)
De-allocate a raw SPU.
Definition: spu.h:262
LV2_SYSCALL sysSpuThreadGroupResume(sys_spu_group_t group)
Resume a SPU thread group.
Definition: spu.h:753
LV2_SYSCALL sysSpuRawSetConfiguration(sys_raw_spu_t spu, u32 value)
Configure the raw SPU's signal notification.
Definition: spu.h:376
LV2_SYSCALL sysSpuThreadSetConfiguration(sys_spu_thread_t thread, u64 value)
Configure the SPU thread's signal notification.
Definition: spu.h:634
A structure containing the arguments passed to the SPU main function.
Definition: spu.h:197
LV2_SYSCALL sysSpuThreadGroupYield(sys_spu_group_t group)
Yield a SPU thread group.
Definition: spu.h:766
LV2_SYSCALL sysSpuThreadGroupStart(sys_spu_group_t group)
Start a SPU thread group.
Definition: spu.h:727
LV2_SYSCALL sysSpuThreadReadLocalStorage(sys_spu_thread_t thread, u32 address, u64 *value, u32 type)
Read a value From the SPU thread's local store memory.
Definition: spu.h:597
LV2_SYSCALL sysSpuImageOpenFd(sysSpuImage *image, s32 fd, u64 offset)
Create a SPU image from an open binary file.
Definition: spu.h:437
u32 memContainer
Memory container id (0 for normal thread groups).
Definition: spu.h:225
struct _sys_spu_thread_arg sysSpuThreadArgument
A structure containing the arguments passed to the SPU main function.
u64 arg1
Second argument.
Definition: spu.h:200
#define SPU_THREAD_GET_PROBLEM_STORAGE(spu, reg)
Returns the memory-mapped address of problem storage of a SPU thread.
Definition: spu.h:189
LV2_SYSCALL sysSpuThreadGroupTerminate(sys_spu_group_t group, u32 value)
Terminate a SPU thread group.
Definition: spu.h:779
LV2_SYSCALL sysSpuInitialize(u32 spus, u32 rawspus)
Initialize the SPU management.
Definition: spu.h:236
LV2_SYSCALL sysSpuThreadConnectEvent(sys_spu_thread_t thread, sys_event_queue_t queue, u32 type, u8 spup)
Connect an event queue to a SPU thread.
Definition: spu.h:510
LV2_SYSCALL sysSpuRawCreate(sys_raw_spu_t *spu, u32 *attributes)
Allocate a raw SPU.
Definition: spu.h:250
LV2_SYSCALL sysSpuThreadGroupSetPriority(sys_spu_group_t group, u32 prio)
Set a SPU thread group's priority.
Definition: spu.h:811
LV2_SYSCALL sysSpuThreadGroupDestroy(sys_spu_group_t group)
Destroy a SPU thread group.
Definition: spu.h:714
struct _sys_spu_thread_group_attr sysSpuThreadGroupAttribute
A structure containing SPU thread group attributes.
LV2_SYSCALL sysSpuThreadWriteSignal(sys_spu_thread_t thread, u32 signal, u32 value)
Write to the SPU thread's signal notification register.
Definition: spu.h:615
A structure containing SPU thread attributes.
Definition: spu.h:212
LV2_SYSCALL sysSpuRawRecoverPageFault(sys_raw_spu_t spu)
Recover a raw SPU from a page fault.
Definition: spu.h:407
LV2_SYSCALL sysSpuThreadGetConfiguration(sys_spu_thread_t thread, u64 *value)
Get the configuration of the SPU thread's signal notification.
Definition: spu.h:654
LV2_SYSCALL sysSpuThreadWriteMb(sys_spu_thread_t thread, u32 value)
Write to the SPU thread's inbound mailbox register.
Definition: spu.h:669
LV2_SYSCALL sysSpuThreadUnbindQueue(sys_spu_thread_t thread, u32 spuq_num)
Unbind an event queue from a SPU thread.
Definition: spu.h:559
u32 nameSize
Size of the name string in bytes (including terminating null byte).
Definition: spu.h:222
LV2_SYSCALL sysSpuRawGetIntMask(sys_raw_spu_t spu, u32 classid, u64 *mask)
Get the value of the interrupt mask register for a raw SPU.
Definition: spu.h:312
#define SPU_RAW_GET_LOCAL_STORAGE(spu, reg)
Returns the memory-mapped address of local storage of a raw SPU.
Definition: spu.h:171
u64 arg2
Third argument.
Definition: spu.h:201
LV2_SYSCALL sysSpuThreadBindQueue(sys_spu_thread_t thread, sys_event_queue_t queue, u32 spuq_num)
Bind an event queue to a SPU thread.
Definition: spu.h:545
LV2_SYSCALL sysSpuThreadSetArguments(sys_spu_thread_t thread, sysSpuThreadArgument *arguments)
Set the SPU thread arguments.
Definition: spu.h:473
SPU image data structure.
Definition: spu.h:55
LV2_SYSCALL sysSpuRawReadPuintMb(sys_raw_spu_t spu, u32 *value)
Read from the raw SPU's outbound interrupt mailbox register.
Definition: spu.h:358
struct _sys_spu_thread_attr sysSpuThreadAttribute
A structure containing SPU thread attributes.
LV2_SYSCALL sysSpuThreadGroupSuspend(sys_spu_group_t group)
Suspend a SPU thread group.
Definition: spu.h:740
A structure containing SPU thread group attributes.
Definition: spu.h:220
LV2_SYSCALL sysSpuThreadGetExitStatus(sys_spu_thread_t thread, s32 *status)
Get the exit status of a thread.
Definition: spu.h:489
LV2_SYSCALL sysSpuRawSetIntStat(sys_raw_spu_t spu, u32 classid, u64 stat)
Set the value of the interrupt status register for a raw SPU.
Definition: spu.h:328
LV2_SYSCALL sysSpuRawGetIntStat(sys_raw_spu_t spu, u32 classid, u64 *stat)
Get the value of the interrupt status register for a raw SPU.
Definition: spu.h:344
LV2_SYSCALL sysSpuThreadInitialize(sys_spu_thread_t *thread, sys_spu_group_t group, u32 spu, sysSpuImage *image, sysSpuThreadAttribute *attributes, sysSpuThreadArgument *arguments)
Initialize a SPU thread.
Definition: spu.h:459
u32 nameAddress
Effective address of the thread's name string.
Definition: spu.h:214
LV2_SYSCALL sysSpuThreadGroupJoin(sys_spu_group_t group, u32 *cause, u32 *status)
Wait for a SPU thread group to finish its execution.
Definition: spu.h:796
u64 arg3
Fourth argument.
Definition: spu.h:202
LV2_SYSCALL sysSpuRawSetIntMask(sys_raw_spu_t spu, u32 classid, u64 mask)
Set the value of the interrupt mask register for a raw SPU.
Definition: spu.h:296
u32 nameSize
Size of the name string in bytes (including terminating null byte).
Definition: spu.h:215
u32 attribute
OR'ed list of SPU thread attribute flags (or SPU_THREAD_ATTR_NONE)
Definition: spu.h:216
LV2_SYSCALL sysSpuThreadGroupCreate(sys_spu_group_t *group, u32 num, u32 prio, sysSpuThreadGroupAttribute *attr)
Create a SPU thread group.
Definition: spu.h:701