Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Functions
spu_restore.c File Reference
#include <spu_intrinsics.h>
#include <asm/spu_csa.h>
#include "spu_utils.h"

Go to the source code of this file.


#define LS_SIZE   0x40000 /* 256K (in bytes) */
#define BR_INSTR   0x327fff80 /* br -4 */
#define NOP_INSTR   0x40200000 /* nop */
#define HEQ_INSTR   0x7b000000 /* heq $0, $0 */
#define STOP_INSTR   0x00000000 /* stop 0x0 */
#define ILLEGAL_INSTR   0x00800000 /* illegal instr */
#define RESTORE_COMPLETE   0x00003ffc /* stop 0x3ffc */


typedef unsigned int u32
typedef unsigned long long u64


int main ()

Macro Definition Documentation

#define BR_INSTR   0x327fff80 /* br -4 */

Definition at line 39 of file spu_restore.c.

#define HEQ_INSTR   0x7b000000 /* heq $0, $0 */

Definition at line 41 of file spu_restore.c.

#define ILLEGAL_INSTR   0x00800000 /* illegal instr */

Definition at line 43 of file spu_restore.c.

#define LS_SIZE   0x40000 /* 256K (in bytes) */

Definition at line 29 of file spu_restore.c.

#define NOP_INSTR   0x40200000 /* nop */

Definition at line 40 of file spu_restore.c.

#define RESTORE_COMPLETE   0x00003ffc /* stop 0x3ffc */

Definition at line 44 of file spu_restore.c.

#define STOP_INSTR   0x00000000 /* stop 0x0 */

Definition at line 42 of file spu_restore.c.

Typedef Documentation

typedef unsigned int u32

Definition at line 32 of file spu_restore.c.

typedef unsigned long long u64

Definition at line 33 of file spu_restore.c.

Function Documentation

int main ( void  )

main - entry point for SPU-side context restore.

This code deviates from the documented sequence in the following aspects:

  1. The EA for LSCSA is passed from PPE in the signal notification channels.
  2. The register spill area is pulled by SPU into LS, rather than pushed by PPE.
  3. All 128 registers are restored by exit().
  4. The exit() function is modified at run time in order to properly restore the SPU_Status register.

Definition at line 308 of file spu_restore.c.