SceDeci4pSDfMgr: Difference between revisions

From Vita Development Wiki
Jump to navigation Jump to search
(→‎SceDeci4pSDfMgrForKernel: add SceDeci4pSDfMgrForKernel_A963E333)
(→‎SceDeci4pSDfMgrForKernel: Add SceDeci4pSDfMgrForKernel_98AEC60E)
Line 158: Line 158:
Calls <code>[[SceDeci4pSDfMgr#sceSDfMgrExReqSend|sceSDfMgrExReqSend]](sock)</code>, then may call an Host Interface function and/or call <code>sceKernelGenerateSoftIntrForDriver(1, 0, targetLUT[sceKernelCpuId()])</code> where <code>targetLUT = {1, 2, 4, 8}</code>.
Calls <code>[[SceDeci4pSDfMgr#sceSDfMgrExReqSend|sceSDfMgrExReqSend]](sock)</code>, then may call an Host Interface function and/or call <code>sceKernelGenerateSoftIntrForDriver(1, 0, targetLUT[sceKernelCpuId()])</code> where <code>targetLUT = {1, 2, 4, 8}</code>.
<source lang="C">SceInt32 SceDeci4pSDfMgrForKernel_A963E333(SceSDfMgrSocketId sock);</source>
<source lang="C">SceInt32 SceDeci4pSDfMgrForKernel_A963E333(SceSDfMgrSocketId sock);</source>
=== SceDeci4pSDfMgrForKernel_98AEC60E ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990 || 0x98AEC60E
|}


=== SceDeci4pSDfMgrForKernel_FFC95B63 ===
=== SceDeci4pSDfMgrForKernel_FFC95B63 ===
Line 312: Line 320:
           SceDeci4pSDfMgrForKernel_59C077B3: 0x59C077B3
           SceDeci4pSDfMgrForKernel_59C077B3: 0x59C077B3
           SceDeci4pSDfMgrForKernel_682D0EFB: 0x682D0EFB
           SceDeci4pSDfMgrForKernel_682D0EFB: 0x682D0EFB
          SceDeci4pSDfMgrForKernel_98AEC60E: 0x98AEC60E
           SceDeci4pSDfMgrForKernel_B44083E1: 0xB44083E1
           SceDeci4pSDfMgrForKernel_B44083E1: 0xB44083E1
           SceDeci4pSDfMgrForKernel_BFB482D8: 0xBFB482D8
           SceDeci4pSDfMgrForKernel_BFB482D8: 0xBFB482D8

Revision as of 15:03, 23 March 2022

Module

This module exists only in non-secure world. The SELF can be found in os0:kd/deci4p_sdfmgr.skprx.

Version World Privilege
0.990-3.65 Non-secure Kernel

Libraries

Known NIDs

Version Name World Visibility NID
0.990-3.65 SceDeci4pSDfMgrForKernel Non-secure Kernel 0xA1386CB2

Types

//Error codes (guessed names)
#define SCE_DECI_SYS_ERROR_INVALID_ARGUMENT (-2146893823)      //<! 0x80090001
#define SCE_DECI_SYS_ERROR_INVALID_SOCKET (-2146893822)        //<! 0x80090002 - ExSend returns INVALID_ARGUMENT on a bad socket though :x
#define SCE_DECI_SYS_ERROR_ALREADY_REGISTERED (-2146893821)    //<! 0x80090003
#define SCE_DECI_SYS_ERROR_NO_ENTRY (-2146893820)              //<! 0x80090004 - no free entry to create socket remaining
#define SCE_DECI_SYS_ERROR_ILLEGAL_ADDR (-2146893819)          //<! 0x80090005 - unexpected NULL provided
#define SCE_DECI_SYS_ERROR_INVALID_ARGUMENT_SIZE (-2146893818) //<! 0x80090006
#define SCE_DECI_SYS_ERROR_BLOCKED (-2146893817)               //<! 0x80090007
#define SCE_DECI_SYS_ERROR_UNKNOWN_A (-2146893814)             //<! 0x8009000A
#define SCE_DECI_SYS_ERROR_NO_HOST_IF (-2146893811)            //<! 0x8009000D - no Host Interface

#define SCE_SDFMGR_EXCP_TYPE_PABT  (0)
#define SCE_SDFMGR_EXCP_TYPE_DABT  (1)
#define SCE_SDFMGR_EXCP_TYPE_UNDEF (2)
#define SCE_SDFMGR_EXCP_TYPE_BUS   (3)

typedef int (* SceSDfMgrExceptionCallback)(SceExcpmgrExceptionContext *context, SceUInt32 pc, SceUInt32 cpsr);

typedef SceInt32 SceSDfMgrSocketId;

#define SCE_SDFMGR_EVENT_TYPE_1  (1) //recieved something
#define SCE_SDFMGR_EVENT_TYPE_2  (2)
#define SCE_SDFMGR_EVENT_TYPE_3  (3) //something to send
#define SCE_SDFMGR_EVENT_TYPE_4  (4)
#define SCE_SDFMGR_EVENT_TYPE_5  (5)
#define SCE_SDFMGR_EVENT_TYPE_6  (6)

typedef void (* SceSDfMgrEventHandler)(SceUInt32 event, void* eventData, void* pCommon); //<! pCommon is the data passed to Open/ExOpen

typedef struct _SceSDfMgrOpenParam {
    SceSize size;         //<! Size of this structure (0x1C)
    SceUInt32 clientId;   //<! Unique number, used to identify called - must not be 0
    SceUInt32 unk8;
    SceUInt32 unkC;
    SceUInt32 unk10;
    SceUInt16 unk14;
    SceUInt16 flags;      //<! Bitflag: 0x1 makes the initial "status" 0x3 instead of 0x1, 0x2 makes a call to dcmpSendStatusProtocolAlias, ...
    char* name;           //<! Name of the "caller" - example: DCMP
} SceSDfMgrOpenParam;

typedef void (* SceSDfMgrBreakHook)(void);

SceDeci4pSDfMgrForKernel

sceSDfMgrOpen

Version NID
0.990 0xA55F5F0D

Acquires an interrupt-suspending lock and calls sceSDfMgrExOpen.

SceSDfMgrSocketId sceSDfMgrOpen(SceSDfMgrEventHandler eventHandler, const SceSDfMgrOpenParam* openParam, void* pCommon);

sceSDfMgrExOpen

Version NID
0.990 0xCF4A3E03

Open a SDfMgr socket. openParam is not retained and can be disposed of after this call.

SceSDfMgrSocketId sceSDfMgrExOpen(SceSDfMgrEventHandler eventHandler, const SceSDfMgrOpenParam* openParam, void* pCommon);

sceSDfMgrExSend

Version NID
0.990 0xDAFE03AD

Sends up to bufLen bytes from buffer, and returns number of bytes sent on success.

Note that buffer is not const: this is not a typo. buffer may be written to under specific conditions.

SceSSize sceSDfMgrExSend(SceSDfMgrSocketId sock, void* buffer, SceSize bufLen);

sceSDfMgrExRecv

Version NID
0.990 0xF43F5941

Receives up to bufLen bytes in buffer, and returns number of bytes received on success.

SceSSize sceSDfMgrExRecv(SceSDfMgrSocketId sock, void* buffer, SceSize bufLen);

SceDeci4pSDfMgrForKernel_86CFC8C6

Version NID
0.990 0x86CFC8C6

Potential name is sceSDfMgrClose. Acquires an interrupt-suspending lock and calls sceSDfMgrExClose.

SceInt32 SceDeci4pSDfMgrForKernel_86CFC8C6(SceSDfMgrSocketId sock);

sceSDfMgrExClose

Version NID
0.990 0x90E8D453

Close a SDfMgr socket.

SceInt32 sceSDfMgrExClose(SceSDfMgrSocketId sock);

sceSDfMgrBreakSystem

Version NID
0.990 0xEDFBA012

Sets up some internal state and calls sceKernelGenerateSoftIntrForDriver(0, 1, 0).

SceInt32 sceSDfMgrBreakSystem(void);

sceSDfMgrContinueSystem

Version NID
0.990 0x9A653F19

Sets up some internal state and calls sceKernelGenerateSoftIntrForDriver(0, 1, 0).

SceInt32 sceSDfMgrContinueSystem(void);

SceDeci4pSDfMgrForKernel_A963E333

Version NID
0.990 0xA963E333

Calls sceSDfMgrExReqSend(sock), then may call an Host Interface function and/or call sceKernelGenerateSoftIntrForDriver(1, 0, targetLUT[sceKernelCpuId()]) where targetLUT = {1, 2, 4, 8}.

SceInt32 SceDeci4pSDfMgrForKernel_A963E333(SceSDfMgrSocketId sock);

SceDeci4pSDfMgrForKernel_98AEC60E

Version NID
0.990 0x98AEC60E

SceDeci4pSDfMgrForKernel_FFC95B63

Version NID
0.990 0xFFC95B63

Equivalent to SceDeci4pDfMgrForDebugger_6D26CC56. Writes val as a 3-byte unsigned integer to ptr.

void SceDeci4pSDfMgrForKernel_FFC95B63(void* ptr, SceUInt32 val);

SceDeci4pSDfMgrForKernel_68903C1D

Version NID
0.990 0x68903C1D

Equivalent to SceDeci4pDfMgrForDebugger_CACAB5F9. Reads value at ptr as a 3-byte unsigned integer and returns it.

SceUInt32 SceDeci4pSDfMgrForKernel_68903C1D(void* ptr);

SceDeci4pSDfMgrForKernel_81E7C5BD

Version NID
0.990 0x81E7C5BD

Special memset variant. len will be aligned down to meet 4-byte alignement requirement (i.e. bottom 2 bits of len are ignored).

void* SceDeci4pSDfMgrForKernel_81E7C5BD(void* dst, int ch, size_t len);

SceDeci4pSDfMgrForKernel_5996E2DB

Version NID
0.990 0x5996E2DB

Equivalent to memcpy.

void* SceDeci4pSDfMgrForKernel_8A3B06F2(void* dst, void* src, size_t len);

SceDeci4pSDfMgrForKernel_8A3B06F2

Version NID
0.990 0x8A3B06F2

Equivalent to memset.

void* SceDeci4pSDfMgrForKernel_8A3B06F2(void* dst, int ch, size_t len);

SceDeci4pSDfMgrForKernel_CCD56670

Version NID
0.990 0xCCD56670

Equivalent to memchr.

void* SceDeci4pSDfMgrForKernel_CCD56670(void* s, int ch, size_t len);

SceDeci4pSDfMgrForKernel_501CE61D

Version NID
0.990 0x501CE61D

A printf-like function.

size_t SceDeci4pSDfMgrForKernel_501CE61D(char* fmt, ...);

SceDeci4pSDfMgrForKernel_0A6437B6

Version NID
0.990 0x0A6437B6

A potential name for is function is sceSDfMgrIsSystemInBreak.

Returns respectively 1 or 0 depending on whether sceSDfMgrBreakSystem or sceSDfMgrContinueSystem was called last.

SceBool SceDeci4pSDfMgrForKernel_0A6437B6(void);

sceSDfMgrUnregisterExcpHandlerForKernel

Version NID
0.990 0xB050A0D5

Guessed name was sceSDfMgrUnregisterCpuExcpCallbackForKernel. This name is a deduction from sceSDfMgrRegisterExcpHandlerForKernel.

Unregisters an exception handler previously registered using sceSDfMgrRegisterExcpHandlerForKernel. Call it using the same arguments as provided to sceSDfMgrRegisterExcpHandlerForKernel.

SceInt32 sceSDfMgrUnregisterExcpHandlerForKernel(SceSDfMgrExceptionCallback func, SceUInt32 type);

sceSDfMgrRegisterExcpHandlerForKernel

Version NID
0.990-3.60 0x6BF5553C

Guessed name was sceSDfMgrRegisterCpuExcpCallbackForKernel.

Used by SceDeci4pSDbgp.

SceInt32 sceSDfMgrRegisterExcpHandlerForKernel(SceSDfMgrExceptionCallback func, SceUInt32 type);

sceSDfMgrRegisterBreakHook

Version NID
0.990 0xB22B42FB

Registers a function to be called when some exceptions or interrupts happen.

SceInt32 sceSDfMgrRegisterBreakHook(SceSDfMgrBreakHook hook);

sceSDfMgrUnregisterBreakHook

Version NID
0.990 0xE53400AE

This name is a deduction from sceSDfMgrRegisterBreakHook.

Unregisters a break hook previously registered using sceSDfMgrRegisterBreakHook. Call it using the same argument as provided to sceSDfMgrRegisterBreakHook.

SceInt32 sceSDfMgrUnregisterBreakHook(SceSDfMgrBreakHook hook);


         SceDeci4pSDfMgrForKernel_11340BD4: 0x11340BD4
         SceDeci4pSDfMgrForKernel_152D98DF: 0x152D98DF
         SceUInt32 SceDeci4pSDfMgrForKernel_35238B8A(void); // sceDeci4pSDfMgrGetMemoryTypeForKernel
         SceDeci4pSDfMgrForKernel_3A25594F: 0x3A25594F
         SceDeci4pSDfMgrForKernel_4D974C08: 0x4D974C08
         SceDeci4pSDfMgrForKernel_4EA65698: 0x4EA65698
         SceDeci4pSDfMgrForKernel_58D7597A: 0x58D7597A
         SceDeci4pSDfMgrForKernel_59C077B3: 0x59C077B3
         SceDeci4pSDfMgrForKernel_682D0EFB: 0x682D0EFB
         SceDeci4pSDfMgrForKernel_B44083E1: 0xB44083E1
         SceDeci4pSDfMgrForKernel_BFB482D8: 0xBFB482D8
         SceDeci4pSDfMgrForKernel_C38EA67A: 0xC38EA67A
         SceDeci4pSDfMgrForKernel_FCF211FB: 0xFCF211FB