psl1ght
A free SDK for Sony's PS3 console
Data Structures | Macros | Typedefs | Functions
spu.h File Reference

SPU management syscalls. More...

#include <ppu-asm.h>
#include <ppu-lv2.h>
#include <lv2/spu.h>

Go to the source code of this file.

Data Structures

struct  _sys_spu_thread_arg
 A structure containing the arguments passed to the SPU main function. More...
 
struct  _sys_spu_thread_attr
 A structure containing SPU thread attributes. More...
 
struct  _sys_spu_thread_group_attr
 A structure containing SPU thread group attributes. More...
 

Macros

#define MFC_LSA   0x3004
 local store address
 
#define MFC_EAH   0x3008
 effective address high
 
#define MFC_EAL   0x300C
 effective address low
 
#define MFC_Size   0x3010
 size of MFC DMA transfer
 
#define MFC_Class_CMD   0x3014
 class of MFC command
 
#define MFC_CMD_Status   0x3014
 MFC command status.
 
#define MFC_QStatus   0x3104
 MFC query status.
 
#define Prxy_QueryType   0x3204
 Proxy query type.
 
#define Prxy_QueryMask   0x321C
 Proxy Query mask.
 
#define Prxy_TagStatus   0x322C
 Proxy tag status.
 
#define SPU_Out_MBox   0x4004
 Outbound mailbox.
 
#define SPU_In_MBox   0x400C
 Inbound mailbox.
 
#define SPU_MBox_Status   0x4014
 Outbound mailbox status.
 
#define SPU_RunCtrl   0x401C
 SPU Run control.
 
#define SPU_Status   0x4024
 SPU status.
 
#define SPU_NextPC   0x4034
 SPU next PC.
 
#define SPU_Sig_Notify_1   0x1400C
 Signal notification 1.
 
#define SPU_Sig_Notify_2   0x1C00C
 Signal notification 2.
 
#define SPU_THREAD_ATTR_NONE   0x00
 No thread attributes.
 
#define SPU_THREAD_ATTR_ASYNC_INT_ENABLE   0x01
 Enables interrupts.
 
#define SPU_THREAD_ATTR_DEC_SYNC_TB_ENABLE   0x02
 Synchronize SPU decrementer with PPU time base.
 
#define SPU_THREAD_EVENT_USER   0x01
 User SPU thread event.
 
#define SPU_THREAD_EVENT_DMA   0x02
 DMA SPU thread event.
 
#define SPU_THREAD_EVENT_USER_KEY   0xFFFFFFFF53505501ULL
 SPU thread event user key.
 
#define SPU_THREAD_EVENT_DMA_KEY   0xFFFFFFFF53505502ULL
 SPU thread event DMA key.
 
#define SPU_SIGNAL1_OVERWRITE   0x00
 Configure signal notification register 1 to overwrite mode.
 
#define SPU_SIGNAL1_OR   0x01
 Configure signal notification register 1 to OR mode.
 
#define SPU_SIGNAL2_OVERWRITE   0x00
 Configure signal notification register 2 to overwrite mode.
 
#define SPU_SIGNAL2_OR   0x02
 Configure signal notification register 2 to OR mode.
 
#define SPU_THREAD_BASE   0xF0000000ULL
 Base of memory-mapped SPU thread resources.
 
#define SPU_THREAD_OFFSET   0x00100000ULL
 Offset between resources for consecutive SPU threads.
 
#define SPU_RAW_BASE   0xE0000000ULL
 Base of memory-mapped raw SPU program resources.
 
#define SPU_RAW_OFFSET   0x00100000ULL
 Offset between resources for consecutive raw SPU programs.
 
#define SPU_LOCAL_OFFSET   0x00000000ULL
 Offset from the beginning of a SPU thread/raw program's resources for local store memory.
 
#define SPU_PROBLEM_OFFSET   0x00040000ULL
 Offset from the beginning of a SPU thread/raw program's resources for IO registers.
 
#define SPU_RAW_GET_BASE_OFFSET(spu)   (SPU_RAW_BASE + (SPU_RAW_OFFSET*(spu)))
 Get base offset for a raw SPU program. More...
 
#define SPU_RAW_GET_LOCAL_STORAGE(spu, reg)   (SPU_RAW_GET_BASE_OFFSET(spu) + SPU_LOCAL_OFFSET + (reg))
 Returns the memory-mapped address of local storage of a raw SPU.
 
#define SPU_RAW_GET_PROBLEM_STORAGE(spu, reg)   (SPU_RAW_GET_BASE_OFFSET(spu) + SPU_PROBLEM_OFFSET + (reg))
 Returns the memory-mapped address of problem storage of a raw SPU.
 
#define SPU_THREAD_GET_BASE_OFFSET(spu)   (SPU_THREAD_BASE + (SPU_THREAD_OFFSET*(spu)))
 Get base offset for a SPU thread. More...
 
#define SPU_THREAD_GET_LOCAL_STORAGE(spu, reg)   (SPU_THREAD_GET_BASE_OFFSET(spu) + SPU_LOCAL_OFFSET + (reg))
 Returns the memory-mapped address of local storage of a SPU thread.
 
#define SPU_THREAD_GET_PROBLEM_STORAGE(spu, reg)   (SPU_THREAD_GET_BASE_OFFSET(spu) + SPU_PROBLEM_OFFSET + (reg))
 Returns the memory-mapped address of problem storage of a SPU thread.
 

Typedefs

typedef struct _sys_spu_thread_arg sysSpuThreadArgument
 A structure containing the arguments passed to the SPU main function.
 
typedef struct _sys_spu_thread_attr sysSpuThreadAttribute
 A structure containing SPU thread attributes. More...
 
typedef struct _sys_spu_thread_group_attr sysSpuThreadGroupAttribute
 A structure containing SPU thread group attributes.
 

Functions

LV2_SYSCALL sysSpuInitialize (u32 spus, u32 rawspus)
 Initialize the SPU management. More...
 
LV2_SYSCALL sysSpuRawCreate (sys_raw_spu_t *spu, u32 *attributes)
 Allocate a raw SPU. More...
 
LV2_SYSCALL sysSpuRawDestroy (sys_raw_spu_t spu)
 De-allocate a raw SPU. More...
 
LV2_SYSCALL sysSpuRawCreateInterrupTag (sys_raw_spu_t spu, u32 classid, u32 hardwarethread, u32 *tag)
 Create an interrupt tag for a raw SPU. More...
 
LV2_SYSCALL sysSpuRawSetIntMask (sys_raw_spu_t spu, u32 classid, u64 mask)
 Set the value of the interrupt mask register for a raw SPU. More...
 
LV2_SYSCALL sysSpuRawGetIntMask (sys_raw_spu_t spu, u32 classid, u64 *mask)
 Get the value of the interrupt mask register for a raw SPU. More...
 
LV2_SYSCALL sysSpuRawSetIntStat (sys_raw_spu_t spu, u32 classid, u64 stat)
 Set the value of the interrupt status register for a raw SPU. More...
 
LV2_SYSCALL sysSpuRawGetIntStat (sys_raw_spu_t spu, u32 classid, u64 *stat)
 Get the value of the interrupt status register for a raw SPU. More...
 
LV2_SYSCALL sysSpuRawReadPuintMb (sys_raw_spu_t spu, u32 *value)
 Read from the raw SPU's outbound interrupt mailbox register. More...
 
LV2_SYSCALL sysSpuRawSetConfiguration (sys_raw_spu_t spu, u32 value)
 Configure the raw SPU's signal notification. More...
 
LV2_SYSCALL sysSpuRawGetConfirugation (sys_raw_spu_t spu, u32 *value)
 Get the configuration of the raw SPU's signal notification. More...
 
LV2_SYSCALL sysSpuRawRecoverPageFault (sys_raw_spu_t spu)
 Recover a raw SPU from a page fault. More...
 
LV2_SYSCALL sysSpuImageOpen (sysSpuImage *image, const char *path)
 Create a SPU image from an ELF file. More...
 
LV2_SYSCALL sysSpuImageOpenFd (sysSpuImage *image, s32 fd, u64 offset)
 Create a SPU image from an open binary file. More...
 
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. More...
 
LV2_SYSCALL sysSpuThreadSetArguments (sys_spu_thread_t thread, sysSpuThreadArgument *arguments)
 Set the SPU thread arguments. More...
 
LV2_SYSCALL sysSpuThreadGetExitStatus (sys_spu_thread_t thread, s32 *status)
 Get the exit status of a thread. More...
 
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. More...
 
LV2_SYSCALL sysSpuThreadDisconnectEvent (sys_spu_thread_t thread, u32 type, u8 spup)
 Disconnect an event queue from a SPU thread. More...
 
LV2_SYSCALL sysSpuThreadBindQueue (sys_spu_thread_t thread, sys_event_queue_t queue, u32 spuq_num)
 Bind an event queue to a SPU thread. More...
 
LV2_SYSCALL sysSpuThreadUnbindQueue (sys_spu_thread_t thread, u32 spuq_num)
 Unbind an event queue from a SPU thread. More...
 
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. More...
 
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. More...
 
LV2_SYSCALL sysSpuThreadWriteSignal (sys_spu_thread_t thread, u32 signal, u32 value)
 Write to the SPU thread's signal notification register. More...
 
LV2_SYSCALL sysSpuThreadSetConfiguration (sys_spu_thread_t thread, u64 value)
 Configure the SPU thread's signal notification. More...
 
LV2_SYSCALL sysSpuThreadGetConfiguration (sys_spu_thread_t thread, u64 *value)
 Get the configuration of the SPU thread's signal notification. More...
 
LV2_SYSCALL sysSpuThreadWriteMb (sys_spu_thread_t thread, u32 value)
 Write to the SPU thread's inbound mailbox register. More...
 
LV2_SYSCALL sysSpuThreadRecoverPageFault (sys_spu_thread_t thread)
 Recover from a SPU thread page fault. More...
 
LV2_SYSCALL sysSpuThreadGroupCreate (sys_spu_group_t *group, u32 num, u32 prio, sysSpuThreadGroupAttribute *attr)
 Create a SPU thread group. More...
 
LV2_SYSCALL sysSpuThreadGroupDestroy (sys_spu_group_t group)
 Destroy a SPU thread group. More...
 
LV2_SYSCALL sysSpuThreadGroupStart (sys_spu_group_t group)
 Start a SPU thread group. More...
 
LV2_SYSCALL sysSpuThreadGroupSuspend (sys_spu_group_t group)
 Suspend a SPU thread group. More...
 
LV2_SYSCALL sysSpuThreadGroupResume (sys_spu_group_t group)
 Resume a SPU thread group. More...
 
LV2_SYSCALL sysSpuThreadGroupYield (sys_spu_group_t group)
 Yield a SPU thread group. More...
 
LV2_SYSCALL sysSpuThreadGroupTerminate (sys_spu_group_t group, u32 value)
 Terminate a SPU thread group. More...
 
LV2_SYSCALL sysSpuThreadGroupJoin (sys_spu_group_t group, u32 *cause, u32 *status)
 Wait for a SPU thread group to finish its execution. More...
 
LV2_SYSCALL sysSpuThreadGroupSetPriority (sys_spu_group_t group, u32 prio)
 Set a SPU thread group's priority. More...
 
LV2_SYSCALL sysSpuThreadGroupGetPriority (sys_spu_group_t group, u32 *prio)
 Get a SPU thread group's priority. More...
 
LV2_SYSCALL sysSpuThreadGroupConnectEvent (sys_spu_group_t group, sys_event_queue_t eventQ, u32 eventType)
 
LV2_SYSCALL sysSpuThreadGroupDisconnectEvent (sys_spu_group_t group, u32 eventType)
 
LV2_SYSCALL sysSpuThreadGroupConnectEventAllThreads (sys_spu_group_t group, sys_event_queue_t eventQ, u64 req, u8 *spup)
 
LV2_SYSCALL sysSpuThreadGroupDisonnectEventAllThreads (sys_spu_group_t group, u8 spup)
 
static void sysSpuRawWriteProblemStorage (sys_raw_spu_t spu, u32 reg, u32 value)
 
static u32 sysSpuRawReadProblemStorage (sys_raw_spu_t spu, u32 reg)
 
static void sysSpuRawWriteLocalStorage (sys_raw_spu_t spu, u32 reg, u32 value)
 
static u32 sysSpuRawReadLocalStorage (sys_raw_spu_t spu, u32 reg)
 
static void sysSpuThreadWriteProblemStorage (sys_raw_spu_t spu, u32 reg, u32 value)
 
static u32 sysSpuThreadReadProblemStorage (sys_raw_spu_t spu, u32 reg)
 

Detailed Description

SPU management syscalls.

These are the LV2 syscalls for SPU management (raw SPUs and SPU threads).

See also
Quick guide to SPU management

Macro Definition Documentation

◆ SPU_RAW_GET_BASE_OFFSET

#define SPU_RAW_GET_BASE_OFFSET (   spu)    (SPU_RAW_BASE + (SPU_RAW_OFFSET*(spu)))

Get base offset for a raw SPU program.

Parameters
spuSPU number (0-5)

◆ SPU_THREAD_GET_BASE_OFFSET

#define SPU_THREAD_GET_BASE_OFFSET (   spu)    (SPU_THREAD_BASE + (SPU_THREAD_OFFSET*(spu)))

Get base offset for a SPU thread.

Parameters
spuSPU thread id

Typedef Documentation

◆ sysSpuThreadAttribute

A structure containing SPU thread attributes.

Possible values for attribute flags are SPU_THREAD_ATTR_NONE or an OR'ed list of the following flags:

Function Documentation

◆ sysSpuImageOpen()

LV2_SYSCALL sysSpuImageOpen ( sysSpuImage image,
const char *  path 
)

Create a SPU image from an ELF file.

Parameters
imagePointer to the SPU image structure.
pathThe pathname of the ELF file to be read from.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuImageOpenFd()

LV2_SYSCALL sysSpuImageOpenFd ( sysSpuImage image,
s32  fd,
u64  offset 
)

Create a SPU image from an open binary file.

Parameters
imagePointer to the SPU image structure.
fdFile descriptor of the opened file.
offsetOffset to the beginning of the SPU image in the file.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuInitialize()

LV2_SYSCALL sysSpuInitialize ( u32  spus,
u32  rawspus 
)

Initialize the SPU management.

Parameters
spusTotal number of needed SPUs (from 1 to 6).
rawspusNumber of required raw SPUs (from 1 to 5).
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawCreate()

LV2_SYSCALL sysSpuRawCreate ( sys_raw_spu_t *  spu,
u32 *  attributes 
)

Allocate a raw SPU.

Parameters
spuPointer to a returned raw SPU identifier.
attributesPointer to an attributes structure (or NULL if default attributes are used).
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawCreateInterrupTag()

LV2_SYSCALL sysSpuRawCreateInterrupTag ( sys_raw_spu_t  spu,
u32  classid,
u32  hardwarethread,
u32 *  tag 
)

Create an interrupt tag for a raw SPU.

Parameters
spuThe raw SPU identifier.
classidThe interrupt class identifier.
hardwarethreadThe hardware thread identifier.
tagPointer to the returned interrupt tag identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawDestroy()

LV2_SYSCALL sysSpuRawDestroy ( sys_raw_spu_t  spu)

De-allocate a raw SPU.

Parameters
spuThe raw SPU identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawGetConfirugation()

LV2_SYSCALL sysSpuRawGetConfirugation ( sys_raw_spu_t  spu,
u32 *  value 
)

Get the configuration of the raw SPU's signal notification.

Parameters
spuThe raw SPU identifier.
valuePointer to the read configuration value, which is a OR combination of the following values:
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawGetIntMask()

LV2_SYSCALL sysSpuRawGetIntMask ( sys_raw_spu_t  spu,
u32  classid,
u64 *  mask 
)

Get the value of the interrupt mask register for a raw SPU.

Parameters
spuThe raw SPU identifier.
classidThe interrupt class identifier.
maskPointer to the returned interrupt mask register value.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawGetIntStat()

LV2_SYSCALL sysSpuRawGetIntStat ( sys_raw_spu_t  spu,
u32  classid,
u64 *  stat 
)

Get the value of the interrupt status register for a raw SPU.

Parameters
spuThe raw SPU identifier.
classidThe interrupt class identifier.
maskPointer to the returned interrupt status register value.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawReadPuintMb()

LV2_SYSCALL sysSpuRawReadPuintMb ( sys_raw_spu_t  spu,
u32 *  value 
)

Read from the raw SPU's outbound interrupt mailbox register.

Parameters
spuThe raw SPU identifier.
valuePointer to the read value.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawRecoverPageFault()

LV2_SYSCALL sysSpuRawRecoverPageFault ( sys_raw_spu_t  spu)

Recover a raw SPU from a page fault.

Parameters
spuThe raw SPU identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawSetConfiguration()

LV2_SYSCALL sysSpuRawSetConfiguration ( sys_raw_spu_t  spu,
u32  value 
)

Configure the raw SPU's signal notification.

Parameters
spuThe raw SPU identifier.
valueA OR combination of the following values:
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawSetIntMask()

LV2_SYSCALL sysSpuRawSetIntMask ( sys_raw_spu_t  spu,
u32  classid,
u64  mask 
)

Set the value of the interrupt mask register for a raw SPU.

Parameters
spuThe raw SPU identifier.
classidThe interrupt class identifier.
maskThe new interrupt mask register value.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuRawSetIntStat()

LV2_SYSCALL sysSpuRawSetIntStat ( sys_raw_spu_t  spu,
u32  classid,
u64  stat 
)

Set the value of the interrupt status register for a raw SPU.

Parameters
spuThe raw SPU identifier.
classidThe interrupt class identifier.
maskThe new interrupt status register value.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadBindQueue()

LV2_SYSCALL sysSpuThreadBindQueue ( sys_spu_thread_t  thread,
sys_event_queue_t  queue,
u32  spuq_num 
)

Bind an event queue to a SPU thread.

Parameters
threadThread identifier.
queueEvent queue identifier.
spuq_numEvent queue binding id.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadConnectEvent()

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.

Parameters
threadThread identifier.
queueEvent queue identifier.
typeEvent queue type.
Possible values are:
spupSPU event port number (value in 0..63 interval).
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadDisconnectEvent()

LV2_SYSCALL sysSpuThreadDisconnectEvent ( sys_spu_thread_t  thread,
u32  type,
u8  spup 
)

Disconnect an event queue from a SPU thread.

Parameters
threadThread identifier.
typeEvent queue type.
Possible values are:
spupSPU event port number.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGetConfiguration()

LV2_SYSCALL sysSpuThreadGetConfiguration ( sys_spu_thread_t  thread,
u64 *  value 
)

Get the configuration of the SPU thread's signal notification.

Parameters
threadThread identifier.
valuePointer to the read configuration value, which is a OR combination of the following values:
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGetExitStatus()

LV2_SYSCALL sysSpuThreadGetExitStatus ( sys_spu_thread_t  thread,
s32 *  status 
)

Get the exit status of a thread.

The exit status is the value the SPU program used as an argument to spu_thread_exit.

Parameters
threadThread identifier.
argumentsPointer to the returned exit status.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupCreate()

LV2_SYSCALL sysSpuThreadGroupCreate ( sys_spu_group_t *  group,
u32  num,
u32  prio,
sysSpuThreadGroupAttribute attr 
)

Create a SPU thread group.

Parameters
groupPointer to the returned SPU thread group identifier.
numNumber of SPU threads in the thread group.
prioPriority of the thread group.
attrPointer to a SPU thread group attribute structure.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupDestroy()

LV2_SYSCALL sysSpuThreadGroupDestroy ( sys_spu_group_t  group)

Destroy a SPU thread group.

Parameters
groupSPU thread group identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupGetPriority()

LV2_SYSCALL sysSpuThreadGroupGetPriority ( sys_spu_group_t  group,
u32 *  prio 
)

Get a SPU thread group's priority.

Parameters
groupSPU thread group identifier.
prioPointer to returned priority value.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupJoin()

LV2_SYSCALL sysSpuThreadGroupJoin ( sys_spu_group_t  group,
u32 *  cause,
u32 *  status 
)

Wait for a SPU thread group to finish its execution.

Parameters
groupSPU thread group identifier.
causePointer to returned cause of thread group termination.
statusPointer to returned status of thread group termination.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupResume()

LV2_SYSCALL sysSpuThreadGroupResume ( sys_spu_group_t  group)

Resume a SPU thread group.

Parameters
groupSPU thread group identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupSetPriority()

LV2_SYSCALL sysSpuThreadGroupSetPriority ( sys_spu_group_t  group,
u32  prio 
)

Set a SPU thread group's priority.

Parameters
groupSPU thread group identifier.
prioNew priority value.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupStart()

LV2_SYSCALL sysSpuThreadGroupStart ( sys_spu_group_t  group)

Start a SPU thread group.

Parameters
groupSPU thread group identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupSuspend()

LV2_SYSCALL sysSpuThreadGroupSuspend ( sys_spu_group_t  group)

Suspend a SPU thread group.

Parameters
groupSPU thread group identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupTerminate()

LV2_SYSCALL sysSpuThreadGroupTerminate ( sys_spu_group_t  group,
u32  value 
)

Terminate a SPU thread group.

Parameters
groupSPU thread group identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadGroupYield()

LV2_SYSCALL sysSpuThreadGroupYield ( sys_spu_group_t  group)

Yield a SPU thread group.

Parameters
groupSPU thread group identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadInitialize()

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.

Parameters
threadPointer to the returned thread identifier.
groupGroup identifier.
spuIndex of thread in group (from 0 to the thread group size minus 1).
imagePointer to the SPU image structure.
attributesPointer to a SPU thread attribute structure.
argumentsPointer to the arguments for the thread's main function.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadReadLocalStorage()

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.

Parameters
threadThread identifier.
addressAddress in local store to read from.
valuePointer to read value.
typeType of value to be read.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadRecoverPageFault()

LV2_SYSCALL sysSpuThreadRecoverPageFault ( sys_spu_thread_t  thread)

Recover from a SPU thread page fault.

Parameters
threadThread identifier.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadSetArguments()

LV2_SYSCALL sysSpuThreadSetArguments ( sys_spu_thread_t  thread,
sysSpuThreadArgument arguments 
)

Set the SPU thread arguments.

Parameters
threadThread identifier.
argumentsPointer to the arguments list.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadSetConfiguration()

LV2_SYSCALL sysSpuThreadSetConfiguration ( sys_spu_thread_t  thread,
u64  value 
)

Configure the SPU thread's signal notification.

Parameters
threadThread identifier.
valueA OR combination of the following values:
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadUnbindQueue()

LV2_SYSCALL sysSpuThreadUnbindQueue ( sys_spu_thread_t  thread,
u32  spuq_num 
)

Unbind an event queue from a SPU thread.

Parameters
threadThread identifier.
spuq_numEvent queue binding id.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadWriteLocalStorage()

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.

Parameters
threadThread identifier.
addressAddress in local store to write to.
valueValue to be written.
typeType of value to be written.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadWriteMb()

LV2_SYSCALL sysSpuThreadWriteMb ( sys_spu_thread_t  thread,
u32  value 
)

Write to the SPU thread's inbound mailbox register.

Parameters
threadThread identifier.
valueValue to be written.
Returns
zero if no error occured, nonzero otherwise.

◆ sysSpuThreadWriteSignal()

LV2_SYSCALL sysSpuThreadWriteSignal ( sys_spu_thread_t  thread,
u32  signal,
u32  value 
)

Write to the SPU thread's signal notification register.

Parameters
threadThread identifier.
signal
  • 0 : write to signal notification register 1
  • 1 : write to signal notification register 2
valueValue to be written.
Returns
zero if no error occured, nonzero otherwise.