SPU management library.
More...
#include <ppu-types.h>
Go to the source code of this file.
|
| s32 | sysSpuElfGetInformation (const void *elf, u32 *entryPoint, u32 *segmentCount) |
| |
| s32 | sysSpuElfGetSegments (const void *elf, sysSpuSegment *segments, u32 segmentCount) |
| |
| s32 | sysSpuRawLoad (sys_raw_spu_t spu, const char *path, u32 *entryPoint) |
| | Load a SPU program file into a raw SPU's local store.
|
| |
| s32 | sysSpuRawImageLoad (sys_raw_spu_t spu, sysSpuImage *image) |
| | Load a SPU image into a raw SPU's local store.
|
| |
| s32 | sysSpuImageClose (sysSpuImage *image) |
| | Close an opened SPU image file.
|
| |
| s32 | sysSpuImageImport (sysSpuImage *image, const void *elf, u32 type) |
| | Import a SPU image from an ELF file in memory.
|
| |
| s32 | sysSpuPrintfInitialize (int prio, void(*entry)(void *)) |
| | Initialize Spu printf service on ppu.
|
| |
| s32 | sysSpuPrintfAttachGroup (sys_spu_group_t group) |
| | Enable Spu printf service from each of the SPU thread in the specified SPU thread group.
|
| |
| s32 | sysSpuPrintfDetachGroup (sys_spu_group_t group) |
| | Disable Spu printf service from each of the SPU thread in the specified SPU thread group.
|
| |
| s32 | sysSpuPrintfAttachThread (sys_spu_thread_t thread) |
| | Enable Spu printf service in the specified SPU thread.
|
| |
| s32 | sysSpuPrintfDetachThread (sys_spu_thread_t thread) |
| | Disable Spu printf service in the specified SPU thread.
|
| |
| s32 | sysSpuPrintfFinalize () |
| | Terminate Spu printf service.
|
| |
| s32 | sysSpuImageOpenELF (sysSpuImage *image, const char *path) |
| |
SPU management library.
These are the system library calls for SPU management.
- See also
- Quick guide to SPU management
Definition in file spu.h.
◆ SPU_IMAGE_DIRECT
| #define SPU_IMAGE_DIRECT 0x01 |
Definition at line 25 of file spu.h.
◆ SPU_IMAGE_PROTECT
| #define SPU_IMAGE_PROTECT 0x00 |
Definition at line 24 of file spu.h.
◆ SPU_IMAGE_TYPE_KERNEL
| #define SPU_IMAGE_TYPE_KERNEL 0x00 |
Definition at line 22 of file spu.h.
◆ SPU_IMAGE_TYPE_USER
| #define SPU_IMAGE_TYPE_USER 0x00 |
Definition at line 21 of file spu.h.
◆ SPU_SEGMENT_TYPE_COPY
| #define SPU_SEGMENT_TYPE_COPY 0x01 |
Copy segment type.
Definition at line 15 of file spu.h.
◆ SPU_SEGMENT_TYPE_FILL
| #define SPU_SEGMENT_TYPE_FILL 0x02 |
Fill segment type.
Definition at line 17 of file spu.h.
◆ SPU_SEGMENT_TYPE_INFO
| #define SPU_SEGMENT_TYPE_INFO 0x04 |
Info segment type.
Definition at line 19 of file spu.h.
◆ sysSpuImage
SPU image data structure.
◆ sysSpuSegment
SPU segment data structure.
◆ sysSpuElfGetInformation()
| s32 sysSpuElfGetInformation |
( |
const void * |
elf, |
|
|
u32 * |
entryPoint, |
|
|
u32 * |
segmentCount |
|
) |
| |
◆ sysSpuElfGetSegments()
| s32 sysSpuElfGetSegments |
( |
const void * |
elf, |
|
|
sysSpuSegment * |
segments, |
|
|
u32 |
segmentCount |
|
) |
| |
◆ sysSpuImageClose()
Close an opened SPU image file.
- Parameters
-
| image | Pointer to the SPU image structure. |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysSpuImageImport()
| s32 sysSpuImageImport |
( |
sysSpuImage * |
image, |
|
|
const void * |
elf, |
|
|
u32 |
type |
|
) |
| |
Import a SPU image from an ELF file in memory.
- Parameters
-
| image | Pointer to the updated image structure. |
| elf | Pointer to the ELF data in memory. |
| type | Type of the image file. Generally set to 0. |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysSpuImageOpenELF()
| s32 sysSpuImageOpenELF |
( |
sysSpuImage * |
image, |
|
|
const char * |
path |
|
) |
| |
◆ sysSpuPrintfAttachGroup()
| s32 sysSpuPrintfAttachGroup |
( |
sys_spu_group_t |
group | ) |
|
Enable Spu printf service from each of the SPU thread in the specified SPU thread group.
- Parameters
-
| group | SPU thread group ID to be attached |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysSpuPrintfAttachThread()
| s32 sysSpuPrintfAttachThread |
( |
sys_spu_thread_t |
thread | ) |
|
Enable Spu printf service in the specified SPU thread.
- Parameters
-
| group | SPU thread ID to be attached |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysSpuPrintfDetachGroup()
| s32 sysSpuPrintfDetachGroup |
( |
sys_spu_group_t |
group | ) |
|
Disable Spu printf service from each of the SPU thread in the specified SPU thread group.
- Parameters
-
| group | SPU thread group ID to be detached |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysSpuPrintfDetachThread()
| s32 sysSpuPrintfDetachThread |
( |
sys_spu_thread_t |
thread | ) |
|
Disable Spu printf service in the specified SPU thread.
- Parameters
-
| thread | SPU thread ID to be detatached |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysSpuPrintfFinalize()
| s32 sysSpuPrintfFinalize |
( |
| ) |
|
Terminate Spu printf service.
- Parameters
-
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysSpuPrintfInitialize()
| s32 sysSpuPrintfInitialize |
( |
int |
prio, |
|
|
void(*)(void *) |
entry |
|
) |
| |
Initialize Spu printf service on ppu.
- Parameters
-
| prio | Priority of server |
| entry | Pointer to funtion callback on ppu side |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysSpuRawImageLoad()
| s32 sysSpuRawImageLoad |
( |
sys_raw_spu_t |
spu, |
|
|
sysSpuImage * |
image |
|
) |
| |
Load a SPU image into a raw SPU's local store.
- Parameters
-
| spu | The raw SPU identifier. |
| image | Pointer to the SPU image structure. |
- Returns
- zero if no error occured, nonzero otherwise.
◆ sysSpuRawLoad()
| s32 sysSpuRawLoad |
( |
sys_raw_spu_t |
spu, |
|
|
const char * |
path, |
|
|
u32 * |
entryPoint |
|
) |
| |
Load a SPU program file into a raw SPU's local store.
- Parameters
-
| spu | The raw SPU identifier. |
| path | The SPU program file name. |
| entryPoint | Pointer to the returned entry point address. |
- Returns
- zero if no error occured, nonzero otherwise.