PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
sifcmd.h File Reference
#include <tamtypes.h>
+ Include dependency graph for sifcmd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  t_SifCmdHeader
 
struct  t_SifCmdSRegData
 
struct  t_SifCmdHandlerData
 
struct  _iop_reset_pkt
 

Macros

#define SIF_CMD_ID_SYSTEM   0x80000000
 
#define SIF_CMD_CHANGE_SADDR   (SIF_CMD_ID_SYSTEM | 0)
 
#define SIF_CMD_SET_SREG   (SIF_CMD_ID_SYSTEM | 1)
 
#define SIF_CMD_INIT_CMD   (SIF_CMD_ID_SYSTEM | 2)
 
#define SIF_CMD_RESET_CMD   (SIF_CMD_ID_SYSTEM | 3)
 
#define SIF_CMD_RPC_END   (SIF_CMD_ID_SYSTEM | 8)
 
#define SIF_CMD_RPC_BIND   (SIF_CMD_ID_SYSTEM | 9)
 
#define SIF_CMD_RPC_CALL   (SIF_CMD_ID_SYSTEM | 10)
 
#define SIF_CMD_RPC_RDATA   (SIF_CMD_ID_SYSTEM | 12)
 
#define SIF_SREG_RPCINIT   0
 
#define RESET_ARG_MAX   79
 
#define SIF_CMD_M_INTR   0x01
 
#define SIF_CMD_M_WBDC   0x04
 

Typedefs

typedef struct t_SifCmdHeader SifCmdHeader_t
 
typedef struct t_SifCmdSRegData SifCmdSRegData_t
 
typedef void(* SifCmdHandler_t) (void *data, void *harg)
 
typedef struct t_SifCmdHandlerData SifCmdHandlerData_t
 
typedef struct _iop_reset_pkt SifCmdResetData_t
 

Functions

unsigned int SifSendCmd (int cmd, void *packet, int packet_size, void *src_extra, void *dest_extra, int size_extra)
 
unsigned int iSifSendCmd (int cmd, void *packet, int packet_size, void *src_extra, void *dest_extra, int size_extra)
 
void SifAddCmdHandler (int pos, SifCmdHandler_t handler, void *harg)
 
void SifRemoveCmdHandler (int pos)
 
void SifInitCmd (void)
 
void SifExitCmd (void)
 
SifCmdHandlerData_tSifSetCmdBuffer (SifCmdHandlerData_t *db, int size)
 
int SifGetSreg (int index)
 
void SifWriteBackDCache (void *ptr, int size)
 

Detailed Description

EE SIF commands prototypes

Definition in file sifcmd.h.


Data Structure Documentation

◆ t_SifCmdHeader

struct t_SifCmdHeader

SIF command.

Definition at line 22 of file sifcmd.h.

Data Fields
u32 psize: 8

Packet size. Min: 1x16 (header only), max: 7*16

u32 dsize: 24

Payload size

Extra data size

void * dest

Destination address for payload. Can be NULL if there is no payload.

Extra data destination address. May be NULL if there's no extra data.

int cid

Function number of function to call.

Function number of the function to call.

u32 opt

Can be freely used.

◆ t_SifCmdSRegData

struct t_SifCmdSRegData

Structure for remotely (over the SIF) changing the value of a software register (SREG). There are 32 software registers (0 - 31). Registers 0-7 are used by the system.

Definition at line 54 of file sifcmd.h.

+ Collaboration diagram for t_SifCmdSRegData:
Data Fields
SifCmdHeader_t header
int index
unsigned int value

◆ t_SifCmdHandlerData

struct t_SifCmdHandlerData

Definition at line 66 of file sifcmd.h.

Data Fields
SifCmdHandler_t handler
void * harg

◆ _iop_reset_pkt

struct _iop_reset_pkt

Definition at line 75 of file sifcmd.h.

+ Collaboration diagram for _iop_reset_pkt:
Data Fields
struct t_SifCmdHeader header
int arglen
int mode
char arg[RESET_ARG_MAX+1]

Macro Definition Documentation

◆ SIF_CMD_ID_SYSTEM

#define SIF_CMD_ID_SYSTEM   0x80000000

System functions

Definition at line 37 of file sifcmd.h.

◆ SIF_CMD_CHANGE_SADDR

#define SIF_CMD_CHANGE_SADDR   (SIF_CMD_ID_SYSTEM | 0)

Definition at line 39 of file sifcmd.h.

◆ SIF_CMD_SET_SREG

#define SIF_CMD_SET_SREG   (SIF_CMD_ID_SYSTEM | 1)

Definition at line 40 of file sifcmd.h.

◆ SIF_CMD_INIT_CMD

#define SIF_CMD_INIT_CMD   (SIF_CMD_ID_SYSTEM | 2)

Definition at line 41 of file sifcmd.h.

◆ SIF_CMD_RESET_CMD

#define SIF_CMD_RESET_CMD   (SIF_CMD_ID_SYSTEM | 3)

Definition at line 42 of file sifcmd.h.

◆ SIF_CMD_RPC_END

#define SIF_CMD_RPC_END   (SIF_CMD_ID_SYSTEM | 8)

Definition at line 43 of file sifcmd.h.

◆ SIF_CMD_RPC_BIND

#define SIF_CMD_RPC_BIND   (SIF_CMD_ID_SYSTEM | 9)

Definition at line 44 of file sifcmd.h.

◆ SIF_CMD_RPC_CALL

#define SIF_CMD_RPC_CALL   (SIF_CMD_ID_SYSTEM | 10)

Definition at line 45 of file sifcmd.h.

◆ SIF_CMD_RPC_RDATA

#define SIF_CMD_RPC_RDATA   (SIF_CMD_ID_SYSTEM | 12)

Definition at line 46 of file sifcmd.h.

◆ SIF_SREG_RPCINIT

#define SIF_SREG_RPCINIT   0

System SREG

Definition at line 49 of file sifcmd.h.

◆ RESET_ARG_MAX

#define RESET_ARG_MAX   79

Triggers an IOP reboot

Definition at line 73 of file sifcmd.h.

◆ SIF_CMD_M_INTR

#define SIF_CMD_M_INTR   0x01

Called within an interrupt context

Definition at line 102 of file sifcmd.h.

◆ SIF_CMD_M_WBDC

#define SIF_CMD_M_WBDC   0x04

Write back D-cache for extended data

Definition at line 104 of file sifcmd.h.

Typedef Documentation

◆ SifCmdSRegData_t

Structure for remotely (over the SIF) changing the value of a software register (SREG). There are 32 software registers (0 - 31). Registers 0-7 are used by the system.

◆ SifCmdHandler_t

typedef void(* SifCmdHandler_t) (void *data, void *harg)

Definition at line 64 of file sifcmd.h.