vitasdk
Documentation of the vitasdk

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceDmacmgrForDriver_stub



Modules

 DMAC Register Fields
 

Functions

 VITASDK_BUILD_ASSERT_EQ (4, SceKernelDmaOpId)
 
 VITASDK_BUILD_ASSERT_EQ (0x20, SceKernelDmaOpTag)
 
 VITASDK_BUILD_ASSERT_EQ (0x50, SceKernelDmaOpEncDec)
 
 VITASDK_BUILD_ASSERT_EQ (0xC, SceKernelDmaOpChainParam)
 
 VITASDK_BUILD_ASSERT_EQ (0x5C, SceKernelDmaOpEncDecChainParam)
 
 VITASDK_BUILD_ASSERT_EQ (0x6C, SceKernelDmaOpDirectParam)
 
SceKernelDmaOpId ksceKernelDmaOpAlloc (const char *name)
 Allocate a DMA Op handle. More...
 
int ksceKernelDmaOpFree (SceKernelDmaOpId opid)
 Free a DMA Op handle. More...
 
int ksceKernelDmaOpEnQueue (SceKernelDmaOpId opid)
 Enqueue a DMA Op. More...
 
int ksceKernelDmaOpDeQueue (SceKernelDmaOpId opid)
 Dequeue a DMA Op. More...
 
int ksceKernelDmaOpQuit (SceKernelDmaOpId opid)
 Cancel a DMA Op. More...
 
int ksceKernelDmaOpSync (SceKernelDmaOpId opid, SceKernelDmaOpSyncMode syncMode, SceUInt32 *pTimeout, SceKernelDmaOpTag **ppErrorTag)
 Synchronize with the completion of a DMA Op. More...
 
int ksceKernelDmaOpAssign (SceKernelDmaOpId opid, SceKernelDmacId dmac, SceUInt32 channel)
 Assign a DMA Op to one of the DMA controllers. More...
 
int ksceKernelDmaOpSetupDirect (SceKernelDmaOpId opid, SceKernelDmaOpDirectParam *pParam, SceKernelDmaOpFlag flag)
 Setup a DMA Op with a direct set of parameters. More...
 
int ksceKernelDmaOpSetupChain (SceKernelDmaOpId opid, SceKernelDmaOpTag *pTag, SceKernelDmaOpChainParam *pParam, SceKernelDmaOpFlag flag)
 Setup a DMA Op with a chain of tags. More...
 
int ksceKernelDmaOpConcatenate (SceKernelDmaOpId opid, SceKernelDmaOpTag *pTag, SceKernelDmaOpFlag flag)
 Append a new list of tags to the DMA Op. More...
 
int ksceKernelDmaOpSetCallback (SceKernelDmaOpId opid, SceKernelDmaOpCallback callback, void *pUserData)
 Set the callback for the completion of the DMA Op. More...
 

Typedefs

typedef SceInt32 SceKernelDmaOpId
 
typedef void(* SceKernelDmaOpCallback) (SceKernelDmaOpId opid, SceUInt32 stat, void *pUserData, SceKernelDmaOpTag *pTag)
 

Macros

#define SCE_KERNEL_DMAC_CHAIN_END   ((SceKernelDmaOpTag *)0xFFFFFFFF)
 Signifies the end of the DMA tag chain. More...
 

Generic DMA Functions

int ksceDmacMemcpy (void *dst, const void *src, SceSize size)
 DMA memcpy. More...
 
int ksceDmacMemset (void *dst, int c, SceSize size)
 DMA memset. More...
 

Data Structure Documentation

◆ SceKernelDmaOpTag

struct SceKernelDmaOpTag
Data Fields
const void * src
void * dst
SceUInt32 len
SceUInt32 cmd Bitwise combination of SCE_KERNEL_DMAC_CMD_* fields.
SceUInt32 keyring
void * iv Must be a physical address.
SceUInt32 blockSize
struct SceKernelDmaOpTag * pNext Set to SCE_KERNEL_DMAC_CHAIN_END to signify the last tag.

◆ SceKernelDmaOpEncDec

struct SceKernelDmaOpEncDec
Data Fields
SceUInt32 keyring
void * iv Must be a physical address.
SceUInt32 ivCoherencyMask
SceUInt32 reserved
SceUInt8 key[0x40]

◆ SceKernelDmaOpChainParam

struct SceKernelDmaOpChainParam
Data Fields
SceSize size
SceUInt32 coherencyMask
SceUInt32 setValue 8-bit value duplicated into 32 bits

◆ SceKernelDmaOpEncDecChainParam

struct SceKernelDmaOpEncDecChainParam
Data Fields
SceKernelDmaOpChainParam header header.size = sizeof(SceKernelDmaOpEncDecChainParam)
SceKernelDmaOpEncDec encDec

◆ SceKernelDmaOpDirectParam

struct SceKernelDmaOpDirectParam
Data Fields
const void * src
void * dst
SceUInt32 len
SceUInt32 cmd Bitwise combination of SCE_KERNEL_DMAC_CMD_* fields.
SceUInt32 blockSize
SceUInt32 coherencyMask
SceUInt32 setValue 8-bit value duplicated into 32 bits
SceKernelDmaOpEncDec encDec

Macro Definition Documentation

◆ SCE_KERNEL_DMAC_CHAIN_END

#define SCE_KERNEL_DMAC_CHAIN_END   ((SceKernelDmaOpTag *)0xFFFFFFFF)

Signifies the end of the DMA tag chain.

Typedef Documentation

◆ SceKernelDmaOpId

◆ SceKernelDmaOpCallback

typedef void(* SceKernelDmaOpCallback) (SceKernelDmaOpId opid, SceUInt32 stat, void *pUserData, SceKernelDmaOpTag *pTag)

Enumeration Type Documentation

◆ SceKernelDmacId

Enumerator
SCE_KERNEL_DMAC_ID_DMAC01 

DMAC0/1.

SCE_KERNEL_DMAC_ID_DMAC23 

DMAC2/3.

SCE_KERNEL_DMAC_ID_DMAC4 

DMAC4.

SCE_KERNEL_DMAC_ID_DMAC5 

DMAC5.

SCE_KERNEL_DMAC_ID_DMAC6 

DMAC6 (Devkit only)

◆ SceKernelDmaOpFlag

Enumerator
SCE_KERNEL_DMA_OP_PHYSICAL_ADDR 

src and dst addresses are physical addresses

SCE_KERNEL_DMA_OP_VIRTUAL_SRC_ADDR 

src addresses are virtual addresses

SCE_KERNEL_DMA_OP_VIRTUAL_DST_ADDR 

dst addresses is virtual addresses

SCE_KERNEL_DMA_OP_VIRTUAL_ADDR 

Both src and dst addresses are virtual addresses.

SCE_KERNEL_DMA_OP_COMPLETE_CHAIN 

Full DMA chain is provided, starting from pTag and ending with pTag + 1.

◆ SceKernelDmaOpSyncMode

Enumerator
SCE_KERNEL_DMA_OP_SYNC_POLL 

Poll for completion without waiting.

SCE_KERNEL_DMA_OP_SYNC_WAIT 

Wait for completion.

SCE_KERNEL_DMA_OP_SYNC_TIMED_WAIT 

Wait for completion with timeout.

Function Documentation

◆ ksceDmacMemcpy()

int ksceDmacMemcpy ( void *  dst,
const void *  src,
SceSize  size 
)

DMA memcpy.

Parameters
[in]dst- Destination
[in]src- Source
[in]size- Size
Returns
0 on success, < 0 on error.

◆ ksceDmacMemset()

int ksceDmacMemset ( void *  dst,
int  c,
SceSize  size 
)

DMA memset.

Parameters
[in]dst- Destination
[in]c- Constant
[in]size- Size
Returns
0 on success, < 0 on error.

◆ VITASDK_BUILD_ASSERT_EQ() [1/6]

VITASDK_BUILD_ASSERT_EQ ( ,
SceKernelDmaOpId   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/6]

VITASDK_BUILD_ASSERT_EQ ( 0x20  ,
SceKernelDmaOpTag   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/6]

VITASDK_BUILD_ASSERT_EQ ( 0x50  ,
SceKernelDmaOpEncDec   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/6]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceKernelDmaOpChainParam   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/6]

VITASDK_BUILD_ASSERT_EQ ( 0x5C  ,
SceKernelDmaOpEncDecChainParam   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/6]

VITASDK_BUILD_ASSERT_EQ ( 0x6C  ,
SceKernelDmaOpDirectParam   
)

◆ ksceKernelDmaOpAlloc()

SceKernelDmaOpId ksceKernelDmaOpAlloc ( const char *  name)

Allocate a DMA Op handle.

Parameters
name- Name of the DMA Op.
Returns
the ID of the DMA Op on success, < 0 on error.

◆ ksceKernelDmaOpFree()

int ksceKernelDmaOpFree ( SceKernelDmaOpId  opid)

Free a DMA Op handle.

Parameters
opid- The DMA Op to free.
Returns
0 on success, < 0 on error.

◆ ksceKernelDmaOpEnQueue()

int ksceKernelDmaOpEnQueue ( SceKernelDmaOpId  opid)

Enqueue a DMA Op.

Parameters
opid- The target DMA Op.
Returns
0 on success, < 0 on error.

◆ ksceKernelDmaOpDeQueue()

int ksceKernelDmaOpDeQueue ( SceKernelDmaOpId  opid)

Dequeue a DMA Op.

Parameters
opid- The target DMA Op.
Returns
0 on success, < 0 on error.

◆ ksceKernelDmaOpQuit()

int ksceKernelDmaOpQuit ( SceKernelDmaOpId  opid)

Cancel a DMA Op.

Parameters
opid- The target DMA Op.
Returns
0 on success, < 0 on error.

◆ ksceKernelDmaOpSync()

int ksceKernelDmaOpSync ( SceKernelDmaOpId  opid,
SceKernelDmaOpSyncMode  syncMode,
SceUInt32 pTimeout,
SceKernelDmaOpTag **  ppErrorTag 
)

Synchronize with the completion of a DMA Op.

Parameters
opid- The target DMA Op.
syncMode- One of SceKernelDmaOpSyncMode
pTimeout- Time limit for SCE_KERNEL_DMA_OP_SYNC_TIMED_WAIT
ppErrorTag- The SceKernelDmaOpTag which was running when the DMA Op failed.
Returns
0 on success, < 0 on error.

◆ ksceKernelDmaOpAssign()

int ksceKernelDmaOpAssign ( SceKernelDmaOpId  opid,
SceKernelDmacId  dmac,
SceUInt32  channel 
)

Assign a DMA Op to one of the DMA controllers.

Parameters
opid- The target DMA Op.
dmac- The DMA controller to assign it to.
channel- The channel of the controller (0 - 15 for DMAC4, 0 otherwise).
Returns
0 on success, < 0 on error.

◆ ksceKernelDmaOpSetupDirect()

int ksceKernelDmaOpSetupDirect ( SceKernelDmaOpId  opid,
SceKernelDmaOpDirectParam pParam,
SceKernelDmaOpFlag  flag 
)

Setup a DMA Op with a direct set of parameters.

Parameters
opid- The target DMA Op.
pParam- The parameters for the DMA Op.
flag- One of SceKernelDmaOpFlag, excluding SCE_KERNEL_DMA_OP_COMPLETE_CHAIN.
Returns
0 on success, < 0 on error.

◆ ksceKernelDmaOpSetupChain()

int ksceKernelDmaOpSetupChain ( SceKernelDmaOpId  opid,
SceKernelDmaOpTag pTag,
SceKernelDmaOpChainParam pParam,
SceKernelDmaOpFlag  flag 
)

Setup a DMA Op with a chain of tags.

Parameters
opid- The target DMA Op.
pTag- The list of DMA tags for the op.
pParam- The parameters for the DMA Op.
flag- One of SceKernelDmaOpFlag.
Returns
0 on success, < 0 on error.

◆ ksceKernelDmaOpConcatenate()

int ksceKernelDmaOpConcatenate ( SceKernelDmaOpId  opid,
SceKernelDmaOpTag pTag,
SceKernelDmaOpFlag  flag 
)

Append a new list of tags to the DMA Op.

Parameters
opid- The target DMA Op.
pTag- The list of DMA tags to append.
flag- One of SceKernelDmaOpFlag.
Returns
0 on success, < 0 on error.

◆ ksceKernelDmaOpSetCallback()

int ksceKernelDmaOpSetCallback ( SceKernelDmaOpId  opid,
SceKernelDmaOpCallback  callback,
void *  pUserData 
)

Set the callback for the completion of the DMA Op.

Parameters
opid- The target DMA Op.
callback- The callback.
pUserData- The callback parameter.
Returns
0 on success, < 0 on error.