SceKernelDmacMgr: Difference between revisions

From Vita Development Wiki
Jump to navigation Jump to search
No edit summary
 
(25 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Direct memory access control Manager
== Module ==
== Module ==


=== Known NIDs ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! Name !! World !! Privilege !! NID
! Version !! World !! Privilege
|-
| 1.69 || SceKernelDmacMgr || Non-secure || Kernel || 0x67E3D2D2
|-
|-
| 3.60 || SceKernelDmacMgr || Non-secure || Kernel || 0xF926C804
| 1.69-3.60 || Non-secure || Kernel
|}
|}


Line 19: Line 18:
! Version !! Name !! World !! Visibility !! NID
! Version !! Name !! World !! Visibility !! NID
|-
|-
| 1.69-3.60 || [[SceKernelDmacMgr#SceDmacmgrForDriver|SceDmacmgrForDriver]] || Non-secure || Kernel || 0xEB4E3738
| 0.990-3.60 || [[SceKernelDmacMgr#SceDmacmgrForDriver|SceDmacmgrForDriver]] || Non-secure || Kernel || 0xEB4E3738
|-
|-
| 0.990 || [[SceKernelDmacMgr#SceDmacmgr|SceDmacmgr]] || Non-secure || User || not present
| 0.990 || [[SceKernelDmacMgr#SceDmacmgr|SceDmacmgr]] || Non-secure || User || not present
Line 48: Line 47:
|-
|-
|}
|}
== Types ==
<source lang="C">
typedef SceInt32 SceDmaOpId;
// Using internally
typedef struct SceDmaOpAlloc { // size is 0x60 on FW 0.990
uint unk_0;
uint unk_4;
uint magic; // 0x81005001
SceUID evfId;
uint unk_10;
uint16_t unk_14; // 1
uint16_t unk_16;
uint maybe_callback_1;
uint stat;
char unk_20[0x14];
int curchain;
uint unk_38; // 0
uint unk_3C;
const char opname[0x20];
} SceDmaOpAlloc;
typedef struct SceKernelDmaOp { // Size is 0x40-bytes on 3.60
int data_0x00;
int data_0x04;
int data_0x08;
int data_0x0C;
void *data_0x10;
int data_0x14;
int data_0x18;
int data_0x1C;
int data_0x20;
int data_0x24;
void *data_0x28;
int cpu_intr;
uintptr_t data_0x30;
SceUID evfid;
SceUInt16 data_0x38;
SceUInt16 data_0x3A;
char *name;
} SceKernelDmaOp;
</source>


== SceDmacmgrForDriver ==
== SceDmacmgrForDriver ==
Line 68: Line 111:
| 0.990-3.60 || 0x03052D0D
| 0.990-3.60 || 0x03052D0D
|}
|}
<source lang="C">int sceKernelDmaOpQuitForDriver(int opid);</source>


=== sceKernelDmaOpAllocForDriver ===
=== sceKernelDmaOpAllocForDriver ===
Line 91: Line 136:
|}
|}


<source lang="C">int sceKernelDmaOpAllocForDriver(const char* name);</source>
Allocate 0x60 bytes of heap.
 
Return opid = (uint)dma_op_heap_addr >> 1 | 1;
 
<source lang="C">SceDmaOpId sceKernelDmaOpAllocForDriver(const char *name);</source>


=== sceKernelDmaOpAssignForDriver ===
=== sceKernelDmaOpAssignForDriver ===
Line 101: Line 150:
|}
|}


Executes [[Dmac5|Dmac5 command]].
Executes [[DMAC|DMAC5 command]].


<source lang="C">int sceKernelDmaOpAssignForDriver(int id, int unk1, int unk2);</source>
<source lang="C">int sceKernelDmaOpAssignForDriver(SceDmaOpId opid, SceUInt32 unk1, SceUInt32 unk2);</source>


=== sceKernelDmaOpFreeForDriver ===
=== sceKernelDmaOpFreeForDriver ===
Line 113: Line 162:
|}
|}


<source lang="C">int sceKernelDmaOpFreeForDriver(int id);</source>
<source lang="C">int sceKernelDmaOpFreeForDriver(int opid);</source>


=== sceKernelDmaOpConcatenateForDriver ===
=== sceKernelDmaOpConcatenateForDriver ===
Line 131: Line 180:
|}
|}


<source lang="C">int sceKernelDmaOpEnQueueForDriver(int id);</source>
<source lang="C">int sceKernelDmaOpEnQueueForDriver(int opid);</source>


=== sceKernelDmaOpDeQueueForDriver ===
=== sceKernelDmaOpDeQueueForDriver ===
Line 148: Line 197:
| 0.990-3.60 || 0xCF627CFD
| 0.990-3.60 || 0xCF627CFD
|}
|}
<source lang="C">int sceKernelDmaOpSetCallbackForDriver(int opid, int a2, int a3);</source>


=== sceKernelDmaOpSyncForDriver ===
=== sceKernelDmaOpSyncForDriver ===
Line 157: Line 208:
|}
|}


<source lang="C">int sceKernelDmaOpSyncForDriver(int id, int a2, int a3, int a4);</source>
<source lang="C">int sceKernelDmaOpSyncForDriver(int opid, SceUInt32 op_sync_mode, SceUInt32 timeout, SceInt32 *result);</source>


=== sceKernelDmacMemcpyForDriver ===
=== sceKernelDmacMemcpyForDriver ===
Line 166: Line 217:
| 0.990-3.60 || 0x00896B11
| 0.990-3.60 || 0x00896B11
|}
|}
Synchronous <code>memcpy</code>, wrapper around [[SceKernelDmacMgr#sceKernelDmacMemcpyAsyncForDriver]].
<source lang="c">SceInt32 sceKernelDmacMemcpyForDriver(void *dst, const void *src, SceSize size);</source>


=== sceKernelDmacMemsetForDriver ===
=== sceKernelDmacMemsetForDriver ===
Line 188: Line 243:
} SceDmaOpKey;
} SceDmaOpKey;


int sceKernelDmaOpSetupDirectForDriver(int id, SceDmaOpKey *a2, int a3);</source>
int sceKernelDmaOpSetupDirectForDriver(int opid, SceDmaOpKey *a2, int a3);</source>


=== sceKernelDmacMemcpyAsyncForDriver ===
=== sceKernelDmacMemcpyAsyncForDriver ===
Line 219: Line 274:


A big function. TO RE.
A big function. TO RE.
=== SceDmacmgrForDriver_1EDD385C ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.940 || 0x1EDD385C
|}
Returns SCE_KERNEL_ERROR_NOT_IMPLEMENTED.
=== SceDmacmgrForDriver_DCBA0B59 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.940 || 0xDCBA0B59
|}
Returns SCE_KERNEL_ERROR_NOT_IMPLEMENTED.


=== SceDmacmgrForDriver_893FCB80 ===
=== SceDmacmgrForDriver_893FCB80 ===
Line 250: Line 325:
|}
|}


 
[[Category:ARM]]
[[Category:Kernel]]
[[Category:Modules]]
[[Category:Modules]]
[[Category:Kernel]]
[[Category:Library]]

Latest revision as of 08:18, 15 August 2023

Direct memory access control Manager

Module

Version World Privilege
1.69-3.60 Non-secure Kernel

Libraries

Known NIDs

Version Name World Visibility NID
0.990-3.60 SceDmacmgrForDriver Non-secure Kernel 0xEB4E3738
0.990 SceDmacmgr Non-secure User not present
3.60 SceDmacmgr Non-secure User 0xA9E5B2F0

Data segment layout

Address Size Description
0x0000 0x04 void* SceDmacmgrDmac0Reg membase
0x0004 0x04 void* SceDmacmgrDmac1Reg membase
0x0008 0x04 void* SceDmacmgrDmac2Reg membase
0x000C 0x04 void* SceDmacmgrDmac3Reg membase
0x0010 0x04 void* SceDmacmgrDmac4Reg membase
0x0014 0x04 void* SceDmacmgrDmac5Reg membase
0x0018 0x04 void* SceDmacmgrDmac6Reg membase
0x001C 0x1284

Types

typedef SceInt32 SceDmaOpId;

// Using internally
typedef struct SceDmaOpAlloc { // size is 0x60 on FW 0.990
	uint unk_0;
	uint unk_4;
	uint magic; // 0x81005001
	SceUID evfId;
	uint unk_10;
	uint16_t unk_14; // 1
	uint16_t unk_16;
	uint maybe_callback_1;
	uint stat;
	char unk_20[0x14];
	int curchain;
	uint unk_38; // 0
	uint unk_3C;
	const char opname[0x20];
} SceDmaOpAlloc;

typedef struct SceKernelDmaOp { // Size is 0x40-bytes on 3.60
	int data_0x00;
	int data_0x04;
	int data_0x08;
	int data_0x0C;
	void *data_0x10;
	int data_0x14;
	int data_0x18;
	int data_0x1C;
	int data_0x20;
	int data_0x24;
	void *data_0x28;
	int cpu_intr;
	uintptr_t data_0x30;
	SceUID evfid;
	SceUInt16 data_0x38;
	SceUInt16 data_0x3A;
	char *name;
} SceKernelDmaOp;

SceDmacmgrForDriver

sceKernelDmaOpSetupChainForDriver

Version NID
0.990-3.60 0x167079FC
int sceKernelDmaOpSetupChainForDriver(uint32_t opid, void *pTag, int *a3, uint32_t flag);

sceKernelDmaOpQuitForDriver

Version NID
0.990-3.60 0x03052D0D
int sceKernelDmaOpQuitForDriver(int opid);

sceKernelDmaOpAllocForDriver

Version NID
0.990-3.60 0x7CD5088A

Usages:

Module Name
SceSblSsMgr SceSblDmac5Common, Dmac5Test_Direct
SceDisplay SceDisplay
SceAudio SceSrcMix%d%d
SceCodecEngineWrapper SceVeneziaDmacMemcpy%02u, SceHwd0DmacMemcpy%02u

Allocate 0x60 bytes of heap.

Return opid = (uint)dma_op_heap_addr >> 1 | 1;

SceDmaOpId sceKernelDmaOpAllocForDriver(const char *name);

sceKernelDmaOpAssignForDriver

Version NID
0.990-3.60 0xFCE4171A

Executes DMAC5 command.

int sceKernelDmaOpAssignForDriver(SceDmaOpId opid, SceUInt32 unk1, SceUInt32 unk2);

sceKernelDmaOpFreeForDriver

Version NID
0.990-3.60 0xADFF1186
int sceKernelDmaOpFreeForDriver(int opid);

sceKernelDmaOpConcatenateForDriver

Version NID
0.990-3.60 0xA4454DEA

sceKernelDmaOpEnQueueForDriver

Version NID
0.990-3.60 0x543F54CF
int sceKernelDmaOpEnQueueForDriver(int opid);

sceKernelDmaOpDeQueueForDriver

Version NID
0.990-3.60 0x7433F70F

sceKernelDmaOpSetCallbackForDriver

Version NID
0.990-3.60 0xCF627CFD
int sceKernelDmaOpSetCallbackForDriver(int opid, int a2, int a3);

sceKernelDmaOpSyncForDriver

Version NID
0.990-3.60 0x397A917C
int sceKernelDmaOpSyncForDriver(int opid, SceUInt32 op_sync_mode, SceUInt32 timeout, SceInt32 *result);

sceKernelDmacMemcpyForDriver

Version NID
0.990-3.60 0x00896B11

Synchronous memcpy, wrapper around SceKernelDmacMgr#sceKernelDmacMemcpyAsyncForDriver.

SceInt32 sceKernelDmacMemcpyForDriver(void *dst, const void *src, SceSize size);

sceKernelDmacMemsetForDriver

Version NID
0.990-3.60 0x4BAC049B

sceKernelDmaOpSetupDirectForDriver

Version NID
0.990-3.60 0x01A599E0
typedef struct SceDmaOpKey {
	char data[0x4C];
} SceDmaOpKey;

int sceKernelDmaOpSetupDirectForDriver(int opid, SceDmaOpKey *a2, int a3);

sceKernelDmacMemcpyAsyncForDriver

Version NID
0.990 0x6E81B8BF
3.60 not present

sceKernelDmacMemsetAsyncForDriver

Version NID
0.990 0x6FD7F708
3.60 not present

SceDmacmgrForDriver_BCBB5E85

Version NID
0.990-3.60 0xBCBB5E85

A big function. TO RE.

SceDmacmgrForDriver_1EDD385C

Version NID
0.940 0x1EDD385C

Returns SCE_KERNEL_ERROR_NOT_IMPLEMENTED.

SceDmacmgrForDriver_DCBA0B59

Version NID
0.940 0xDCBA0B59

Returns SCE_KERNEL_ERROR_NOT_IMPLEMENTED.

SceDmacmgrForDriver_893FCB80

Version NID
0.990-3.60 0x893FCB80

On FW 0.990 simply returns SCE_KERNEL_ERROR_NOT_IMPLEMENTED.

SceDmacmgr

This library doesn't exist on FW 0.990.

sceDmacMemcpy

Version NID
3.60 0x9B2FF739

sceDmacMemset

Version NID
3.60 0xA4C33F11