spe_ps_area_get

NAME

spe_ps_area_get - Map the problem state area specified by ps_area of the SPE context specified by spe to the thread's address space.

SYNOPSIS

#include <libspe2.h>

void * spe_ps_area_get (spe_context_ptr_t spe, enum ps_area area)

Parameters  
spe The identifier of a specific SPE context.
ps_area The problem state area pointer to map.

DESCRIPTION

In order to obtain a problem state area pointer the specified SPE context must have been created with the SPE_MAP_PS flag set.

RETURN VALUE

On success, a pointer to the requested problem state area is returned.

EXIT STATUS

On error, NULL is returned and errno is set to indicate the error.

Possible errors include:

ESRCH The specified SPE context is invalid.
EACCES Permission for direct access to the specified problem state area is denied or the SPE context was not created with memory-mapped problem state access.
EINVAL The specified problem state area is invalid.>
ENOSYS Access to the specified problem area for the specified SPE context is not supported by the operating system.

OPTIONS

The following are possible problem state values for the parameter ps_area:

Problem state value Description
SPE_MSSYNC_AREA Return a pointer to the specified SPE's MFC multisource synchronization register problem state area as defined by the following structure:
typedef struct spe_mssync_area  
{  
 unsigned int MFC_MSSync; 
} spe_mssync_area_t;
SPE_MFC_COMMAND_AREA Return a pointer to the specified SPE's MFC command parameter and command queue control area as defined by the following structure:
typedef struct spe_mfc_command_area {
 unsigned char reserved_0_3[4];
 unsigned int MFC_LSA;
 unsigned int MFC_EAH;
 unsigned int MFC_EAL;
 unsigned int MFC_Size_Tag;
 union {
  unsigned int MFC_ClassID_CMD;
  unsigned int MFC_CMDStatus;
 };
 unsigned char reserved_18_103[236];
 unsigned int MFC_QStatus;
 unsigned char reserved_108_203[252];
 unsigned int Prxy_QueryType;
 unsigned char reserved_208_21B[20];
 unsigned int Prxy_QueryMask;
 unsigned char reserved_220_22B[12];
 unsigned int Prxy_TagStatus;
} spe_mfc_command_area_t;
Note: The MFC_EAH and MFC_EAL registers can be written simultaneously using a 64-bit store. Likewise, MFC_Size_Tag and MFC_ClassID_CMD registers can be written simultaneously using a 64-bit store.
SPE_CONTROL_AREA Return a pointer to the specified SPE's SPU control area as defined by the following structure:
typedef struct spe_spu_control_area {
 unsigned char reserved_0_3[4];
 unsigned int SPU_Out_Mbox;
 unsigned char reserved_8_B[4];
 unsigned int SPU_In_Mbox;
 unsigned char reserved_10_13[4];
 unsigned int SPU_Mbox_Stat;
 unsigned char reserved_18_1B[4];
 unsigned int SPU_RunCntl;
 unsigned char reserved_20_23[4];
 unsigned int SPU_Status;
 unsigned char reserved_28_33[12];
 unsigned int SPU_NPC;
} spe_spu_control_area_t;
SPE_SIG_NOTIFY_1_AREA Return a pointer to the specified SPE's signal notification area 1 as defined by the following structure:
typedef struct spe_sig_notify_1_area {
 unsigned char reserved_0_B[12];
 unsigned int SPU_Sig_Notify_1;
} spe_sig_notify_1_area_t;
SPE_SIG_NOTIFY_2_AREA Return a pointer to the specified SPE's signal notification area 2 as defined by the following structure:
typedef struct spe_sig_notify_2_area {
 unsigned char reserved_0_B[12];
 unsigned int SPU_Sig_Notify_2;
} spe_sig_notify_2_area_t;

SEE ALSO

spe_ls_area_get(3); spe_context_create(3)

The data structures specified above are defined in the header files of the library implementation.