You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.3 KiB
57 lines
1.3 KiB
#ifndef __SPS2_SIF_DMA_HEADERS__
|
|
#define __SPS2_SIF_DMA_HEADERS__
|
|
|
|
#include "../../core/base/basicTypes.h"
|
|
|
|
#define SIF_DMA_INT_I 0x2
|
|
#define SIF_DMA_INT_O 0x4
|
|
|
|
#define SIF_DMA_ERT 0x40
|
|
|
|
#define SIF_REG_ID_SYSTEM 0x80000000
|
|
|
|
typedef enum e_sif_regs {
|
|
/** Main -> sub-CPU command buffer (MSCOM) */
|
|
SIF_REG_MAINADDR = 1,
|
|
/** Sub -> main-CPU command buffer (SMCOM) */
|
|
SIF_REG_SUBADDR,
|
|
/** Main -> sub-CPU flag (MSFLAG) */
|
|
SIF_REG_MSFLAG,
|
|
/** Sub -> main-CPU flag (SMFLAG) */
|
|
SIF_REG_SMFLAG,
|
|
|
|
//Used with the EE kernel. Not actually physical registers like the above, but are implemented in software.
|
|
SIF_SYSREG_SUBADDR = SIF_REG_ID_SYSTEM|0,
|
|
SIF_SYSREG_MAINADDR,
|
|
SIF_SYSREG_RPCINIT
|
|
} sif_regs_t;
|
|
|
|
//Status bits for the SM and MS SIF registers
|
|
/** SIF initialized */
|
|
#define SIF_STAT_SIFINIT 0x10000
|
|
/** SIFCMD initialized */
|
|
#define SIF_STAT_CMDINIT 0x20000
|
|
/** Bootup completed */
|
|
#define SIF_STAT_BOOTEND 0x40000
|
|
|
|
typedef struct s_sif_dma_transfer{
|
|
void * src,
|
|
* dest;
|
|
uint32_t size;
|
|
uint32_t attr;
|
|
} sif_dma_transfer_t;
|
|
|
|
typedef sif_dma_transfer_t SifDmaTransfer_t;
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
uint32_t SifSetDma( sif_dma_transfer_t *sdd, uint32_t len );
|
|
uint32_t SifDmaStat( uint32_t id );
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __SIFDMA_H__ */
|