libspe2-types.h File Reference
`#include <limits.h>`
`#include "cbea_map.h"`
Include dependency graph for libspe2-types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | spe_program_handle
struct | spe_context
struct | spe_gang_context
struct | spe_stop_info
union | spe_event_data
struct | spe_event_unit

## Macros

#define | SPE_CFG_SIGNOTIFY1_OR 0x00000010
#define | SPE_CFG_SIGNOTIFY2_OR 0x00000020
#define | SPE_MAP_PS 0x00000040
#define | SPE_ISOLATE 0x00000080
#define | SPE_ISOLATE_EMULATE 0x00000100
#define | SPE_EVENTS_ENABLE 0x00001000
#define | SPE_AFFINITY_MEMORY 0x00002000
#define | SPE_EXIT 1
#define | SPE_STOP_AND_SIGNAL 2
#define | SPE_RUNTIME_ERROR 3
#define | SPE_RUNTIME_EXCEPTION 4
#define | SPE_RUNTIME_FATAL 5
#define | SPE_CALLBACK_ERROR 6
#define | SPE_ISOLATION_ERROR 7
#define | SPE_SPU_STOPPED_BY_STOP 0x02 /* INTERNAL USE ONLY */
#define | SPE_SPU_HALT 0x04
#define | SPE_SPU_WAITING_ON_CHANNEL 0x08 /* INTERNAL USE ONLY */
#define | SPE_SPU_SINGLE_STEP 0x10
#define | SPE_SPU_INVALID_INSTR 0x20
#define | SPE_SPU_INVALID_CHANNEL 0x40
#define | SPE_DMA_ALIGNMENT 0x0008
#define | SPE_DMA_SEGMENTATION 0x0020
#define | SPE_DMA_STORAGE 0x0040
#define | SPE_INVALID_DMA 0x0800
#define | SIGSPE SIGURG
#define | SPE_EVENT_OUT_INTR_MBOX 0x00000001
#define | SPE_EVENT_IN_MBOX 0x00000002
#define | SPE_EVENT_TAG_GROUP 0x00000004
#define | SPE_EVENT_SPE_STOPPED 0x00000008
#define | SPE_EVENT_ALL_EVENTS
#define | SPE_MBOX_ALL_BLOCKING 1
#define | SPE_MBOX_ANY_BLOCKING 2
#define | SPE_MBOX_ANY_NONBLOCKING 3
#define | SPE_TAG_ALL 1
#define | SPE_TAG_ANY 2
#define | SPE_TAG_IMMEDIATE 3
#define | SPE_DEFAULT_ENTRY UINT_MAX
#define | SPE_RUN_USER_REGS 0x00000001 /* 128b user data for r3-5. */
#define | SPE_NO_CALLBACKS 0x00000002
#define | SPE_CALLBACK_NEW 1
#define | SPE_CALLBACK_UPDATE 2
#define | SPE_COUNT_PHYSICAL_CPU_NODES 1
#define | SPE_COUNT_PHYSICAL_SPES 2
#define | SPE_COUNT_USABLE_SPES 3
#define | SPE_SIG_NOTIFY_REG_1 0x0001
#define | SPE_SIG_NOTIFY_REG_2 0x0002

## Typedefs

typedef struct spe_program_handle | spe_program_handle_t
typedef struct spe_context * | spe_context_ptr_t
typedef struct spe_gang_context * | spe_gang_context_ptr_t
typedef struct spe_stop_info | spe_stop_info_t
typedef union spe_event_data | spe_event_data_t
typedef struct spe_event_unit | spe_event_unit_t
typedef void * | spe_event_handler_ptr_t
typedef int | spe_event_handler_t

## Enumerations

enum | ps_area { SPE_MSSYNC_AREA, SPE_MFC_COMMAND_AREA, SPE_CONTROL_AREA, SPE_SIG_NOTIFY_1_AREA, SPE_SIG_NOTIFY_2_AREA }

## Macro Definition Documentation

#define SIGSPE SIGURG

SIGSPE maps to SIGURG

Definition at line 219 of file libspe2-types.h.

#define SPE_AFFINITY_MEMORY 0x00002000

Definition at line 182 of file libspe2-types.h.

Referenced by _base_spe_context_create().

#define SPE_CALLBACK_ERROR 6

Definition at line 194 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_CALLBACK_NEW 1

Definition at line 260 of file libspe2-types.h.

Referenced by _base_spe_callback_handler_register().

#define SPE_CALLBACK_UPDATE 2

Definition at line 261 of file libspe2-types.h.

Referenced by _base_spe_callback_handler_register().

#define SPE_CFG_SIGNOTIFY1_OR 0x00000010

Flags for spe_context_create

Definition at line 176 of file libspe2-types.h.

Referenced by _base_spe_context_create().

#define SPE_CFG_SIGNOTIFY2_OR 0x00000020

Definition at line 177 of file libspe2-types.h.

Referenced by _base_spe_context_create().

#define SPE_COUNT_PHYSICAL_CPU_NODES 1

Definition at line 265 of file libspe2-types.h.

Referenced by _base_spe_cpu_info_get().

#define SPE_COUNT_PHYSICAL_SPES 2

Definition at line 266 of file libspe2-types.h.

Referenced by _base_spe_cpu_info_get().

#define SPE_COUNT_USABLE_SPES 3

Definition at line 267 of file libspe2-types.h.

Referenced by _base_spe_cpu_info_get().

#define SPE_DEFAULT_ENTRY UINT_MAX

Flags for _base_spe_context_run

Definition at line 253 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_DMA_ALIGNMENT 0x0008

Runtime exceptions

Definition at line 210 of file libspe2-types.h.

#define SPE_DMA_SEGMENTATION 0x0020

Definition at line 212 of file libspe2-types.h.

#define SPE_DMA_STORAGE 0x0040

Definition at line 213 of file libspe2-types.h.

#define SPE_EVENT_ALL_EVENTS

Value:
SPE_EVENT_OUT_INTR_MBOX | \
SPE_EVENT_IN_MBOX | \
SPE_EVENT_TAG_GROUP | \
SPE_EVENT_SPE_STOPPED

Definition at line 229 of file libspe2-types.h.

#define SPE_EVENT_IN_MBOX 0x00000002

Definition at line 225 of file libspe2-types.h.

Referenced by _event_spe_event_handler_deregister(), and _event_spe_event_handler_register().

#define SPE_EVENT_OUT_INTR_MBOX 0x00000001

Supported SPE events

Definition at line 224 of file libspe2-types.h.

Referenced by _event_spe_event_handler_deregister(), and _event_spe_event_handler_register().

#define SPE_EVENT_SPE_STOPPED 0x00000008

Definition at line 227 of file libspe2-types.h.

Referenced by _event_spe_event_handler_deregister(), and _event_spe_event_handler_register().

#define SPE_EVENT_TAG_GROUP 0x00000004

Definition at line 226 of file libspe2-types.h.

Referenced by _event_spe_event_handler_deregister(), and _event_spe_event_handler_register().

#define SPE_EVENTS_ENABLE 0x00001000

Definition at line 181 of file libspe2-types.h.

Referenced by _base_spe_context_create(), and _base_spe_context_run().

#define SPE_EXIT 1

Symbolic constants for stop reasons as returned in spe_stop_info_t

Definition at line 189 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_INVALID_DMA 0x0800

Definition at line 214 of file libspe2-types.h.

#define SPE_ISOLATE 0x00000080

Definition at line 179 of file libspe2-types.h.

Referenced by _base_spe_context_create(), _base_spe_context_run(), and _base_spe_program_load().

#define SPE_ISOLATE_EMULATE 0x00000100

Definition at line 180 of file libspe2-types.h.

Referenced by _base_spe_context_create(), _base_spe_context_run(), _base_spe_handle_library_callback(), and _base_spe_program_load().

#define SPE_ISOLATION_ERROR 7

Definition at line 195 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_MAP_PS 0x00000040

Definition at line 178 of file libspe2-types.h.

Referenced by _base_spe_context_create(), _base_spe_in_mbox_status(), _base_spe_in_mbox_write(), _base_spe_mfcio_tag_status_read(), _base_spe_mssync_start(), _base_spe_mssync_status(), _base_spe_out_intr_mbox_status(), _base_spe_out_mbox_read(), _base_spe_out_mbox_status(), _base_spe_signal_write(), and _event_spe_event_handler_register().

#define SPE_MBOX_ALL_BLOCKING 1

Behavior flags for mailbox read/write functions

Definition at line 237 of file libspe2-types.h.

Referenced by _base_spe_in_mbox_write(), and _base_spe_out_intr_mbox_read().

#define SPE_MBOX_ANY_BLOCKING 2

Definition at line 238 of file libspe2-types.h.

Referenced by _base_spe_in_mbox_write(), and _base_spe_out_intr_mbox_read().

#define SPE_MBOX_ANY_NONBLOCKING 3

Definition at line 239 of file libspe2-types.h.

Referenced by _base_spe_in_mbox_write(), and _base_spe_out_intr_mbox_read().

#define SPE_NO_CALLBACKS 0x00000002

Definition at line 255 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_RUN_USER_REGS 0x00000001 /* 128b user data for r3-5. */

Definition at line 254 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_RUNTIME_ERROR 3

Definition at line 191 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_RUNTIME_EXCEPTION 4

Definition at line 192 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_RUNTIME_FATAL 5

Definition at line 193 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_SIG_NOTIFY_REG_1 0x0001

Signal Targets

Definition at line 272 of file libspe2-types.h.

Referenced by _base_spe_signal_write().

#define SPE_SIG_NOTIFY_REG_2 0x0002

Definition at line 273 of file libspe2-types.h.

Referenced by _base_spe_signal_write().

#define SPE_SPU_HALT 0x04

Definition at line 201 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_SPU_INVALID_CHANNEL 0x40

Definition at line 205 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_SPU_INVALID_INSTR 0x20

Definition at line 204 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_SPU_SINGLE_STEP 0x10

Definition at line 203 of file libspe2-types.h.

#define SPE_SPU_STOPPED_BY_STOP 0x02 /* INTERNAL USE ONLY */

Runtime errors

Definition at line 200 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_SPU_WAITING_ON_CHANNEL 0x08 /* INTERNAL USE ONLY */

Definition at line 202 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_STOP_AND_SIGNAL 2

Definition at line 190 of file libspe2-types.h.

Referenced by _base_spe_context_run().

#define SPE_TAG_ALL 1

Behavior flags tag status functions

Definition at line 245 of file libspe2-types.h.

Referenced by _base_spe_mfcio_tag_status_read().

#define SPE_TAG_ANY 2

Definition at line 246 of file libspe2-types.h.

Referenced by _base_spe_mfcio_tag_status_read().

#define SPE_TAG_IMMEDIATE 3

Definition at line 247 of file libspe2-types.h.

Referenced by _base_spe_mfcio_tag_status_read().

## Typedef Documentation

typedef struct spe_context* spe_context_ptr_t

spe_context_ptr_t This pointer serves as the identifier for a specific SPE context throughout the API (where needed)

Definition at line 83 of file libspe2-types.h.

typedef union spe_event_data spe_event_data_t

spe_event_data_t User data to be associated with an event

typedef void* spe_event_handler_ptr_t

Definition at line 159 of file libspe2-types.h.

typedef int spe_event_handler_t

Definition at line 160 of file libspe2-types.h.

typedef struct spe_event_unit spe_event_unit_t

spe_event_t

typedef struct spe_gang_context* spe_gang_context_ptr_t

spe_gang_context_ptr_t This pointer serves as the identifier for a specific SPE gang context throughout the API (where needed)

Definition at line 106 of file libspe2-types.h.

typedef struct spe_program_handle spe_program_handle_t

SPE program handle Structure spe_program_handle per CESOF specification libspe2 applications usually only keep a pointer to the program handle and do not use the structure directly.

typedef struct spe_stop_info spe_stop_info_t

spe_stop_info_t

## Enumeration Type Documentation

enum ps_area

Enumerator
SPE_MSSYNC_AREA |
SPE_MFC_COMMAND_AREA |
SPE_CONTROL_AREA |
SPE_SIG_NOTIFY_1_AREA |
SPE_SIG_NOTIFY_2_AREA |

Definition at line 171 of file libspe2-types.h.

{ SPE_MSSYNC_AREA, SPE_MFC_COMMAND_AREA, SPE_CONTROL_AREA, SPE_SIG_NOTIFY_1_AREA, SPE_SIG_NOTIFY_2_AREA };