Changes

Jump to navigation Jump to search
2,570 bytes added ,  14:44, 14 August 2016
Created page with "dmae.rpl is the system librairy that provides direct access to the memory. (DMA = Direct Memory Access) ==Functions== Every non-bool functions returns a uint64_t timestamp ..."
dmae.rpl is the system librairy that provides direct access to the memory. (DMA = Direct Memory Access)


==Functions==

Every non-bool functions returns a uint64_t timestamp that can be used with DMAEWaitDone

===Wait===
{| class="wikitable"
!Name
!Prototype
!Description
|-
|DMAEWaitDone
|<code>bool DMAEWaitDone(uint64_t ts);</code>
|Return true if all goes normally, return false if a time-out occured E.g of usage: DMAEWaitDone(DMAECopyMem(mem_ptr, 0, 0x100, DMAE_ENDIAN_8IN32));
|}
===Semaphore===
{| class="wikitable"
!Name
!Prototype
!Description
|-
|DMAEInitSemaphore
|<code>void DMAEInitSemaphore(uint64_t *semaphoreAddr, uint64_t semaphoreCount)</code>
|Initialize a Semaphore to synchronize DMA Engine to the GPU (GPU7)
|-
|DMAESemaphore
|<code>void DMAESemaphore(u64 *semaphoreAddr, DMAESemaphoreAction semaphoreAction)</code>
|Create a Semaphore at the specified address
|}
===Memory===
{| class="wikitable"
!Name
!Prototype
!Description
|-
|DMAECopyMem
|<code>void DMAECopyMem(void *dst, const void *src, uint32_t size, DMAEEndian endian)</code>
|Copy src to dest (kinda high-level memcpy)
|-
|DMAECopyMemWait
|<code>bool DMAECopyMemWait(void *dst, const void *src, uint32_t size, DMAEEndian endian)</code>
|Returns true when all goes normally, return false if a time-out occured
|-
|DMAEFillMem
|<code>void DMAEFillMem(void *dst, uint32_t fillData, uint32_t size)</code>
|Fill a virtual memory range with "fillData" (exist in DMAEFillMemWait version)
|-
|DMAEFillMemPhys
|<code>void DMAEFillMemPhys(uint32_t dst_pa, uint32_t fillData, uint32_t size</code>
|Fill a physical memory range with "fillData" (exist in DMAEFillMemPhysWait version)
|}

==Enumeration==
===Semaphore===

{| class="wikitable"
!Name
!Prototype

|-
|DMAESemaphoreAction
|
<syntaxhighlight lang="C">
typedef enum _DMAESemaphoreAction {
DMAE_SEMAPHORE_WAIT = 0x00000000, ///< Wait before processing next command
DMAE_SEMAPHORE_SIGNAL = 0x00000001, ///< Signal after all previous work is done
} DMAESemaphoreAction;
</syntaxhighlight>
|}
===Endian===

{| class="wikitable"
!Name
!Prototype

|-
|DMAEEndian
|
<syntaxhighlight lang="C">
typedef enum DMAEEndian {
DMAE_ENDIAN_NONE = 0x00000000, ///< do-nothing
DMAE_ENDIAN_8IN16 = 0x00000001, ///< 8IN16 swapping mode. Endian swap in 16-bit int buffer.
DMAE_ENDIAN_8IN32 = 0x00000002, ///< 8IN32 swapping mode. Endian swap in 32-bit int buffer.
DMAE_ENDIAN_8IN64 = 0x00000003, ///< 8IN64 swapping mode. Endian swap in 64-bit int buffer. /// Directly from the SDK
} DMAEEndian;
</syntaxhighlight>
|}
33

edits

Navigation menu