SceSysmem: Difference between revisions

From Vita Development Wiki
Jump to navigation Jump to search
Tags: mobile edit mobile web edit
Tags: Replaced mobile edit mobile web edit
Line 1: Line 1:
SceSysmem is a kernel module that acts as the heart of the kernel. It exports multiple libraries for various features. SceSysmem is the first module that is loaded in the [[Boot Sequence|kernel load sequence]] and its libraries are imported by almost all other modules. See [[Memory]] for more details on the memory subsystem.
== Module ==
This module exists in both non-secure and secure world. The non-secure world SELF can be found in <code>os0:kd/sysmem.skprx</code>. It also can be found in the [[Boot Sequence|Boot Image]].
=== Known NIDs ===
{| class="wikitable"
! Version !! Name !! World !! Privilege !! NID
|-
| 1.69 || SceSysmem || Non-secure || Kernel || 0xB93950C6
|-
| 3.60 || SceSysmem || Non-secure || Kernel || 0x3380B323
|-
| 3.61 || SceSysmem || Non-secure || Kernel || 0x3380B323
|-
| 1.69 || SceSysmem || Secure || Kernel || 0x502BE0E5
|}
== Libraries ==
=== Known NIDs ===
{| class="wikitable"
! Version !! Name !! World !! Visibility !! NID
|-
| 1.69 || [[SceSysmem#SceSysmemForKernel|SceSysmemForKernel]] || Non-secure || Kernel || 0x63A519E5
|-
| 3.60 || [[SceSysmem#SceSysmemForKernel|SceSysmemForKernel]] || Non-secure || Kernel || 0x63A519E5
|-
| 1.69 || [[SceSysmem#SceSysmemForDriver|SceSysmemForDriver]] || Non-secure || Kernel || 0x6F25E18A
|-
| 3.60 || [[SceSysmem#SceSysmemForDriver|SceSysmemForDriver]] || Non-secure || Kernel || 0x6F25E18A
|-
| 1.69 || [[SceSysmem#SceSysmem|SceSysmem]] || Non-secure || User || 0x37FE725A
|-
| 3.60 || [[SceSysmem#SceSysmem|SceSysmem]] || Non-secure || User || 0x37FE725A
|-
| 1.69 || [[SceSysmem#SceSysmemForDebugger|SceSysmemForDebugger]] || Non-secure || Kernel || 0xC7309957
|-
| 1.69 || [[SceSysmem#SceDipsw|SceDipsw]] || Non-secure || User || 0xB36D5922
|-
| 3.60 || [[SceSysmem#SceDipsw|SceDipsw]] || Non-secure || User || 0xB36D5922
|-
| 1.69 || [[SceSysmem#SceDipswForDriver|SceDipswForDriver]] || Non-secure || Kernel || 0xC9E26388
|-
| 3.60 || [[SceSysmem#SceDipswForDriver|SceDipswForDriver]] || Non-secure || Kernel || 0xC9E26388
|-
| 1.69 || [[SceSysmem#SceUartForKernel|SceUartForKernel]] || Non-secure || Kernel || 0xC03DBE40
|-
| 3.60 || [[SceSysmem#SceUartForKernel|SceUartForKernel]] || Non-secure || Kernel || 0xC03DBE40
|-
| 1.69 || [[SceSysmem#SceCpu|SceCpu]] || Non-secure || User || 0x45265161
|-
| 3.60 || [[SceSysmem#SceCpu|SceCpu]] || Non-secure || User || 0x45265161
|-
| 1.69 || [[SceSysmem#SceCpuForKernel|SceCpuForKernel]] || Non-secure || Kernel || 0x54BF2BAB
|-
| 3.60 || [[SceSysmem#SceCpuForKernel|SceCpuForKernel]] || Non-secure || Kernel || 0x54BF2BAB
|-
| 1.69 || [[SceSysmem#SceCpuForDriver|SceCpuForDriver]] || Non-secure || Kernel || 0x40ECDB0E
|-
| 3.60 || [[SceSysmem#SceCpuForDriver|SceCpuForDriver]] || Non-secure || Kernel || 0x40ECDB0E
|-
| 1.69 || [[SceSysmem#SceSysclibForKernel|SceSysclibForKernel]] || Non-secure || Kernel || 0x24878615
|-
| 3.60 || [[SceSysmem#SceSysclibForKernel|SceSysclibForKernel]] || Non-secure || Kernel || removed
|-
| 1.69 || [[SceSysmem#SceSysclibForDriver|SceSysclibForDriver]] || Non-secure || Kernel || 0x7EE45391
|-
| 3.60 || [[SceSysmem#SceSysclibForDriver|SceSysclibForDriver]] || Non-secure || Kernel || 0x7EE45391
|-
| 1.69 || [[SceSysmem#SceSysrootForKernel|SceSysrootForKernel]] || Non-secure || Kernel || 0x3691DA45
|-
| 3.60 || [[SceSysmem#SceSysrootForKernel|SceSysrootForKernel]] || Non-secure || Kernel || 0x3691DA45
|-
| 1.69 || [[SceSysmem#SceSysrootForDriver|SceSysrootForDriver]] || Non-secure || Kernel || 0x2ED7F97A
|-
| 3.60 || [[SceSysmem#SceSysrootForDriver|SceSysrootForDriver]] || Non-secure || Kernel || 0x2ED7F97A
|-
| 1.69 || [[SceSysmem#SceKernelUtilsForDriver|SceKernelUtilsForDriver]] || Non-secure || Kernel || 0x496AD8B4
|-
| 3.60 || [[SceSysmem#SceKernelUtilsForDriver|SceKernelUtilsForDriver]] || Non-secure || Kernel || 0x496AD8B4
|-
| 1.69 || [[SceSysmem#SceZlibForDriver|SceZlibForDriver]] || Non-secure || Kernel || 0xE241534E
|-
| 1.69 || [[SceSysmem#SceKernelSuspendForDriver|SceKernelSuspendForDriver]] || Non-secure || Kernel || 0x7290B21C
|-
| 3.60 || [[SceSysmem#SceKernelSuspendForDriver|SceKernelSuspendForDriver]] || Non-secure || Kernel || 0x7290B21C
|-
| 1.69 || [[SceSysmem#SceQafMgrForDriver|SceQafMgrForDriver]] || Non-secure || Kernel || 0x4E29D3B6
|-
| 3.60 || [[SceSysmem#SceQafMgrForDriver|SceQafMgrForDriver]] || Non-secure || Kernel || 0x4E29D3B6
|-
| 1.69 || [[SceSysmem#ScePmMgrForDriver|ScePmMgrForDriver]] || Non-secure || Kernel || 0xF13F32F9
|-
| 3.60 || [[SceSysmem#ScePmMgrForDriver|ScePmMgrForDriver]] || Non-secure || Kernel || 0xF13F32F9
|-
| 1.69 || [[SceSysmem#SceSblAIMgrForDriver|SceSblAIMgrForDriver]] || Non-secure || Kernel || 0xFD00C69A
|-
| 3.60 || [[SceSysmem#SceSblAIMgrForDriver|SceSblAIMgrForDriver]] || Non-secure || Kernel || 0xFD00C69A
|-
| 1.69 || [[SceSysmem#SceProcEventForDriver|SceProcEventForDriver]] || Non-secure || Kernel || 0x887F19D0
|-
| 3.60 || [[SceSysmem#SceProcEventForDriver|SceProcEventForDriver]] || Non-secure || Kernel || 0x887F19D0
|-
| 3.60 || [[SceSysmem#SceDebugLed|SceDebugLed]] || Non-secure || User || 0xAE004C0A
|-
| 3.60 || [[SceSysmem#SceDebugLedForDriver|SceDebugLedForDriver]] || Non-secure || Kernel || 0x7BC05EAD
|-
| 3.60 || [[SceSysmem#SceDebugForKernel|SceDebugForKernel]] || Non-secure || Kernel || 0x88C17370
|-
| 3.60 || [[SceSysmem#SceDebugForDriver|SceDebugForDriver]] || Non-secure || Kernel || 0x88758561
|-
| 1.69 || [[SceSysmem#SceSysmemForTZS|SceSysmemForTZS]] || Secure || Kernel || 0x8680060
|-
| 1.69 || [[SceSysmem#SceDipswForTZS|SceDipswForTZS]] || Secure || Kernel || 0x9DBF584C
|-
| 1.69 || [[SceSysmem#SceCpuForTZS|SceCpuForTZS]] || Secure || Kernel || 0xC516B23E
|-
| 1.69 || [[SceSysmem#SceSysclibForTZS|SceSysclibForTZS]] || Secure || Kernel || 0xC839BB78
|-
| 1.69 || [[SceSysmem#SceSysrootForTZS|SceSysrootForTZS]] || Secure || Kernel || 0xFEFF641D
|-
| 1.69 || [[SceSysmem#SceQafMgrForTZS|SceQafMgrForTZS]] || Secure || Kernel || 0x637069DD
|-
| 1.69 || [[SceSysmem#ScePmMgrForTZS|ScePmMgrForTZS]] || Secure || Kernel || 0x27F1AFD8
|-
| 1.69 || [[SceSysmem#SceSblAIMgrForTZS|SceSblAIMgrForTZS]] || Secure || Kernel || 0x60D19047
|}
== Types ==
<source lang="C">
typedef int threadmgr_core_ctx;
struct tctx_holder
{
  int unk0;
  int unk4;
  int unk8;
  int unkC;
  int unk10;
  int unk14;
  int unk18;
  int unk1C;
  int unk20;
  int unk24;
  int unk28;
  int unk2C;
  int unk30;
  threadmgr_core_ctx *tctx_34;
};
struct callback_holder1
{
  int unk0;
  int (*unk4)(void);
  int (*unk8)(void);
  int (*unkC)(void);
  int unk10;
  int unk14;
  int unk18;
  int unk1C;
  int (*unk20)(void);
  int unk24;
  int unk28;
  int unk2C;
  int unk30;
  int unk34;
  int unk38;
  int (*unk3C)(void);
};
struct callback_holder2
{
  int size;
  int (__cdecl *unk4)(int result, int *a2);
  int (__cdecl *unk8)(SceUID *a1);
  int (__cdecl *unkC)(int, int *);
  int (__cdecl *sceKernelGetSelfInfoForKernel)(SceUID pid, SceSelfInfo *self_info);
  int (__cdecl *sceKernelGetProcessTitleIdForKernel)(SceUID pid, char *titleid, size_t len);
  int (__cdecl *unk18)(unsigned int a1);
  int (__cdecl *unk1c)(int a1);
};
struct callback_holder3
{
  int unk0;
  int (*unk4)(void);
  int (*unk8)(void);
  int (__fastcall *unkC)(int);
  int (__fastcall *unk10)(int);
  int (*unk14)(void);
};
struct sysbase_t
{
  tctx_holder *hldr[6];
  char unk[84];
  char *sysroot_buffer;
  int unk70;
  char unk74[616];
  char unk2dc[52];
  int unk310;
  int unk314;
  int unk318;
  int unk31C;
  int unk320;
  int unk324;
  int unk328;
  int unk32C;
  int unk330;
  int unk334;
  int unk338;
  int unk33C;
  int unk340;
  int (__cdecl *unk344)();
  int unk348;
  int (*unk34C_some_callback1)(void);
  callback_holder3 *unk350;
  int unk354;
  callback_holder1 *unk358;
  callback_holder2 *unk35C;
  int (*unk360)(void);
  int (*unk364)(void);
  int (__fastcall *unk368)(int, int, int);
  char unk36C[20];
  int (__cdecl *sceSblLicMgrGetLicenseStatusForDriver)();
  int (__cdecl *SceSblPostSsMgrForDriver_22599675)();
  int (__cdecl *SceSblPostSsMgrForDriver_9b49c249)();
  int (__cdecl *SceSblPostSsMgrForDriver_d8a2d465)(unsigned long long);
  int (__cdecl *SceSblPostSsMgrForDriver_abdd68cd)(void *);
  int (__cdecl *sceSblUtMgrHasNpTestFlagForDriver)();
  int (*SceSblUpdateMgr_smth)(void);
  int (*ScePower_smth)(void);
};
typedef int (*SceClassCallback)(void *item);
typedef struct SceClass {
struct SceClass *next;
struct SceClass *root;
struct SceClass *prev;
const char *name;
struct SceClass *uidclass;
unsigned int attributes;
unsigned short itemsize;
unsigned short unk1A;
unsigned int object_type;
SceClassCallback create_cb;
SceClassCallback destroy_cb;
unsigned int magic; /* 0xABCE9DA5 */
} SceClass; /* size = 0x2C */
</source>
== Memory Block Type ==
The <code>type</code> parameter indicates what kind of memory to allocate. Here is a mapping of <code>type</code> flags to ARM MMU flags. Higher bits are used for other options including where to allocate from. Not all flag values are valid, there is a table of valid types in the kernel. You cannot, for example, allocate RWX memory.
{| class="wikitable"
|-
! Mask !! Value !! Description
|-
| 0x10000 || 0x10000 || Global. <code>nG</code> bit NOT set
|-
| 0xFF00 || 0x800 || <code>B</code> bit set. Sharable device memory.
|-
| 0xFF00 || 0x2000 || <code>TEX[2]</code> and <code>TEX[0]</code> bit set. Outer cache Write-back, Write-Allocate. Inner cache non-cachable.
|-
| 0xFF00 || 0x4000 || <code>TEX[2]</code> and <code>B</code> bit set. Outer cache non-cachable. Inner cache Write-back, Write-Allocate
|-
| 0xFF00 || 0x8000 || <code>TEX[0]</code> bit set. <code>S</code> bit unset. Outer and inner non-cachable. Not sharable.
|-
| 0xFF00 || 0xD000 || <code>TEX[0]</code> bit set. <code>C,B</code> bits set. Outer and inner Write-back, Write-Allocate.
|-
| 0xFF || 0x4 || <code>AP[2:0] = 5</code>, <code>XN=1</code>. Privileged RO, User NA.
|-
| 0xFF || 0x5 || <code>AP[2:0] = 5</code>. Privileged RX, User NA.
|-
| 0xFF || 0x6 || <code>AP[2:0] = 1</code>, <code>XN=1</code>. Privileged RW, User NA.
|-
| 0xFF || 0x7 || <code>AP[2:0] = 1</code>. Privileged RWX, User NA. (Never used)
|-
| 0xFF || 0x50 || <code>AP[2:0] = 7</code>. Privileged RX, User RX.
|-
| 0xFF || 0x60 || <code>AP[2:0] = 3</code>, <code>XN=1</code>. Privileged RW, User RW.
|-
| 0xFF || 0x40 || <code>AP[2:0] = 7</code>, <code>XN=1</code>. Privileged RO, User RO.
|-
|}
{| class="wikitable"
|-
! Mask !! Value !! Name
|-
| 0x0F000000 || 0x09000000 || SceKernelUserCdram
|-
| 0x0F000000 || 0x0A000000 || SceKernelUserShared
|-
| 0x0F000000 || 0x0B000000 || SceKernelUserIO
|-
| 0x0F000000 || 0x0C000000 || SceKernelUserMain
|-
| 0x0F000000 || 0x0D000000 || SceKernelUserUncache
|-
| 0x0F000000 || 0x0E000000 || SceKernelUserCDialog
|-
| 0x0F000000 || 0x0F000000 || SceKernelUserCDialogNC
|-
|}
== SceSysmemForKernel ==
== SceSysmemForKernel ==


Line 399: Line 89:


<source lang="c">SceClass *sceKernelGetUidDLinkClassForKernel(void);</source>
<source lang="c">SceClass *sceKernelGetUidDLinkClassForKernel(void);</source>
== SceSysmemForDriver ==
=== Switch TTB For PID ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x6F2ACDAE
|-
| 3.60 || non-secure || not present
|}
Changes the TTBR to point to the tables for a given PID.
<source lang="c">int switch_ttb_for_pid(SceUID pid);</source>
=== sceKernelRoMemcpyKernelToUserForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x571D2739
|-
| 3.60 || non-secure || not present
|}
<source lang="c">int sceKernelRoMemcpyKernelToUserForPidForDriver(SceUID pid, void *dst, const void *src, SceSize size);</source>
=== sceKernelAllocHeapMemoryForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x7B4CB60A
|-
| 3.60 || non-secure || 0x7B4CB60A
|}
<source lang="c">void* sceKernelAllocHeapMemoryForDriver(SceUID uid, SceSize size);</source>
=== sceKernelAllocHeapMemoryFromGlobalHeapForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x7750CEA7
|}
Same as <code>sceKernelAllocHeapMemoryForDriver</code> but uses global pool <code>uid</code>.
<source lang="c">void* sceKernelAllocHeapMemoryFromGlobalHeapForDriver(SceSize size);</source>
=== sceKernelAllocHeapMemoryFromGlobalHeapWithOptForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x0B4ED16A
|}
Same as <code>sceKernelAllocHeapMemoryForDriver</code> but uses <code>unk2</code> and uses global pool <code>uid</code>.
<source lang="c">
typedef struct ctx_0B4ED16A
{
  int unk0;
  uint64_t unk8;
  uint64_t unkC;
};
void* sceKernelAllocHeapMemoryFromGlobalHeapWithOptForDriver(SceSize size, ctx_0B4ED16A* unk);
</source>
=== sceKernelAllocHeapMemoryWithOpt1ForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xB415B5A8
|}
Same as <code>sceKernelAllocHeapMemoryForDriver</code> but uses <code>unk2</code>.
<source lang="c">void* sceKernelAllocHeapMemoryWithOpt1ForDriver(SceUID uid, SceSize size, ctx_49D4DD9B* unk2);</source>
=== sceKernelAllocHeapMemoryWithOpt2ForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x49D4DD9B
|}
Same as <code>sceKernelAllocHeapMemoryForDriver</code> but uses <code>unk2</code>.
<source lang="c">
typedef struct ctx_49D4DD9B
{
  int unk0;
  int unk4;
  int unk8;
  int unkC;
  int unk10;
};
void* sceKernelAllocHeapMemoryWithOpt2ForDriver(SceUID uid, SceSize size, ctx_49D4DD9B* unk2);
</source>
=== sceKernelAllocMemBlockExtForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xD44F464D
|}
<source lang="c">int sceKernelAllocMemBlockExtForDriver(const char *name, int type, unsigned int size, SceKernelAllocMemBlockKernelOpt *opt, SceKernelPaddrList *out_paddr_list);</source>
=== sceKernelAllocMemBlockForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || secure || 0x402EB970
|-
| 1.69 || non-secure || 0xC94850C9
|-
| 3.60 || non-secure || 0xC94850C9
|}
<source lang="c">
typedef enum SceKernelAllocMemBlockAttr {
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PADDR          = 0x00000002U,
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_ALIGNMENT      = 0x00000004U,
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_MIRROR_BLOCKID = 0x00000040U,
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PID            = 0x00000080U,
SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_PADDR_LIST    = 0x00001000U
} SceKernelAllocMemBlockAttr;
struct SceKernelAllocMemKernelBlockOpt_old {
    uint32_t size; // 0x34
    uint32_t unk;
    uint32_t attr;
    uint32_t unk2;
    uint32_t paddr;
    uint32_t align;
    uint32_t unk3[3];
    uint32_t processid;
    uint32_t unk4[3];
};
// specific to 3.60
typedef struct SceKernelAllocMemBlockKernelOpt {
SceSize size;                  //!< sizeof(SceKernelAllocMemBlockKernelOpt)
SceUInt32 field_4;
SceUInt32 attr;                //!< OR of SceKernelAllocMemBlockAttr
SceUInt32 field_C;
SceUInt32 paddr;
SceSize alignment;
SceUInt32 field_18;
SceUInt32 field_1C;
SceUInt32 mirror_blockid;
SceUID pid;
SceKernelPaddrList *paddr_list;
SceUInt32 field_2C;
SceUInt32 field_30;
SceUInt32 field_34;
SceUInt32 field_38;
SceUInt32 field_3C;
SceUInt32 field_40;
SceUInt32 field_44;
SceUInt32 field_48;
SceUInt32 field_4C;
SceUInt32 field_50;
SceUInt32 field_54;
} SceKernelAllocMemBlockKernelOpt;
int sceKernelAllocMemBlockForDriver(const char *name, int32_t type, uint32_t vsize, struct SceKernelAllocMemKernelBlockOpt *pOpt);
</source>
The interface is the same as the user version of this call, however more types can be specified and more options are in the pOpt argument.
To allocate a kernel RW block of memory, specify <code>type = 0x6020D006</code>.
To allocate a block of memory with a specific physical address, specify <code>type = 0x20100206</code> or <code>type = 0x20100806</code>, <code>pOpt->attr = 2</code>, and <code>pOpt->paddr = physical address</code>.
To allocate a block of memory that is kernel executable, specify <code>type = 0x1020D005</code>.
To allocate a block of memory that is physically contiguous, specify <code>type = 0x30808006</code>, <code>pOpt->attr = 0x200004</code> and an alignment to <code>pOpt->alignment</code>.
To allocate a block of memory inside the CDRAM, specify <code>type = 0x40404006</code>.
==== pOpt->attr bitmask ====
{| class='wikitable'
|-
! Bitmask
! Uses
|-
| 0x00000001
| field_C
|-
| 0x00000002
| paddr
|-
| 0x00000004
| alignment
|-
| 0x00000008
| field_18
|-
| 0x00000010
| field_1C
|-
| 0x00000020
| ??
|-
| 0x00000040
| mirror_blockid
|-
| 0x00000080
| pid
|-
| 0x00001000
| paddr_list
|-
| 0x00002000
| field_2C
|-
| 0x00010000
| field_30
|}
=== sceKernelCreateClassForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x61317102
|}
<source lang="c"></source>
=== sceKernelCreateHeapForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x9328E0E8
|-
| 3.60 || non-secure || 0x9328E0E8
|}
<source lang="c">
typedef struct {
    int size; // 28
    int flags; // usually 0x1
    int unk;
    int unk;
    int block_type;
    int unk;
    int unk;
} pool_arg_t;
int sceKernelCreateHeapForDriver(const char *name, int size, pool_arg_t *opt); // opt can be NULL
</source>
The heap pool is thread safe.
=== sceKernelCreateUidObjForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x56A13E90
|}
<source lang="c">SceUID sceKernelCreateUidObjForDriver(SceClass *cls, const char *name, SceObjectBase **obj);</source>
=== sceKernelCreateUidObjForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x89A44858
|}
<source lang="c"></source>
=== sceKernelCreateUserUidForClassForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xCED1547B
|}
<source lang="c"></source>
=== sceKernelCreateUserUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xBF209859
|}
<source lang="c"></source>
=== sceKernelCreateUserUidForNameForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x513B9DDD
|}
<source lang="c"></source>
=== sceKernelCreateUserUidForNameWithClassForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x8DA0BCA5
|}
<source lang="c"></source>
=== sceKernelDeleteHeapForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xD6437637
|-
| 3.60 || non-secure || 0xD6437637
|}
<source lang="c">int sceKernelDeleteHeapForDriver(int pool_uid);</source>
=== sceKernelDeleteUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x047D32F2
|}
<source lang="c"></source>
=== sceKernelDeleteUserUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x84A4AF5E
|}
<source lang="c"></source>
=== sceKernelFindMemBlockByAddrForDefaultSizeForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xF3BBE2E1
|}
<source lang="c"></source>
=== sceKernelFindMemBlockByAddrForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x8A1742F6
|-
| 3.60 || non-secure || 0x8A1742F6
|}
<source lang="c">int sceKernelFindMemBlockByAddrForDriver(void *base, int);</source>
=== sceKernelFindMemBlockByAddrForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x857F1D5A
|}
<source lang="c"></source>
=== sceKernelFindMemBlockForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x9C78064C
|}
<source lang="c">int sceKernelFindMemBlockForDriver(int flags, void *base, SceSize size);</source>
=== sceKernelFindMemBlockForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x9F6E45E3
|}
<source lang="c"></source>
=== sceKernelFirstDifferentBlock32UserForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xBDA6E42B
|}
<source lang="c"></source>
=== sceKernelFirstDifferentBlock32UserForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x8334454F
|-
| 3.60 || non-secure || 0x8334454F
|}
Looks for an integer in userspace.
<source lang="c">int sceKernelFirstDifferentBlock32UserForPidForDriver(SceUID pid, void *haystack, int needle, SceSize size);</source>
=== sceKernelFirstDifferentBlock64UserForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xBB3B02C2
|}
<source lang="c"></source>
=== sceKernelFirstDifferentBlock64UserForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xE83855FD
|}
<source lang="c"></source>
=== sceKernelFreeHeapMemoryForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x3EBCE343
|-
| 3.60 || non-secure || 0x3EBCE343
|}
<source lang="c">int sceKernelFreeHeapMemoryForDriver(int pool_uid, void *ptr);</source>
=== sceKernelFreeHeapMemoryFromGlobalHeapForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xFB817A59
|}
<source lang="c"></source>
=== sceKernelFreeMemBlockForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x009E1C61
|}
<source lang="c"></source>
=== sceKernelGetClassForPidForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xE9728A12
|}
<source lang="c"></source>
=== sceKernelGetClassForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xC74B0152
|}
<source lang="c"></source>
=== sceKernelGetMemBlockAddrPairForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x98C15666
|}
Returns the paddr and size (addrpair) of the memblock if it's physically continuous.
<source lang="c">int sceKernelGetMemBlockAddrPairForUidForDriver(SceUID uid, SceKernelAddrPair *addrpair)</source>
=== sceKernelGetMemBlockBaseForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xA841EDDA
|-
| 3.60 || non-secure || 0xA841EDDA
|}
<source lang="c">int sceKernelGetMemBlockBaseForDriver(int blkid, void **base);</source>
=== sceKernelGetMemBlockKernelPageForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xB81CF0A3
|}
<source lang="c"></source>
=== sceKernelGetMemBlockMappedBaseForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x0B1FD5C3
|}
<source lang="c"></source>
=== sceKernelGetMemBlockPaddrListForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x19A51AC7
|}
<source lang="c"></source>
=== sceKernelGetNameForPidByUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x09896EB7
|}
<source lang="c"></source>
=== sceKernelGetNameForUid2ForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xE655852F
|}
<source lang="c"></source>
=== sceKernelGetNameForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xA78755EB
|}
<source lang="c"></source>
=== sceKernelGetObjectForPidForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xFE6D7FAE
|}
<source lang="c"></source>
=== sceKernelGetObjectForUidForAttrForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xF6DB54BA
|}
<source lang="c"></source>
=== sceKernelGetObjectForUidForClassForAttrForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x77066FD1
|}
<source lang="c"></source>
=== sceKernelGetObjectForUidForClassForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x00ED6C14
|}
<source lang="c"></source>
=== sceKernelGetObjectForUidForClassTreeForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x72A98D17
|}
<source lang="c"></source>
=== sceKernelGetObjectForUidForDefaultClassForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x0FC24464
|}
<source lang="c"></source>
=== sceKernelGetObjectForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x0F5C84B7
|}
<source lang="c"></source>
=== sceKernelGetPaddrForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || secure || 0x1DEADF6C
|-
| 1.69 || non-secure || 0x8D160E65
|-
| 3.60 || non-secure || 0x8D160E65
|}
<source lang="c">
if (result == 0)
    return 0x80020005; // SCE_KERNEL_ERROR_INVALID_FLAGS
return sceKernelCpuGetPaddrWithMaskForKernel(0x33, vaddr, result);
</source>
This will write the physical address for a virtual address <code>vaddr</code> to memory pointed to by <code>result</code>.
Returns <0 on error, values >=0 indicate success.
<source lang="c">int sceKernelGetPaddrForDriver(void *vaddr, void **result);</source>
=== sceKernelGetPaddrForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x61A67D32
|}
<source lang="c"></source>
=== sceKernelGetPaddrListForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xE68BEEBD
|-
| 3.60 || non-secure || 0xE68BEEBD
|}
<source lang="c">
typedef struct SceKernelAddrPair {
uint32_t addr;
uint32_t length;
} SceKernelAddrPair;
typedef struct SceKernelPaddrListReq {
uint32_t size; // 0x14
uint32_t output_buffer_size;
uint32_t unk;
uint32_t ret_count;
SceKernelAddrPair *output_buffer;
} SceKernelPaddrListReq;
input.addr = vaddr;
input.length = length;
int sceKernelGetPaddrListForDriver(SceKernelAddrPair *input, SceKernelPaddrListReq *req);
</source>
This function takes in two parameters: an array of length 2 specifying the virtual address and the size of the block of memory and a request information. The function will write into <code>output_buffer</code> an array of <code>addr_pair</code> that encompasses the block of memory specified in the input. <code>req->ret_count</code> will contain the number of entries written. If <code>output_buffer</code> is null, it will just write the count.
=== sceKernelGetPaddrListForLargePageForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x08A8A7E8
|}
<source lang="c"></source>
=== sceKernelGetPaddrListForSmallPageForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x16844CE6
|}
<source lang="c"></source>
=== sceKernelGetPaddrPairForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xAE36C775
|}
<source lang="c"></source>
=== sceKernelGetPaddrPairForLargePageForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x32257A24
|}
<source lang="c"></source>
=== sceKernelGetPaddrPairForSmallPageForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xB3575090
|}
<source lang="c"></source>
=== sceKernelGetPaddrWithSectionTypeCheckForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x65419BD3
|}
<source lang="c"></source>
=== sceKernelGetPidContextForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x2ECF7944
|}
<source lang="c"></source>
=== sceKernelGetUidClassForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x85336A1C
|}
<source lang="c"></source>
=== sceKernelGetUnknownValidPhysAddressSpaceForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xC9928F5E
|}
<source lang="c"></source>
=== sceKernelIsPaddrWithinSameSectionForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xF4AD89D8
|}
<source lang="c"></source>
=== sceKernelIsPaddrWithinUnknownValidPhysAddressSpaceForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xA7C0D1FC
|}
<source lang="c"></source>
=== sceKernelKernelUidForUserUidForClassForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x184172B1
|}
<source lang="c"></source>
=== sceKernelKernelUidForUserUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x45D22597
|}
<source lang="c"></source>
=== sceKernelMapBlockUserVisibleForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x58D21746
|}
<source lang="c"></source>
=== sceKernelMapBlockUserVisibleWithFlagForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x04059C4B
|}
<source lang="c"></source>
=== sceKernelMapUserBlockForDefaultTypeForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x278BC201
|}
Assigns type 0.
<source lang="C">int sceKernelMapUserBlockForDefaultTypeForDriver(char *name, int permission, void *user_buf, int size, void **kernel_page, int *kernel_size, int *kernel_offset);</source>
=== sceKernelMapUserBlockForDefaultTypeForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x0091D74D
|}
Assigns type 0.
<source lang="C">int sceKernelMapUserBlockForDefaultTypeForPidForDriver(int pid, const char *name, int permission, const void *user_buf, int size, void **kernel_page, int *kernel_size, int *kernel_offset);</source>
=== sceKernelMapUserBlockForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x7D4F8B5F
|-
| 3.60 || non-secure || 0x7D4F8B5F
|}
Permission is either "1" for read only, no execute or "2"/"3" for read write, no execute. Type is either 0, 1, or 17 and affects the block type. 0 is default. This will allocate kernel memory starting at kernel_page. To get the same memory as the user pointer, add the kernel_offset. kernel_size is how much is allocated.
<source lang="c">
//this signature is for 1.69
int sceKernelMapUserBlockForDriver(int permission, int type, void *user_buf, int size, void **kernel_page, int *kernel_size, int *kernel_offset);
//this signature is for 3.60 - now allows to give a name
int sceKernelMapUserBlockForDriver(char *name, int permission, int type, void *user_buf, int size, void **kernel_page, int *kernel_size, int *kernel_offset);
</source>
=== sceKernelMemBlockDecRefCounterAndReleaseUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xF50BDC0C
|}
<source lang="c"></source>
=== sceKernelMemBlockGetInfoExForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x24A99FFF
|}
<source lang="c"></source>
=== sceKernelMemBlockGetInfoExForVisibilityLevelForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xA73CFFEF
|}
<source lang="c"></source>
=== sceKernelMemBlockGetSomeSizeForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x78337B62
|}
<source lang="c"></source>
=== sceKernelMemBlockIncRefCounterAndReleaseUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xEAF3849B
|}
<source lang="c"></source>
=== sceKernelMemBlockReleaseForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x00575B00
|}
<source lang="c"></source>
=== sceKernelMemBlockTypeGetCacheabilityForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x20C811FA
|}
<source lang="c"></source>
=== sceKernelMemBlockTypeGetPrivilegesForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x6A0792A3
|}
<source lang="c"></source>
=== sceKernelMemBlockTypeGetUnknownForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xCB0F3A33
|}
<source lang="c"></source>
=== sceKernelMemRangeReleaseForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x75C70DE0
|}
<source lang="c"></source>
=== sceKernelMemRangeReleaseForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xA8525B06
|}
<source lang="c"></source>
=== sceKernelMemRangeReleaseWithPermForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x22CBE925
|}
Decrease references to pages.
<source lang="c">int sceKernelMemRangeReleaseWithPermForDriver(int perm, const void *addr, unsigned int size);</source>
=== sceKernelMemRangeRetainForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x59A4402F
|}
<source lang="c"></source>
=== sceKernelMemRangeRetainForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x659586BF
|}
<source lang="c"></source>
=== sceKernelMemRangeRetainWithPermForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xBC0A1D60
|}
Increase references to pages.
<source lang="c">int sceKernelMemRangeRetainWithPermForDriver(int perm, const void *addr, unsigned int size);</source>
=== sceKernelMemcpyKernelToUserForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x6D88EF8A
|-
| 3.60 || non-secure || 0x6D88EF8A
|}
<source lang="c">int sceKernelMemcpyKernelToUserForDriver(uint32_t uaddr, const void *kaddr, uint32_t len);</source>
=== sceKernelMemcpyKernelToUserForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x6B825479
|-
| 3.60 || non-secure || 0x6B825479
|}
This will not crash on invalid user pointers, but instead return error.
<source lang="c">int sceKernelMemcpyKernelToUserForPidForDriver(SceUID pid, void *dst, const void *kern_src, SceSize size);</source>
=== sceKernelMemcpyKernelToUserForPidUncheckedForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xFED82F2D
|-
| 3.60 || non-secure || 0xFED82F2D
|}
<source lang="c">int sceKernelMemcpyKernelToUserForPidUncheckedForDriver(SceUID pid, void *dst, const void *kern_src, SceSize size);</source>
=== sceKernelMemcpyUserToKernelForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xBC996A7A
|-
| 3.60 || non-secure || 0xBC996A7A
|}
<source lang="c">int sceKernelMemcpyUserToKernelForDriver(void *kaddr, uint32_t uaddr, uint32_t len);</source>
=== sceKernelMemcpyUserToKernelForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x605275F8
|}
<source lang="c">int sceKernelMemcpyUserToKernelForPidForDriver(SceUID pid, void *kaddr, uint32_t uaddr, uint32_t len);</source>
Same as <code>sceKernelMemcpyUserToKernelForDriver</code>, but copies from the specified process.
=== sceKernelMemcpyUserToUserForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x1BD44DD5
|}
<source lang="c"></source>
=== sceKernelMemcpyUserToUserForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x8E086C33
|-
| 3.60 || non-secure || 0x8E086C33
|}
<source lang="c">int sceKernelMemcpyUserToUserForPidForDriver(SceUID pid, void *dst, const void *src, SceSize size);</source>
=== sceKernelOpenUidForNameForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xD76E7452
|}
<source lang="c"></source>
=== sceKernelRemapBlockForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.05 || non-secure || 0x8D332AE1
|-
| 1.69 || non-secure || 0xDFE2C8CB
|-
| 3.60 || non-secure || 0xDFE2C8CB
|}
<source lang="c">int sceKernelRemapBlockForDriver(int blkid, int type);</source>
This is used to remap RW memory as RX. To do this, first allocate a memory block of type <code>0x1020D006</code>. After you are done writing, call this with <code>type</code> set to <code>0x1020D005</code>.
=== sceKernelSetNameForPidForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x12624884
|}
<source lang="c"></source>
=== sceKernelSetObjectForUidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x4CFA4100
|}
<source lang="c"></source>
=== sceKernelStrnlenUserForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xB429D419
|-
| 3.60 || non-secure || 0xB429D419
|}
<source lang="c">int sceKernelStrnlenUserForDriver(uint32_t uaddr, uint32_t maxlen);</source>
=== sceKernelStrncpyKernelToUserForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x80BD6FEB
|-
| 3.60 || non-secure || 0x80BD6FEB
|}
<source lang="c">int sceKernelStrncpyKernelToUserForDriver(uint32_t uaddr, const void *kaddr, uint32_t maxlen);</source>
=== sceKernelStrncpyUserForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x75AAF178
|-
| 3.60 || non-secure || 0x75AAF178
|}
<source lang="c">int sceKernelStrncpyUserForPidForDriver(SceUID pid, char *dst, const char *kern_src, SceSize size);</source>
=== sceKernelStrncpyUserToKernelForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xDB3EC244
|-
| 3.60 || non-secure || 0xDB3EC244
|}
<source lang="c">int sceKernelStrncpyUserToKernelForDriver(void *kaddr, uint32_t uaddr, uint32_t maxlen);</source>
=== sceKernelStrnlenUserForPidForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x9929EB07
|-
| 3.60 || non-secure || 0x9929EB07
|}
<source lang="c">int sceKernelStrnlenUserForPidForDriver(SceUID pid, char *ptr, SceSize size);</source>
=== sceKernelSwitchPidContextForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x2D711589
|}
<source lang="c"></source>
=== sceKernelUidReleaseForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x149885C4
|}
<source lang="c"></source>
=== sceKernelUnmapMemBlockForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xFFCD9B60
|}
<source lang="c"></source>
=== sceKernelVaddrMaybeGetSectionTypeForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x0AAA4FDD
|}
<source lang="c"></source>
=== some_memblock_operation ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x13805CA8
|}
<source lang="c"></source>
=== some_memblock_operation ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x16713BE8
|}
Same as above but with different flags.
<source lang="c"></source>
=== some_memblock_operation ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x16713BE8
|}
Same as above but with different flags.
<source lang="c"></source>
=== some_memblock_operation ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x4C584B29
|}
Same as above but with different flags.
<source lang="c"></source>
=== some_memblock_operation ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x6C76AD89
|}
Same as above but with different flags.
<source lang="c"></source>
=== some_memblock_operation ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x8C43B052
|}
Same as above but with different flags.
<source lang="c"></source>
=== memblock_related_operation ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x1EFC96EA
|}
<source lang="c"></source>
=== memblock_related_operation ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x64DBE472
|}
<source lang="c"></source>
=== memblock_related_operation ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x987EE587
|}
<source lang="c"></source>
=== SceSysmemForDriver_856fa2e3 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x856FA2E3
|}
<source lang="c"></source>
=== SceSysmemForDriver_89475192 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x89475192
|}
<source lang="c"></source>
=== SceSysmemForDriver_c50a9c0d ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xC50A9C0D
|}
<source lang="c"></source>
== SceSysmem ==
The SceSysmem library is responsible for both low-level and high-level memory management. There are functions for allocating raw blocks of memory (similar to Linux <code>sbrk</code>) as well as functions for maintaining a heap-like structure (similar to <code>malloc</code>) for kernel, however [[SceLibKernel]] implements a proper heap and that is used for user code.
=== sceKernelMapMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x7B763A21
|-
| 3.60 || not present
|}
=== sceKernelRemapMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x3B29E0F5
|-
| 3.60 || not present
|}
=== sceKernelPartialMapMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xC0A59868
|-
| 3.60 || not present
|}
=== sceKernelUnmapMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xEE30D976
|-
| 3.60 || not present
|}
=== sceKernelPartialUnmapMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xCA99929B
|-
| 3.60 || not present
|}
=== sceKernelGetMemBlockInfoByRange ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x006F3DB4
|-
| 3.60 || 0x006F3DB4
|}
<source lang="c">int sceKernelGetMemBlockInfoByRange(void *base, SceSize size, SceKernelMemBlockInfo *info);</source>
=== sceKernelGetMemBlockInfoByAddr ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x4010AD65
|-
| 3.60 || 0x4010AD65
|}
<source lang="c">int sceKernelGetMemBlockInfoByAddr(void *base, SceKernelMemBlockInfo *info);</source>
=== sceKernelGetSubbudgetInfo ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x832B4A65
|-
| 3.60 || 0x832B4A65
|}
<source lang="c">
struct SceSubbudgetInfo
{
  int size;
  int unk4;
  int unk8;
};
int sceKernelGetSubbudgetInfo(int index, SceSubbudgetInfo *info);
</source>
=== sceKernelGetFreeMemorySize ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x87CC580B
|-
| 3.60 || 0x87CC580B
|}
<source lang="c">int sceKernelGetFreeMemorySize(SceKernelFreeMemorySizeInfo *info);</source>
=== sceKernelOpenMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x8EB8DFBB
|-
| 3.60 || 0x8EB8DFBB
|}
<source lang="c">SceUID sceKernelOpenMemBlock(const char *name, int flags);</source>
=== sceKernelFindMemBlockByAddr ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xA33B99D1
|-
| 3.60 || 0xA33B99D1
|}
<source lang="c">SceUID sceKernelFindMemBlockByAddr(const void *addr, SceSize size);</source>
=== sceKernelFreeMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xA91E15EE
|-
| 3.60 || 0xA91E15EE
|}
<source lang="c">int sceKernelFreeMemBlock(SceUID uid);</source>
=== sceKernelFreeMemBlockForVM ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4EA13FEA
|}
<source lang="c">int sceKernelFreeMemBlockForVM(SceUID uid);</source>
=== sceKernelCloseMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xB680E3A0
|-
| 3.60 || 0xB680E3A0
|}
<source lang="c">int sceKernelCloseMemBlock(SceUID uid);</source>
=== sceKernelGetMemBlockBase ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xB8EF5818
|-
| 3.60 || 0xB8EF5818
|}
<source lang="c">int sceKernelGetMemBlockBase(SceUID uid, void **basep);</source>
=== sceKernelAllocMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xB9D5EBDE
|-
| 3.60 || 0xB9D5EBDE
|}
<source lang="c">SceUID sceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, int size, SceKernelAllocMemBlockOpt *optp);</source>
=== sceKernelAllocUnmapMemBlock ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xEC636BCB
|}
<source lang="c">int sceKernelAllocUnmapMemBlock(char *name, SceSize size);</source>
=== sceKernelOpenVMDomain ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x9CA3EB2B
|-
| 3.60 || 0x9CA3EB2B
|}
<source lang="c">int sceKernelOpenVMDomain();</source>
=== sceKernelSyncVMDomain ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x19D2A81A
|-
| 3.60 || 0x19D2A81A
|}
<source lang="c">int sceKernelSyncVMDomain(SceUID uid, void *data, SceSize size);</source>
=== sceKernelCloseVMDomain ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xD6CA56CA
|-
| 3.60 || 0xD6CA56CA
|}
<source lang="c">int sceKernelCloseVMDomain();</source>
=== sceKernelAllocMemBlockForVM ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xE2D7E137
|-
| 3.60 || 0xE2D7E137
|}
<source lang="c">SceUID sceKernelAllocMemBlockForVM(const char *name, SceSize size);</source>
=== sceKernelCheckModelCapability ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x0144FBD9
|}
<source lang="c">int sceKernelCheckModelCapability(int bit);</source>
=== sceKernelGetModelForCDialog ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xA2CB322F
|}
<source lang="c">int sceKernelGetModelForCDialog();</source>
=== sceKernelGetModel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xD0D4F729
|}
<source lang="c">int sceKernelGetModel();</source>
=== sceKernelIsPSVitaTV ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x1453A5E5
|}
<source lang="c">int sceKernelIsPSVitaTV();</source>
== SceDipsw ==
=== sceKernelCheckDipsw ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x1C783FB2
|-
| 3.60 || 0x1C783FB2
|}
=== sceKernelClearDipsw ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x800EDCC1
|-
| 3.60 || 0x800EDCC1
|}
=== sceKernelSetDipsw ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x817053D4
|-
| 3.60 || 0x817053D4
|}
== SceDipswForDriver ==
=== sceKernelCheckDipswForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xA98FC2FD
|}
<source lang="C">sceKernelCheckDipswForDriver(int bit);</source>
=== sceKernelGetDipswInfoForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xB2AD48BE
|}
return *(int *)(dipsw_addr + 4 * info_id);
0 0x40 0x4 DevKit CP timestamp 1
1 0x44 0x2 DevKit CP Version
2 0x46 0x2 DevKit CP Build ID
3 0x48 0x4 DevKit CP timestamp 2 (strangely also set on Retail and TesKit)
<source lang="C">int sceKernelGetDipswInfoForDriver(int info_id);</source>
=== sceKernelClearDipswForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xF1F3E9FE
|}
<source lang="C">sceKernelClearDipswForDriver(int bit);</source>
=== sceKernelSetDipswForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x82E45FBF
|}
<source lang="C">sceKernelSetDipswForDriver(int bit);</source>
== SceUartForKernel ==
=== sceUartWriteForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x41973874
|}
<source lang="c">int sceUartWriteForKernel(int device, unsigned char data);</source>
=== sceUartReadAvailableForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x38DB7629
|}
Returns the number of words available to read from the read FIFO.
<source lang="c">int sceUartReadAvailableForKernel(int device);</source>
=== sceUartReadForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x9BBF1255
|}
<source lang="c">int sceUartReadForKernel(int device);</source>
=== sceUartInitForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xA9C74212
|}
It initializes the clock generator registers for the <code>device</code>.
The default baud rate is 115200 for devices 0-5 and 250000 for the device 6.
<source lang="c">int sceUartInitForKernel(int device);</source>
== SceCpu ==
This library provides wrapper for much ARM CP15 co-processor access as well as low level support of spinlocks and other synchronization primitives.
=== sceKernelCpuGetCpuId ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x2704CFEE
|-
| 3.60 || non-secure || 0x2704CFEE
|}
Return the CPU ID of the current core.
<source lang="c">int sceKernelCpuGetCpuId(void);</source>
== SceCpuForKernel ==
=== sceKernelCpuGetCONTEXTIDRForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x5B6B3274
|}
The CONTEXTIDR, bits [31:0] contain the process ID number.
<source lang="C">
  return (unsigned __int8)__mrc(15, 0, 13, 0, 1); // Read CONTEXTIDR (Context ID Register)
</source>
<source lang="C">void sceKernelCpuGetCONTEXTIDRForKernel(void);</source>
=== sceKernelCpuUpdateSCTLRForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x04008CF7
|}
<source lang="C">
  int result;
  result = __mrc(15, 0, 1, 0, 0) | 0x1806; // Read SCTLR (System Control Register)
  __mcr(15, 0, result, 1, 0, 0); // Write SCTLR (System Control Register)
  return result;
</source>
<source lang="C">void sceKernelCpuUpdateSCTLRForKernel(void); // SCTLR (System Control Register)</source>
=== sceKernelCpuBranchPredictorInvalidateAllISForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x1BB2BB8D
|}
<source lang="C">void sceKernelCpuBranchPredictorInvalidateAllISForKernel(void); // BPIALLIS, Branch predictor invalidate all (IS)</source>
=== sceKernelCpuBranchPredictorInvalidateAllForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x4C4C7D6B
|}
<source lang="C">void sceKernelCpuBranchPredictorInvalidateAllForKernel(void); // BPIALL, Branch predictor invalidate all</source>
=== sceKernelCpuDcacheInvalidateMVACForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x470EAE1E
|}
<source lang="C">void sceKernelCpuDcacheInvalidateMVACForKernel(int mva); // DCIMVAC, Data cache invalidate by MVA (PoC)</source>
=== sceKernelCpuDcacheInvalidateMVACRangeForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x583F30D1
|}
<source lang="C">void sceKernelCpuDcacheInvalidateMVACRangeForKernel(void *addr, unsigned int size); // DCIMVAC, Data cache invalidate by MVA (PoC)</source>
=== sceKernelCpuDcacheCleanInvalidateMVACRangeForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x6BA2E51C
|}
<source lang="C">void sceKernelCpuDcacheCleanInvalidateMVACRangeForKernel(void *addr, unsigned int size); // DCCIMVAC, Data cache clean and invalidate by MVA (PoC)</source>
=== sceKernelCpuDcacheInvalidateSWForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x2F3BF020
|}
<source lang="C">void sceKernelCpuDcacheInvalidateSWForKernel(void); // DCISW, Data cache invalidate by set/way (all the cache)</source>
=== sceKernelCpuDcacheCleanSWForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x73A30DB2
|}
<source lang="C">void sceKernelCpuDcacheCleanSWForKernel(void); // DCCSW, Data cache clean by set/way (all the cache)</source>
=== sceKernelCpuDcacheCleanInvalidateSWForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x76DAB4D0
|}
<source lang="C">void sceKernelCpuDcacheCleanInvalidateSWForKernel(void); // DCCISW, Data cache clean and invalidate by set/way (all the cache)</source>
=== sceKernelCpuDcacheCleanMVACForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xF7159B55
|}
<source lang="C">void sceKernelCpuDcacheCleanMVACForKernel(int mva); // DCCMVAC, Data cache clean by MVA (PoC)</source>
=== sceKernelCpuDcacheCleanMVACRangeForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xC5C1EE4E
|}
<source lang="C">void sceKernelCpuDcacheCleanMVACRangeForKernel(void *addr, unsigned int size); // DCCMVAC, Data cache clean by MVA (PoC)</source>
=== sceKernelCpuDcacheCleanInvalidateMVACForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xC8E8C9E9
|}
<source lang="C">void sceKernelCpuDcacheCleanInvalidateMVACForKernel(int mva); // DCCIMVAC, Data cache clean and invalidate by MVA (PoC)</source>
=== sceKernelCpuIcacheInvalidateAllUISForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x264DA250
|}
<source lang="C">void sceKernelCpuIcacheInvalidateAllUISForKernel(void); // ICIALLUIS, Instruction cache invalidate all (PoU, IS)</source>
=== sceKernelCpuIcacheInvalidateAllUForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xAEE0B489
|}
<source lang="C">void sceKernelCpuIcacheInvalidateAllUForKernel(void); // ICIALLU, Instruction cache invalidate all (PoU)</source>
=== sceKernelCpuIcacheInvalidateMVAURangeForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xF4C7F578
|}
<source lang="C">void sceKernelCpuIcacheInvalidateMVAURangeForKernel(void *addr, unsigned int size); // ICIMVAU, Instruction cache invalidate by MVA (PoU)</source>
=== sceKernelCpuIcacheAndL2InvalidateMVAURangeForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x19F17BD0
|}
<source lang="c">int sceKernelCpuIcacheAndL2InvalidateMVAURangeForKernel(void *addr, unsigned int size);</source>
=== sceKernelCpuPreloadEngineKill ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xD0D85FF8
|}
*NSACR (Non-Secure Access Control Register)
*Test bit NS access to the Preload Engine resources
*[>] PLEFF (Preload Engine FIFO flush operation)
*[>] PLEKC (Preload Engine kill channel operation)
*[<] PLEASR (Preload Engine Activity Status Register)
<source lang="c">int sceKernelCpuPreloadEngineKill(void);</source>
=== sceKernelCpuUnrestrictedMemcpyForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x8C683DEC
|-
| 3.60 || non-secure || 0x8C683DEC
|}
Unrestricted memcpy by first setting the <code>DACR</code> register to <code>0xFFFF0000</code> and then doing a memcpy.
<source lang="c">int sceKernelCpuUnrestrictedMemcpyForKernel(void *dst, const void *src, size_t len);</source>
=== sceKernelCpuGetPaddrWithMaskForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x67343A07
|}
maskPAR is usually 0x33, sometimes 2.
<source lang="c">int sceKernelCpuGetPaddrWithMaskForKernel(int maskPAR, void *vaddr, void **result);</source>
=== sceKernelCpuGetPaddrForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x2A46E800
|}
Uses maskPAR 0x33.
<source lang="c">int sceKernelCpuGetPaddrForKernel(void *vaddr, void **result);</source>
=== sceKernelCpuForKernel_9B8173F4 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x9B8173F4
|}
Might be get_vaddr_memory_type.
Return value can be:
* 2
* 8
* 0x40
* 0x80
* 0xD0
* 0x80022007 (SCE_KERNEL_ERROR_VA2PA_FAULT)
<source lang="c">int sceKernelCpuForKernel_9B8173F4(void *vaddr);</source>
=== SceCpuForKernel_A5C9DBBA ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xA5C9DBBA
|}
Uses sceKernelCpuGetCpuIdForDriver, sceKernelCpuAtomicGetAndSub16ForDriver and sceKernelCpuUnlockStoreLRForDriver.
<source lang="c">int SceCpuForKernel_A5C9DBBA(void *addr);</source>
=== SceCpuForKernel_9D72DD1B ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x9D72DD1B
|}
Uses sceKernelCpuGetCpuIdForDriver and sceKernelCpuLockStoreLRForDriver.
<source lang="c">int SceCpuForKernel_9D72DD1B(void *addr);</source>
=== SceCpuForKernel_4CD4D921 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x4CD4D921
|}
<source lang="C">
*(uint32_t *)addr = 1;
*((uint16_t *)addr + 2) = 4;
*((uint16_t *)addr + 3) = 4;
return result;
</source>
aka write 01 00 00 00 04 00 04 00 at addr.
<source lang="c">int SceCpuForKernel_4CD4D921(void *addr);</source>
=== SceCpuForKernel_43CC6E20 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x43CC6E20
|}
Only used by SceKernelThreadmgr.
DACR off
Does some memory copies between the args.
<source lang="c">int SceCpuForKernel_43CC6E20(void *addr, int a2, int a3, int a4);</source>
=== SceCpuUnrestrictedBzeroIntForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x76EB0DD4
|}
Only used by SceKernelThreadmgr.
DACR off
<source lang="c">int SceCpuUnrestrictedBzeroIntForKernel(int *addr);</source>
=== SceCpuForKernel_337473B5 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x337473B5
|}
Only used by SceKernelThreadmgr.
DACR off
<source lang="c">int SceCpuForKernel_337473B5(volatile void *ptr, unsigned int value);</source>
=== SceCpuForKernel_37FBFD12 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x37FBFD12
|}
Only used by SceKernelThreadmgr.
same as SceCpuForKernel_337473B5 but DACR is not disabled
<source lang="c">int SceCpuForKernel_37FBFD12(volatile void *ptr, unsigned int value);</source>
=== SceCpuForKernel_D37AABE5 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xD37AABE5
|}
Only used by SceKernelThreadmgr.
similar as SceCpuForKernel_37FBFD12 but with a3
DACR is not disabled
<source lang="c">int SceCpuForKernel_D37AABE5(volatile void *ptr, unsigned int value, int a3);</source>
=== SceCpuForKernel_4553FBDE ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x4553FBDE
|}
Only used by SceKernelThreadmgr.
DACR is not disabled
<source lang="C">
  unsigned __int64 v2;
  do
  {
    v2 = __ldrexd(result);
    LODWORD(v2) = a2;
    HIDWORD(v2) = a2;
  }
  while ( __strexd(v2, result) );
  return result;
</source>
<source lang="c">int SceCpuForKernel_4553FBDE(unsigned uint64_t *result, int a2);</source>
=== SceCpuForKernel_6190A018 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x6190A018
|}
Only used by SceKernelThreadmgr.
similar as SceCpuForKernel_37FBFD12
DACR is not disabled
<source lang="c">int SceCpuForKernel_6190A018(unsigned __int64 *a1, signed int a2);</source>
=== SceCpuForKernel_D8A7216C ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xD8A7216C
|}
Only used by SceKernelThreadmgr.
similar as SceCpuForKernel_37FBFD12
DACR is not disabled
<source lang="c">int SceCpuForKernel_D8A7216C(unsigned __int64 *a1, int a2, int a3);</source>
=== SceCpuForKernel_7FB4E7AC ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x7FB4E7AC
|}
Only used by SceKernelThreadmgr.
similar as SceCpuForKernel_37FBFD12
DACR is not disabled
<source lang="c">int SceCpuForKernel_7FB4E7AC(unsigned __int64 *result, int a2);</source>
=== SceCpuForKernel_8510FA52 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x8510FA52
|}
Only used by SceKernelThreadmgr.
similar as SceCpuForKernel_37FBFD12
DACR is not disabled
<source lang="c">int SceCpuForKernel_8510FA52(unsigned int *a1);</source>
=== SceCpuForKernel_5F64E5ED ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x5F64E5ED
|}
Only used by SceKernelThreadmgr.
similar as SceCpuForKernel_37FBFD12
DACR is not disabled
<source lang="c">int SceCpuForKernel_5F64E5ED(unsigned int *a1);</source>
=== SceCpuForKernel_98E91C1C ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x98E91C1C
|}
Only used by SceKernelThreadmgr.
similar as SceCpuForKernel_37FBFD12
DACR is not disabled
<source lang="c">int SceCpuForKernel_98E91C1C(unsigned int *a1, int a2, signed int a3);</source>
=== SceCpuForKernel_6C7E7B57 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x6C7E7B57
|}
<source lang="C">
a1 = a1 | 0x4A;
return a1;
</source>
<source lang="c">int SceCpuForKernel_6C7E7B57(int a1);</source>
=== SceCpuForKernel_9A3281C0 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x9A3281C0
|}
<source lang="C">
*result = 0x810227EC;
*a2 = 0x81022B40;
return result;
</source>
<source lang="c">int SceCpuForKernel_9A3281C0(int *result_0, int *result_1);</source>
=== SceCpuForKernel_9CB82EB0 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x9CB82EB0
|}
<source lang="C">
return;
</source>
<source lang="c">int SceCpuForKernel_9CB82EB0(void);</source>
== SceCpuForDriver ==
=== sceKernelCpuGetCpuIdForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x5E4D5DE1
|}
Return the CPU ID of the current core.
<source lang="c">int sceKernelCpuGetCpuIdForDriver(void);</source>
<hr>
=== sceKernelCpuAtomicAddAndGet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x1E850481
|}
<source lang="c">unsigned char sceKernelCpuAtomicAddAndGet8ForDriver (unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicAddAndGet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x59F74E94
|}
<source lang="c">unsigned short sceKernelCpuAtomicAddAndGet16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicAddAndGet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x5F6A8743
|}
<source lang="c">unsigned int sceKernelCpuAtomicAddAndGet32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicAddAndGet64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4E459A03
|}
<source lang="c">unsigned long long sceKernelCpuAtomicAddAndGet64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicAddUnless8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x5CC62CEC
|}
<source lang="c">int sceKernelCpuAtomicAddUnless8ForDriver(unsigned char *addr, unsigned char val, unsigned char cmp);</source>
=== sceKernelCpuAtomicAddUnless16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x0F84AFE9
|}
<source lang="c">int sceKernelCpuAtomicAddUnless16ForDriver(unsigned short *addr, unsigned short val, unsigned short cmp);</source>
=== sceKernelCpuAtomicAddUnless32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x1F157DC3
|}
<source lang="c">int sceKernelCpuAtomicAddUnless32ForDriver(unsigned int *addr, unsigned int val, unsigned int cmp);</source>
=== sceKernelCpuAtomicAddUnless64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x06CCFA4B
|}
<source lang="c">int sceKernelCpuAtomicAddUnless64ForDriver(unsigned long long *addr, int unused, unsigned long long val, unsigned long long cmp);</source>
<hr>
=== sceKernelCpuAtomicAndAndGet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x32B62B1A
|}
<source lang="c">unsigned char sceKernelCpuAtomicAndAndGet8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicAndAndGet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xB281D52A
|}
<source lang="c">unsigned short sceKernelCpuAtomicAndAndGet16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicAndAndGet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xDF899E4B
|}
<source lang="c">unsigned int sceKernelCpuAtomicAndAndGet32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicAndAndGet64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xD18E7B54
|}
<source lang="c">unsigned long long sceKernelCpuAtomicAndAndGet64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicClearAndGet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x8E538AB5
|}
<source lang="c">unsigned char sceKernelCpuAtomicClearAndGet8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicClearAndGet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x6B050D7C
|}
<source lang="c">unsigned short sceKernelCpuAtomicClearAndGet16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicClearAndGet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x78C1F148
|}
<source lang="c">unsigned int sceKernelCpuAtomicClearAndGet32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicClearAndGet64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x2149CD4C
|}
<source lang="c">unsigned long long sceKernelCpuAtomicClearAndGet64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicClearMask8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x1B3336B0
|}
<source lang="c">void sceKernelCpuAtomicClearMask8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicClearMask16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x1BE58599
|}
<source lang="c">void sceKernelCpuAtomicClearMask16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicClearMask32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4AE1BCC0
|}
<source lang="c">void sceKernelCpuAtomicClearMask32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicClearMask64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x55760309
|}
<source lang="c">void sceKernelCpuAtomicClearMask64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicCompareAndSet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x3627F4E0
|}
<source lang="c">unsigned char sceKernelCpuAtomicCompareAndSet8ForDriver(unsigned char *addr, unsigned char cmp, unsigned char val);</source>
=== sceKernelCpuAtomicCompareAndSet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x6F63F56D
|}
<source lang="c">unsigned short sceKernelCpuAtomicCompareAndSet16ForDriver(unsigned short *addr, unsigned short cmp, unsigned short val);</source>
=== sceKernelCpuAtomicCompareAndSet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xCDA96E81
|}
<source lang="c">unsigned int sceKernelCpuAtomicCompareAndSet32ForDriver(unsigned int *addr, unsigned int cmp, unsigned int val);</source>
=== sceKernelCpuAtomicCompareAndSet64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4B527009
|}
<source lang="c">unsigned long long sceKernelCpuAtomicCompareAndSet64ForDriver(unsigned long long *addr, int unused, unsigned long long cmp, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicDecIfPositive8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x45153D4E
|}
<source lang="c">unsigned char sceKernelCpuAtomicDecIfPositive8ForDriver(unsigned char *addr);</source>
=== sceKernelCpuAtomicDecIfPositive16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x9A693F5B
|}
<source lang="c">unsigned short sceKernelCpuAtomicDecIfPositive16ForDriver(unsigned short *addr);</source>
=== sceKernelCpuAtomicDecIfPositive32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x2A71B03C
|}
<source lang="c">unsigned int sceKernelCpuAtomicDecIfPositive32ForDriver(unsigned int *addr);</source>
=== sceKernelCpuAtomicDecIfPositive64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x267D0B33
|}
<source lang="c">unsigned long long sceKernelCpuAtomicDecIfPositive64ForDriver(unsigned long long *addr);</source>
<hr>
=== sceKernelCpuAtomicGetAndAdd8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xFCDCD4DE
|}
<source lang="c">unsigned char sceKernelCpuAtomicGetAndAdd8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicGetAndAdd16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x225DF91A
|}
<source lang="c">unsigned short sceKernelCpuAtomicGetAndAdd16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicGetAndAdd32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x341B6E81
|}
<source lang="c">unsigned int sceKernelCpuAtomicGetAndAdd32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicGetAndAdd64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x043FD446
|}
<source lang="c">unsigned long long sceKernelCpuAtomicGetAndAdd64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicGetAndAnd8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xD8E675C0
|}
<source lang="c">unsigned char sceKernelCpuAtomicGetAndAnd8ForDriver(unsigned char *a1, unsigned char a2);</source>
=== sceKernelCpuAtomicGetAndAnd16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4A820BC5
|}
<source lang="c">unsigned short sceKernelCpuAtomicGetAndAnd16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicGetAndAnd32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x10EB35EB
|}
<source lang="c">unsigned int sceKernelCpuAtomicGetAndAnd32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicGetAndAnd64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x18A17E07
|}
<source lang="c">unsigned long long sceKernelCpuAtomicGetAndAnd64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicGetAndClear8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x382D1466
|}
<source lang="c">unsigned char sceKernelCpuAtomicGetAndClear8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicGetAndClear16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x8E9C086D
|}
<source lang="c">unsigned short sceKernelCpuAtomicGetAndClear16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicGetAndClear32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xE36F3A46
|}
<source lang="c">unsigned int sceKernelCpuAtomicGetAndClear32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicGetAndClear64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x88BA6002
|}
<source lang="c">unsigned long long sceKernelCpuAtomicGetAndClear64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicGetAndOr8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xBDF6F8E4
|}
<source lang="c">unsigned char sceKernelCpuAtomicGetAndOr8ForDriver(unsigned char *var, unsigned char value);</source>
=== sceKernelCpuAtomicGetAndOr16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x004F09D1
|}
<source lang="c">unsigned short sceKernelCpuAtomicGetAndOr16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicGetAndOr32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x2A40BB93
|}
<source lang="c">unsigned int sceKernelCpuAtomicGetAndOr32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicGetAndOr64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xCB73D6D5
|}
<source lang="c">unsigned long long sceKernelCpuAtomicGetAndOr64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicGetAndSet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x29599FC8
|}
<source lang="c">unsigned char sceKernelCpuAtomicGetAndSet8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicGetAndSet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x085532C8
|}
<source lang="c">unsigned short sceKernelCpuAtomicGetAndSet16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicGetAndSet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x0EE04C03
|}
<source lang="c">unsigned int sceKernelCpuAtomicGetAndSet32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicGetAndSet64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xD2DEE625
|}
<source lang="c">unsigned long long sceKernelCpuAtomicGetAndSet64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicGetAndSub8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x7B43D0D7
|}
<source lang="c">unsigned char sceKernelCpuAtomicGetAndSub8ForDriver (unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicGetAndSub16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x3EE9B5B8
|}
<source lang="c">unsigned short sceKernelCpuAtomicGetAndSub16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicGetAndSub32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xF891CF2A
|}
<source lang="c">unsigned int sceKernelCpuAtomicGetAndSub32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicGetAndSub64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xA7585370
|}
<source lang="c">unsigned long long sceKernelCpuAtomicGetAndSub64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicGetAndXor8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xBAF47F7B
|}
<source lang="c">unsigned char sceKernelCpuAtomicGetAndXor8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicGetAndXor16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x711801E6
|}
<source lang="c">unsigned short sceKernelCpuAtomicGetAndXor16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicGetAndXor32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x77E34309
|}
<source lang="c">unsigned int sceKernelCpuAtomicGetAndXor32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicGetAndXor64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xE212ECAD
|}
<source lang="c">unsigned long long sceKernelCpuAtomicGetAndXor64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicOrAndGet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x5D515F1B
|}
<source lang="c">unsigned char sceKernelCpuAtomicOrAndGet8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicOrAndGet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xADD39B84
|}
<source lang="c">unsigned short sceKernelCpuAtomicOrAndGet16ForDriver (unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicOrAndGet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xBC248C30
|}
<source lang="c">unsigned int sceKernelCpuAtomicOrAndGet32ForDriver (unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicOrAndGet64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x3E218AF7
|}
<source lang="c">unsigned long long sceKernelCpuAtomicOrAndGet64ForDriver(unsigned long long *addr, int unused, long long val);</source>
<hr>
=== sceKernelCpuAtomicSet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x0836537E
|}
<source lang="c">void sceKernelCpuAtomicSet8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicSet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x532CA3E8
|}
<source lang="c">void sceKernelCpuAtomicSet16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicSet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x3168BC57
|}
<source lang="c">void sceKernelCpuAtomicSet32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicSet64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xC381CE8C
|}
<source lang="c">void sceKernelCpuAtomicSet64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicSetIfGreaterGet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xC3868071
|}
<source lang="c">unsigned char sceKernelCpuAtomicSetIfGreaterGet8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicSetIfGreaterGet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x875B094D
|}
<source lang="c">unsigned short sceKernelCpuAtomicSetIfGreaterGet16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicSetIfGreaterGet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x26F71995
|}
<source lang="c">unsigned int sceKernelCpuAtomicSetIfGreaterGet32ForDriver(unsigned int *a1, unsigned int val);</source>
<hr>
=== sceKernelCpuAtomicSubAndGet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xEB085370
|}
<source lang="c">unsigned char sceKernelCpuAtomicSubAndGet8ForDriver(unsigned char *addr, unsigned char val);</source>
=== sceKernelCpuAtomicSubAndGet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x515682C9
|}
<source lang="c">unsigned short sceKernelCpuAtomicSubAndGet16ForDriver(unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicSubAndGet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xA4884C4E
|}
<source lang="c">unsigned int sceKernelCpuAtomicSubAndGet32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicSubAndGet64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xB5F8919C
|}
<source lang="c">unsigned long long sceKernelCpuAtomicSubAndGet64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuAtomicXorAndGet8ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x03887992
|}
<source lang="c">unsigned char sceKernelCpuAtomicXorAndGet8ForDriver (unsigned char *a1, unsigned char a2);</source>
=== sceKernelCpuAtomicXorAndGet16ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x646003D6
|}
<source lang="c">unsigned short sceKernelCpuAtomicXorAndGet16ForDriver (unsigned short *addr, unsigned short val);</source>
=== sceKernelCpuAtomicXorAndGet32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4244BE65
|}
<source lang="c">unsigned int sceKernelCpuAtomicXorAndGet32ForDriver(unsigned int *addr, unsigned int val);</source>
=== sceKernelCpuAtomicXorAndGet64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x692C51B3
|}
<source lang="c">unsigned long long sceKernelCpuAtomicXorAndGet64ForDriver(unsigned long long *addr, int unused, unsigned long long val);</source>
<hr>
=== sceKernelCpuDcacheAndL2InvalidateMVACRange_1ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x02796361
|}
1
<source lang="c">int sceKernelCpuDcacheAndL2InvalidateMVACRange_1ForDriver(void *ptr, size_t len);</source>
=== sceKernelCpuDcacheAndL2InvalidateMVACRange_20ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x8B4C26DF
|}
0x20
<source lang="c">int sceKernelCpuDcacheAndL2InvalidateMVACRange_20ForDriver(void *ptr, size_t len);</source>
=== sceKernelCpuDcacheAndL2CleanInvalidateMVACRange_1ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x364E68A4
|}
1
<source lang="c">int sceKernelCpuDcacheAndL2CleanInvalidateMVACRange_1ForDriver(void *ptr, size_t len);</source>
=== sceKernelCpuDcacheAndL2CleanInvalidateMVACRange_20ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xE551F99B
|}
0x20
<source lang="c">int sceKernelCpuDcacheAndL2CleanInvalidateMVACRange_20ForDriver(void *ptr, size_t len);</source>
=== sceKernelCpuDcacheAndL2CleanMVACRange_1ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x103872A5
|}
1
<source lang="c">int sceKernelCpuDcacheAndL2CleanMVACRange_1ForDriver(void *ptr, size_t len);</source>
=== sceKernelCpuDcacheAndL2CleanMVACRange_20ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x9CB9F0CE
|}
0x20
<source lang="c">int sceKernelCpuDcacheAndL2CleanMVACRange_20ForDriver(void *ptr, size_t len);</source>
=== SceCpuForDriver_E813EBB2 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xE813EBB2
|}
<source lang="C">
#define SceL2CacheReg 0x1A002000
__dsb();
*(int *)(SceL2CacheReg + 0x730) = 0;
while ( *(int *)(SceL2CacheReg + 0x730) & 1 )
    ;
__dmb();
</source>
<source lang="c">int SceCpuForDriver_E813EBB2(void);</source>
=== sceKernelCpuIsVaddrMappedForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x337CBDF3
|}
<source lang="C">
  res = SceCpuForKernel_9B8173F4(vaddr);
  if ( res != 8 )
  {
    if ( res <= 8 )
    {
      if ( res != 2 )
        return 0;
    }
    else if ( res != 0x40 && res != 0x80 )
    {
      return 0;
    }
  }
  return 1;
</source>
<source lang="c">int sceKernelCpuIsVaddrMappedForDriver(void *vaddr);</source>
<hr>
These functions implement a simple mutual exclusive access on a resource addr using LDREX/STREX.
=== sceKernelCpuLockStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.60 || 0xBF82DEB2
|-
| 3.60 || 0xBF82DEB2
|}
<source lang="c">void sceKernelCpuLockStoreLRForDriver(unsigned int *addr);</source>
=== sceKernelCpuTryLockStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x5AC9D394
|}
<source lang="c">unsigned int sceKernelCpuTryLockStoreLRForDriver(unsigned int *addr);</source>
=== sceKernelCpuUnlockStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.60 || 0xD6ED0C46
|-
| 3.60 || 0xD6ED0C46
|}
<source lang="c">void sceKernelCpuUnlockStoreLRForDriver(unsigned int *addr);</source>
<hr>
=== sceKernelCpuLockStoreFlagForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x3F42B434
|}
<source lang="c">void sceKernelCpuLockStoreFlagForDriver(unsigned int *result);</source>
=== sceKernelCpuTryLockStoreFlagForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4F7790B4
|}
<source lang="c">unsigned int sceKernelCpuTryLockStoreFlagForDriver(unsigned int *addr);</source>
=== sceKernelCpuUnlockStoreFlagForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xCB8ABDF0
|}
<source lang="c">void sceKernelCpuUnlockStoreFlagForDriver(unsigned int *addr);</source>
<hr>
These functions implement a simple mutual exclusive access on a resource addr using LDREX/STREX.
LR is stored as addr value.
While mutex is held, interrupts are disabled.
Used like this:
<source lang="c">
int prev_state = sceKernelCpuLockSuspendIntrStoreLRForDriver(mutex);
// do work
sceKernelCpuUnlockResumeIntrStoreLRForDriver(mutex, prev_state);
</source>
=== sceKernelCpuLockSuspendIntrStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.35 || 0xD32ACE9E
|-
| 3.60 || 0xD32ACE9E
|}
<source lang="c">unsigned int sceKernelCpuLockSuspendIntrStoreLRForDriver(unsigned int *addr);</source>
=== sceKernelCpuTryLockSuspendIntrStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x27C0B340
|}
<source lang="c">unsigned int sceKernelCpuTryLockSuspendIntrStoreLRForDriver(int *addr);</source>
=== sceKernelCpuUnlockResumeIntrStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.35 || 0x7BB9D5DF
|-
| 3.60 || 0x7BB9D5DF
|}
<source lang="c">void sceKernelCpuUnlockResumeIntrStoreLRForDriver(unsigned int *addr, int prev_state);</source>
<hr>
These functions implement a simple mutual exclusive access on a resource addr using LDREX/STREX.
0x80000000 is stored as addr value.
While mutex is held, interrupts are disabled.
Used like this:
<source lang="c">
int prev_state = sceKernelCpuLockSuspendIntrStoreFlagForDriver(mutex);
// do work
sceKernelCpuUnlockResumeIntrStoreFlagForDriver(mutex, prev_state);
</source>
=== sceKernelCpuLockSuspendIntrStoreFlagForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.35 || 0x4C38CE4D
|-
| 3.60 || 0x4C38CE4D
|}
<source lang="c">unsigned int sceKernelCpuLockSuspendIntrStoreFlagForDriver(unsigned int *addr);</source>
=== sceKernelCpuTryLockSuspendIntrStoreFlagForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xDE6482C6
|}
<source lang="c">unsigned int sceKernelCpuTryLockSuspendIntrStoreFlagForDriver(unsigned int *addr);</source>
=== sceKernelCpuUnlockResumeIntrStoreFlagForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.35 || 0x9EC91017
|-
| 3.60 || 0x9EC91017
|}
<source lang="c">void sceKernelCpuUnlockResumeIntrStoreFlagForDriver(unsigned int *addr, unsigned int prev_state);</source>
<hr>
=== sceKernelCpuSpinLockStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xCAC9AE80
|}
<source lang="c">void sceKernelCpuSpinLockStoreLRForDriver(unsigned int *result);</source>
=== sceKernelCpuTrySpinLockStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x093925BD
|}
<source lang="c">unsigned int sceKernelCpuTrySpinLockStoreLRForDriver(unsigned int *addr);</source>
=== sceKernelCpuSpinUnlockStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xF5FD5676
|}
<source lang="c">void sceKernelCpuSpinUnlockStoreLRForDriver(unsigned int *result);</source>
<hr>
=== sceKernelCpuSpinLockSuspendIntrStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xEC53D007
|}
<source lang="c">unsigned int sceKernelCpuSpinLockSuspendIntrStoreLRForDriver(unsigned int *addr);</source>
=== sceKernelCpuTrySpinLockSuspendIntrStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xF02467D1
|}
<source lang="c">unsigned int sceKernelCpuTrySpinLockSuspendIntrStoreLRForDriver(unsigned int *addr);</source>
=== sceKernelCpuSpinUnlockResumeIntrStoreLRForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x740A0750
|}
<source lang="c">void sceKernelCpuSpinUnlockResumeIntrStoreLRForDriver(unsigned int *addr, unsigned int prev_state);</source>
<hr>
=== sceKernelCpuDisableInterruptsForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.60 || 0x821FC0EE
|-
| 3.60 || 0x821FC0EE
|}
Disable irq (but not fiq) and returns previous interrupt bit status (so either 0 or 0x80).
<source lang="c">unsigned int sceKernelCpuDisableInterruptsForDriver(void);</source>
=== sceKernelCpuEnableInterruptsForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.60 || 0xF5BAD43B
|-
| 3.60 || 0xF5BAD43B
|}
Restore previous irq state, pass either 0 or 0x80.
<source lang="c">unsigned int sceKernelCpuEnableInterruptsForDriver(unsigned int prev_state);</source>
== SceSysclibForKernel ==
Was present on 1.69. Doesn't exist on 3.60.
== SceSysclibForDriver ==
The C standard library for use in kernel only. (Userland have [[SceLibKernel]], which confusingly is userland only).
Include standard string functions (no insecure variants like <code>strcpy</code>).
=== __aeabi_idiv ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x2518CD9E
|}
=== __aeabi_uidiv ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.35 || non-secure || 0xA9FF1205
|-
| 3.60 || non-secure || 0xA9FF1205
|}
=== __aeabi_uidivmod ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.35 || non-secure || 0xA46CB7DE
|-
| 3.60 || non-secure || 0xA46CB7DE
|}
=== __aeabi_ldivmod ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x7554AB04
|}
=== __memcpy_chk ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x8A0B0815
|}
=== __memmove_chk ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x35DBB110
|}
=== __memset_chk ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x1A30BB28
|}
=== __stack_chk_fail ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xB997493D
|-
| 3.60 || non-secure || 0xB997493D
|}
=== __strncat_chk ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x33EE298B
|}
=== __strncpy_chk ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x96268C53
|}
=== look_ctype_table ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xCDF7F155
|}
=== memchr ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x60DAEA30
|}
=== memcmp ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xB5A4D745
|}
timing constant memcmp
=== memcmp2 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xF939E83D
|-
| 3.60 || non-secure || 0xF939E83D
|}
=== memcpy ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.60 || non-secure || 0x40C88316
|-
| 1.69 || non-secure || 0x40C88316
|-
| 3.60 || non-secure || 0x40C88316
|}
=== memmove ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x6CC9C1A1
|-
| 3.60 || non-secure || 0x6CC9C1A1
|}
On 1.69, this seems to be implemented incorrectly.
=== memset ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.60 || non-secure || 0x0AB9BF5C
|-
| 3.60 || non-secure || 0x0AB9BF5C
|}
=== memset2 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x502B000D
|}
=== rshift ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x1D89F6C0
|-
| 3.60 || non-secure || 0x1D89F6C0
|}
=== snprintf ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xAE7A8981
|-
| 3.60 || non-secure || 0xAE7A8981
|}
=== strchr ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x38463759
|-
| 3.35 || non-secure || 0x38463759
|-
| 3.60 || non-secure || 0x38463759
|}
=== strcmp ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x0B33BC43
|-
| 3.60 || non-secure || 0x0B33BC43
|}
=== strlcat ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x12504E09
|}
=== strlcpy ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x7FB4EBEC
|}
=== strlen ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xCFC6A9AC
|-
| 3.60 || non-secure || 0xCFC6A9AC
|}
=== strncat ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xA1D1C32C
|-
| 3.60 || non-secure || 0xA1D1C32C
|}
=== strncmp ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.60 || non-secure || 0x12CEE649
|-
| 1.69 || non-secure || 0x12CEE649
|-
| 3.60 || non-secure || 0x12CEE649
|}
=== strncpy ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x6D286146
|}
=== strnlen ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xCD4BD884
|-
| 3.60 || non-secure || 0xCD4BD884
|}
=== strrchr ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x7F0E0835
|-
| 3.60 || non-secure || 0x7F0E0835
|}
=== strstr ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0x1304A69D
|-
| 3.60 || non-secure || 0x1304A69D
|}
=== strtol ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || non-secure || 0xAB77C5AA
|-
| 3.60 || non-secure || 0xAB77C5AA
|}
=== strtoll ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x87AAAFA2
|}
=== strtoul ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x4E5042DA
|}
=== tolower ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x0021DAF9
|}
=== toupper ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xA685DCB1
|}
=== vsnprintf ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x3DDBE2E1
|}
== SceSysrootForKernel ==
=== sceSysrootGetSmSelfInfoForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xF10AB792
|}
<source lang="c">
typedef struct sm_self_info
{
  uint32_t size; // 0x0C
  char* sm_self_data;
  uint32_t sm_self_size;
} sm_self_info;
int sceSysrootGetSmSelfInfoForKernel(int index, sm_self_info* state);
</source>
{| class="wikitable"
! Index !! SM SELF location
|-
| 0 || os0:sm/gcauthmgr_sm.self
|-
| 1 || os0:sm/rmauth_sm.self
|-
| 2 ||  os0:sm/encdec_w_portability_sm.self
|}
=== sceSysrootGetSelfInfoForKernel ===
{| class="wikitable"
! Version !! NID
|-
| 3.60 || 0x4F0A4066
|}
<source lang="c">
typedef struct SceSelfInfo // size is 0x90
{
  SceUInt64 program_authority_id;
  uint8_t padding1[8];
  uint8_t capability[0x20];
  uint8_t attribute[0x20];
  uint8_t padding2[0x10];
  uint8_t klicensee[0x10];
  uint32_t unk_70;
  uint32_t unk_74;
  uint32_t unk_78;
  uint32_t unk_7C;
  uint32_t unk_80; // ex: 0x10
  uint32_t unk_84;
  uint32_t unk_88;
  uint32_t unk_8C;
} SceSelfInfo;
int sceSysrootGetSelfInfoForKernel(SceUID pid, SceSelfInfo *self_info);
</source>
=== sceSysrootGetProcessTitleIdForPidForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xEC3124A3
|}
<source lang="C">int sceSysrootGetProcessTitleIdForPidForKernel(SceUID pid, char *titleid, size_t len);</source>
=== sceSysrootGetNidNameForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x0B79E220
|}
<source lang="c">int sceSysrootGetNidNameForKernel(unsigned int nid, const char **name);</source>
=== sceSysrootGetModuleInfoForPidForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xFF9F80FF
|}
Returns export info at address for pid (contains module, lib and NID and their names).
<source lang="c">int sceSysrootGetModuleInfoForPidForKernel(SceUID pid, const void *addr, unsigned int *info); // info[0] = 0x3C</source>
=== SceSysrootForKernel_CC85905B ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xCC85905B
|}
Returns the exception vectors base address. The address of the exception vectors for the CPU <code>i</code> is: <code>SceSysrootForKernel_CC85905B() + 0x40 * i</code>.
<source lang="C">void *SceSysrootForKernel_CC85905B(void);</source>
=== SceSysrootForKernel_377895EB ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x377895EB
|}
<source lang="C">int SceSysrootForKernel_377895EB(int *a1);</source>
Returns 0 on success, 0xFFFFFFFF on error.
a1 usually takes value 1 after this function is called.
Called by [[SceSblAuthMgr#sceSblAuthMgrAuthHeaderForKernel|sceSblAuthMgrAuthHeaderForKernel]] before F00D request.
=== sceSysrootGetSysbaseForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x3E455842
|}
<source lang="C">sysbase_t* sceSysrootGetSysbaseForKernel();</source>
=== sceSysrootGetSysrootBufferForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x9DB56D1F
|}
Returns pointer to [[Sysroot|Sysroot buffer]].
<source lang="C">SceBootArgs *sceSysrootGetSysrootBufferForKernel(void);</source>
=== sceSysrootGetFactorySystemSwVersionForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xD3872270
|}
return (int)(sysroot_buffer->factory_fw_version);
<source lang="C">int sceSysrootGetFactorySystemSwVersionForKernel(void);</source>
=== sceSysrootGetUnkCForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xFFD6E24D
|}
return (int)(sysroot_buffer->unk_C);
<source lang="C">int sceSysrootGetUnkCForKernel(void);</source>
=== sceSysrootGetUnk10ForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x403B509E
|}
return (int)(sysroot_buffer->unk_C + 4);
<source lang="C">int sceSysrootGetUnk10ForKernel(void);</source>
=== sceSysrootGetUnkC0ForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xAB3CC7D0
|}
return sysroot_buffer->unk_C0;
<source lang="C">int sceSysrootGetUnkC0ForKernel(void);</source>
=== sceSysrootGetWakeupFactorForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x2F97041A
|}
return sysroot_buffer->wakeup_factor;
<source lang="C">int sceSysrootGetWakeupFactorForKernel(void);</source>
=== sceSysrootGetHardwareInfoForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x930B1342
|}
return sysroot_buffer->hardware_info;
<source lang="C">int sceSysrootGetHardwareInfoForKernel(void);</source>
=== sceSysrootGetSessionIdForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x84783B71
|}
Writes sysroot_buffer->session_id to buffer.
<source lang="C">int sceSysrootGetSessionIdForKernel(char buffer[0x10]);</source>
=== sceSysrootGetHardwareFlagsForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x46E72428
|}
Writes sysroot_buffer->hardware_flags to buffer.
<source lang="C">int sceSysrootGetHardwareFlagsForKernel(char buffer[0x10]);</source>
=== sceSysrootIsExternalBootModeForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x89D19090
|}
return *(int *)(sysroot_buffer->boot_type_indicator_1) & 1;
<source lang="C">int sceSysrootIsExternalBootModeForKernel(void);</source>
=== sceSysrootIsSomeBootModeForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x7B7F8171
|}
return (*(int *)(sysroot_buffer->boot_type_indicator_1) >> 19) & 1;
<source lang="C">int sceSysrootIsSomeBootModeForKernel(void);</source>
=== sceSysrootIsSomeBootMode2ForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x7918D44E
|}
return sysroot_buffer->boot_type_indicator_1[2] & 1;
<source lang="C">int sceSysrootIsSomeBootMode2ForKernel(void);</source>
=== sceSysrootIsSomeModeForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xAE7A8F1D
|}
Returns true if (sysroot->boot_flags[0x1] != 0xFF).
<source lang="C">int sceSysrootIsSomeModeForKernel(void);</source>
=== sceSysrootIsSomeModeForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xAE7A8F1D
|}
Returns true if (sysroot->boot_flags[0x1] != 0xFF).
<source lang="C">int sceSysrootIsSomeModeForKernel(void);</source>
=== sceSysrootIsSafeModeForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x834439A7
|}
<source lang="C">int sceSysrootIsSafeModeForKernel(void);</source>
=== sceSysrootIsUpdateModeForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xB0E1FC67
|}
<source lang="C">int sceSysrootIsUpdateModeForKernel(void);</source>
=== sceSysrootIsBsodRebootForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4373AC96
|}
return (*(int *)(sysroot_buffer->wakeup_factor) & 0x7Fu) <= 0x17;
<source lang="C">int sceSysrootIsBsodRebootForKernel(void);</source>
=== sceSysrootIsUsbEnumWakeupForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x79C9AE10
|}
  if ( *(int *)(sysroot_buffer->unk_C0) & 0x90000 )
    result = 1;
  else
    result = (*(int *)(sysroot_buffer->wakeup_factor) & 0x7Fu) <= 0xF;
  return result;
<source lang="C">int sceSysrootIsUsbEnumWakeupForKernel(void);</source>
=== sceSysrootIsUnknownRebootForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xE4EA1960
|}
return (*(int *)(sysroot_buffer->wakeup_factor) & 0x7Fu) <= 1;
<source lang="C">int sceSysrootIsUnknownRebootForKernel(void);</source>
=== sceSysrootUseExternalStorageForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x55392965
|}
Returns true when Manufacturing Mode flag is set:
return (*(int *)(sysroot_buffer->boot_type_indicator_1) >> 2) & 1;
<source lang="C">int sceSysrootUseExternalStorageForKernel(void);</source>
=== sceSysrootUseInternalStorageForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x50FE3B4D
|}
Returns true when use internal storage flag is not set:
return *(char *)(sysroot_buffer->boot_flags[5]) & 1 ^ 1;
<source lang="C">int sceSysrootUseInternalStorageForKernel(void);</source>
=== sceSysrootRegisterLicMgrGetLicenseStatusForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x71DB83A2
|}
Write value at sysroot_ctx + 0x380.
<source lang="c">int sceSysrootRegisterLicMgrGetLicenseStatusForKernel(int (__cdecl *sceSblLicMgrGetLicenseStatusForDriver)());</source>
=== sceSysrootExecuteUnk344ForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x20009397
|}
Calls int (__cdecl *unk344)();
<source lang="c">int sceSysrootExecuteUnk344ForKernel(void);</source>
=== sceSysrootUtMgrHasNpTestFlagForKernel ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xA43599E9
|}
Calls int (__cdecl *sceSblUtMgrHasNpTestFlagForDriver)();
<source lang="c">int sceSysrootUtMgrHasNpTestFlagForKernel(void);</source>
=== sceKernelAllocHeapMemoryForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xD351EBC8
|}
Same as <code>sceKernelAllocHeapMemoryWithOpt1ForDriver</code> but does set <code>uid</code> to 0x1000B.
Checks that uid is 0x10013 or 0x10005
<source lang="C">
void* sceKernelAllocHeapMemoryForKernel(SceUID uid, SceSize size, ctx_49D4DD9B *unk);
</source>
== SceSysrootForDriver ==
=== sceSysrootSetSystemSwVersionForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x3276086B
|}
Set System Software version as int in SceSysmem memory. For exemple: 0x3650000 on 3.65.
<source lang="c">int sceSysrootSetSystemSwVersionForDriver(int sw_version);</source>
=== sceSysrootGetSystemSwVersionForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x67AAB627
|}
Returns System Software version as int from SceSysmem memory. For exemple: 0x3650000 on 3.65.
<source lang="c">int sceSysrootGetSystemSwVersionForDriver(void);</source>
=== ?sceSysrootInitI2cForDriver? ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x930B1342
|}
<source lang="c">int ?sceSysrootInitI2cForDriver?(void);</source>
=== sceSysrootIsSafeModeForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x834439A7
|}
<source lang="C">int sceSysrootIsSafeModeForDriver(void);</source>
== SceKernelUtilsForDriver ==
=== sceAesDecrypt1ForDriver ===
Decrypt with AES.
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xD8678061
|-
| 3.60 || 0xD8678061
|}
<source lang="c">int sceAesDecrypt1ForDriver(void *ctx, const unsigned char* src, unsigned char* dst);</source>
=== sceAesDecrypt2ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xE39CD272
|}
<source lang="c">int sceAesDecrypt2ForDriver(void *ctx, const unsigned char* src, unsigned char* dst);</source>
=== sceAesEncrypt1ForDriver ===
Encrypt with AES. There are two functions that are the same on 1.69.
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xC2A61770
|-
| 3.60 || 0xC2A61770
|}
<source lang="c">int sceAesEncrypt1ForDriver(void *ctx, const unsigned char* src, unsigned char* dst);</source>
=== sceAesEncrypt2ForDriver ===
Encrypt with AES. There are two functions that are the same on 1.69.
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x302947B6
|-
| 3.60 || 0x302947B6
|}
<source lang="c">int sceAesEncrypt2ForDriver(void *ctx, const unsigned char* src, unsigned char* dst);</source>
=== sceAesInit1ForDriver ===
This sets up the AES engine. <code>ctx</code> is a 960 byte buffer (int 1.69). <code>blocksize</code> and <code>keysize</code> is the security in bits. 128/196/256 are supported values.
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xF12B6451
|-
| 3.60 || 0xF12B6451
|}
last arg to subroutine is 0
<source lang="c">int sceAesInit1ForDriver(void *ctx, int blocksize, int keysize, const unsigned char* key);</source>
=== sceAesInit2ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xEDA97D6D
|}
last arg to subroutine is 1
<source lang="c">int sceAesInit2ForDriver(void *ctx, int blocksize, int keysize, const unsigned char* key);</source>
=== sceAesInit3ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x72408E29
|}
last arg to subroutine is 2
<source lang="c">int sceAesInit3ForDriver(void *ctx, int blocksize, int keysize, const unsigned char* key);</source>
=== sceDeflateDecompressForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x8AF1FAD4
|}
=== sceDeflateDecompressPartialForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x3D74CCDF
|}
=== sceGzipDecompressForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x367EE3DF
|}
=== sceGzipGetCommentForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xCD3AE08F
|}
=== sceGzipGetCompressedDataForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x63619124
|}
=== sceGzipGetInfoForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xFFC6A10F
|}
=== sceGzipGetNameForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xF901FD3E
|}
=== sceGzipIsValidForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xD8FAEFD4
|}
=== sceHmacSha1DigestForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x29A28957
|}
<source lang="C">int sceHmacSha1DigestForDriver(const unsigned char* key, int key_len, const unsigned char* data, int data_len, unsigned char* digest);</source>
=== sceHmacSha224DigestForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x7F2A7B99
|}
<source lang="C">int sceHmacSha224DigestForDriver(const unsigned char* key, int key_len, const unsigned char* data, int data_len, unsigned char* digest);</source>
=== sceHmacSha256DigestForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x83EFA1CC
|}
<source lang="C">int sceHmacSha256DigestForDriver(const unsigned char* key, int key_len, const unsigned char* data, int data_len, unsigned char* digest);</source>
=== sceMt19937GlobalInitForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xD428CC2A
|}
=== sceMt19937GlobalUninitForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x875B2A1C
|}
=== sceMt19937InitForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4C9A5730
|}
=== sceMt19937UIntForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x92AEDFBC
|}
=== sceSfmt19937FillArray32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x2B30548B
|}
=== sceSfmt19937FillArray64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x49B41540
|}
=== sceSfmt19937GenRand32ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xBBE4701A
|}
=== sceSfmt19937GenRand64ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x45DEAAD6
|}
=== sceSfmt19937InitByArrayForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x33AE1203
|}
=== sceSfmt19937InitGenRandForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xAB48C3CA
|}
=== sceSha1BlockInitForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xE4390FFA
|}
<source lang="C">int sceSha1BlockInitForDriver(void* ctx);</source>
=== sceSha1BlockResultForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x48F24106
|}
<source lang="C">int sceSha1BlockResultForDriver(void* ctx, unsigned char* digest);</source>
=== sceSha1BlockUpdateForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x478A6F3C
|}
<source lang="C">int sceSha1BlockUpdateForDriver(void* ctx, const unsigned char* data, int size);</source>
=== sceSha1DigestForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x87DC7F2F
|}
<source lang="C">int sceSha1DigestForDriver(unsigned char *data, int size, unsigned char* digest);</source>
=== sceSha224BlockInitForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xC762EA6D
|}
<source lang="C">int sceSha224BlockInitForDriver(void* ctx);</source>
=== sceSha224BlockResultForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xFBF2A442
|}
<source lang="C">int sceSha224BlockResultForDriver(void* ctx, unsigned char* digest);</source>
=== sceSha224BlockUpdateForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x7556E611
|}
<source lang="C">int sceSha224BlockUpdateForDriver(void* ctx, const unsigned char* data, int size);</source>
=== sceSha224DigestForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x9EA9D4DC
|}
<source lang="C">int sceSha224DigestForDriver(unsigned char *data, int size, unsigned char* digest);</source>
=== sceSha256BlockInitForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xD909FA2C
|}
<source lang="C">int sceSha256BlockInitForDriver(void* ctx);</source>
=== sceSha256BlockResultForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4899CD4B
|}
<source lang="C">int sceSha256BlockResultForDriver(void* ctx, unsigned char* digest);</source>
=== sceSha256BlockUpdateForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x236A9097
|}
<source lang="C">int sceSha256BlockUpdateForDriver(void* ctx, const unsigned char* data, int size);</source>
=== sceSha256DigestForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xA773A6A8
|}
<source lang="C">int sceSha256DigestForDriver(unsigned char *data, int size, unsigned char* digest);</source>
=== sceZlibDecompressForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x900148DB
|}
=== sceZlibGetCompressedDataForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x01EB6C45
|}
=== sceZlibGetInfoForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x5B9BCD75
|}
== SceZlibForDriver ==
[http://www.zlib.net/ zlib] compression library.
{| class="wikitable"
|-
! Firmware !! zlib version
|-
| 1.60 || 1.2.5
|-
| 3.60 || ??
|}
=== inflate ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.60 || non-secure || 0xE4F34A68
|-
| 3.60 || non-secure || 0xE4F34A68
|}
=== deflate ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.60 || non-secure || 0xE859D60F
|-
| 3.60 || non-secure || 0xE859D60F
|}
=== deflateReset ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.60 || non-secure || 0x68CFEA45
|-
| 3.60 || non-secure || 0x68CFEA45
|}
=== crc32 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.60 || non-secure || 0xE0CE06C0
|-
| 3.60 || non-secure || 0xE0CE06C0
|}
=== adler32 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.60 || non-secure || 0x98619620
|-
| 3.60 || non-secure || 0x98619620
|}
=== inflateSetDictionary ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.60 || non-secure || 0x7B16DBD6
|-
| 3.60 || non-secure || 0x7B16DBD6
|}
== SceKernelSuspendForDriver ==
Used to register callbacks for handling suspend/resume related events.
=== sceKernelRegisterSysEventHandlerForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0x04C05D10
|-
| 3.60 || 0x04C05D10
|}
<source lang="c">
typedef struct {
    uint32_t size; // 24
    uint32_t unk1;
    uint32_t unk2;
    uint32_t unk3;
    uint32_t unk4;
    uint32_t unk5;
} suspend_args_t;
typedef int (suspend_callback_t)(int resume, int event_id, suspend_args_t *args, void *opt);
int sceKernelSuspendRegisterCallbackForDriver(const char *name, suspend_callback_t *callback_func, void *opt);
</source>
Registers a function for handling suspend/resume. <code>resume</code> is 0 if we are currently suspending and 1 if we are currently resuming. <code>opt</code> is passed from the registration. Registration adds an entry to a linked list and returns the block id for the new entry.
Returns the suspend_callback_id.
=== sceKernelUnregisterSysEventHandlerForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xDD61D621
|-
| 3.60 || 0xDD61D621
|}
<source lang="c">int sceKernelUnregisterSysEventHandlerForDriver(int id);</source>
Call with the id returned from <code>suspend_register_callback</code> to remove the entry from the linked list and free the memory.
=== sceKernelSysEventDispatchForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69 || 0xD4622EA8
|-
| 3.60 || 0xD4622EA8
|}
<source lang="c">int sceKernelSysEventDispatchForDriver(int resume, int eventid, suspend_args_t *args, int stop_on_error);</source>
This will go through the linked list and call each callback. If <code>stop_on_error</code> is set, then the first callback that returns a negative value will stop the call chain and return the block id of the callback that broke the chain. Otherwise, this function will invoke each callback and return zero.
=== sceKernelPowerTickForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xE0489831
|}
<source lang="c">
typedef enum SceKernelPowerTickType {
/** Cancel all timers */
SCE_KERNEL_POWER_TICK_DEFAULT = 0,
/** Cancel automatic suspension timer */
SCE_KERNEL_POWER_TICK_DISABLE_AUTO_SUSPEND = 1,
/** Cancel OLED-off timer */
SCE_KERNEL_POWER_TICK_DISABLE_OLED_OFF = 4,
/** Cancel OLED dimming timer */
SCE_KERNEL_POWER_TICK_DISABLE_OLED_DIMMING = 6
} SceKernelPowerTickType;
int sceKernelPowerTickForDriver(int type);
</source>
Cancel specified idle timers to prevent entering in power save processing.
Returns 0 on success.
== SceQafMgrForDriver ==
Provides many device permission checks including PSVita model checks, running app privilege checks, debugging enabled checks, and so on.
=== SceQafMgrForDriver_7B14DC45 ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x7B14DC45
|}
Used by SceAppMgr.
return ((unsigned int)*(char *)(SceSysrootGetSysrootBufferForKernel() + 0x2D) >> 1) & 1; // = 0x2D + BIT number 30
<source lang="C">int SceQafMgrForDriver_7B14DC45(void);</source>
== ScePmMgrForDriver ==
=== scePmMgrGetProductModeForDriver ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x2AC815A2
|}
Returns 0 on success.
Gets sysroot_buffer using [[SceSysmem#sceKernelGetSysrootBufferForDriver|sceKernelGetSysrootBufferForDriver]].
result = ((int *)(sysroot_buffer->boot_type_indicator_1) >> 2) & 1; // manufacturing mode flag
<source lang="C">int scePmMgrGetProductModeForDriver(int* result);</source>
=== scePmMgrIsExternalBootModeForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xBD1F193B
|}
Gets sysroot_buffer using [[SceSysmem#sceKernelGetSysrootBufferForDriver|sceKernelGetSysrootBufferForDriver]].
return (int *)(sysroot_buffer->boot_type_indicator_1) & 1;
<source lang="C">int scePmMgrIsExternalBootModeForDriver(void);</source>
== SceSblAIMgrForDriver ==
=== sceSblAIMgrGetSMIForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x47D9CF13
|}
<source lang="C">int sceSblAIMgrGetSMIForDriver(int *shipped_fw_version);</source>
=== sceSblAIMgrGetProductCodeForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x14345161
|}
Product Code = Target Id
<source lang="C">int sceSblAIMgrGetProductCodeForDriver(void);</source>
=== sceSblAIMgrGetProductSubCodeForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xB33CEC8F
|}
Product Sub Code = Model revision
<source lang="C">int sceSblAIMgrGetProductSubCodeForDriver(void);</source>
=== sceSblAIMgrIsTestForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x3B638885
|}
TEST = Internal Test Unit
Returns true if PsCode Product Code <= 0x100.
<source lang="C">int sceSblAIMgrIsTestForDriver(void);</source>
=== sceSblAIMgrIsToolOrTestForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x274663A0
|}
TOOL = DevKit
Returns true if PsCode Product Code <= 0x101.
<source lang="C">int sceSblAIMgrIsToolOrTestForDriver(void);</source>
=== sceSblAIMgrIsNonCEXForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xF4B98F66
|}
Returns true if PsCode Product Code <= 0x102.
<source lang="C">int sceSblAIMgrIsNonCEXForDriver(void);</source>
=== sceSblAIMgrIsCEXForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xD78B04A2
|}
Returns sceSblAIMgrIsJapaneseFatForDriver if PsCode Product Code <= 0x111 else returns 0.
<source lang="C">int sceSblAIMgrIsCEXForDriver(void);</source>
=== sceSblAIMgrIsVITAForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x4273B97B
|}
Returns sceSblAIMgrIsGenuineVITAForDriver.
<source lang="C">int sceSblAIMgrIsVITAForDriver(void);</source>
=== sceSblAIMgrIsDolceForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x71608CA3
|}
Returns sceSblAIMgrIsGenuineDolceForDriver if returns true else returns sceKernelCheckDipswForDriver(0x98).
<source lang="C">int sceSblAIMgrIsDolceForDriver(void);</source>
=== sceSblAIMgrIsGenuineVITAForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x963CA644
|}
Returns true if:
*PsCode Product Code <= 0x111 AND sceSblAIMgrIsGenuineDolceForDriver returns false
*sceSblAIMgrIsJapaneseFatForDriver returns true AND HardwareInfo != 0x700000 != 0x720000 != 0x510000
<source lang="C">int sceSblAIMgrIsGenuineVITAForDriver(void);</source>
=== sceSblAIMgrIsGenuineDolceForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xC6E83F34
|}
<source lang="C">int sceSblAIMgrIsGenuineDolceForDriver(void);</source>
=== sceSblAIMgrIsJapaneseFatForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x6D5A3FC9
|}
<source lang="C">int sceSblAIMgrIsJapaneseFatForDriver(void);</source>
=== sceSblAIMgrIsToolRev3ForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xBB9D146B
|}
Returns true if PsCode Product Code == 0x101 and PsCode Product Sub Code <= 3.
<source lang="C">int sceSblAIMgrIsToolRev3ForDriver(void);</source>
=== sceSblAIMgrIsToolRev4ForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x37A79140
|}
Returns true if PsCode Product Code == 0x101 and PsCode Product Sub Code <= 4.
<source lang="C">int sceSblAIMgrIsToolRev4ForDriver(void);</source>
=== sceSblAIMgrIsToolRev5ForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xE5E47FF7
|}
Returns true if PsCode Product Code == 0x101 and PsCode Product Sub Code <= 5.
<source lang="C">int sceSblAIMgrIsToolRev5ForDriver(void);</source>
=== sceSblAIMgrIsPrototypeRev2ForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xFF5784B9
|}
Returns true if PsCode Product Code == 0x103 and PsCode Product Sub Code <= 2.
<source lang="C">int sceSblAIMgrIsPrototypeRev2ForDriver(void);</source>
=== sceSblAIMgrIsPrototypeRev7ForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x05F79D4A
|}
Returns true if PsCode Product Code == 0x103 and PsCode Product Sub Code <= 7.
<source lang="C">int sceSblAIMgrIsPrototypeRev7ForDriver(void);</source>
== SceProcEventForDriver ==
=== SceProcEventDeleteUidForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x3DED57CC
|}
Wrapper to [[SceSysmem#sceKernelDeleteUidForDriver|sceKernelDeleteUidForDriver]].
<source lang="C">int SceProcEventDeleteUidForDriver(int uid);</source>
=== sceProcEventCreateEventForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x2A43912D
|}
Uses [[SceSysmem#sceKernelCreateEventForDriver|sceKernelCreateEventForDriver]].
Returns uid.
<source lang="C">int sceProcEventCreateEventForDriver(const char *name, int *a2, int a3);</source>
=== SceProcEventForDriver_414CC813 ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x414CC813
|}
?Update Event?
Uses suspend/resume LR.
<source lang="C">int SceProcEventForDriver_414CC813(int a1, int a2, int a3, int a4, int *a5, int a6);</source>
== SceDebugLed ==
=== sceKernelGetGPI ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x14F582CF
|}
<source lang="C">int sceKernelGetGPI(void);</source>
=== sceKernelSetGPO ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x78E702D3
|}
<source lang="C">int sceKernelSetGPO(int value);</source>
=== get_74 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x2B6EABAD
|}
<source lang="C">int get_74(void);</source>
=== get_78 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x0E6B9890
|}
<source lang="C">int get_78(void);</source>
== SceDebugLedForDriver ==
=== sceKernelGetGPIForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x14F582CF
|}
Only SceDebugLedForDriver function used by SceCoredump.
<source lang="C">int sceKernelGetGPIForDriver(void);</source>
=== sceKernelSetGPIForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x51C5325A
|}
<source lang="C">int sceKernelSetGPIForDriver(int value);</source>
=== sceKernelGetGPOForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x3BB289F7
|}
<source lang="C">int sceKernelGetGPOForDriver(void);</source>
=== sceKernelSetGPOForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x78E702D3
|}
<source lang="C">int sceKernelSetGPOForDriver(int value);</source>
=== sceKernelSetGPOMaskForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x098473B0
|}
<source lang="C">sceKernelSetGPOMaskForDriver(int a1, int a2);</source>
=== get_74 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x2B6EABAD
|}
<source lang="C">int get_74(void);</source>
=== set_74 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x24173819
|}
<source lang="C">int set_74(int value);</source>
=== get_78 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x0E6B9890
|}
<source lang="C">int get_78(void);</source>
=== set_78 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xF62154E7
|}
<source lang="C">int set_78(int value);</source>
== SceDebugForKernel ==
=== sceDebugSetHandlersForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x10067B7B
|}
<source lang="c">int sceDebugSetHandlersForKernel(void (*func)(int unk, const char *format, const uint32_t *args), void *args);</source>
=== sceDebugPutcharForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x82D2EDCE
|}
Print character.
<source lang="c">int sceDebugPutcharForKernel(int character);</source>
=== sceDebugGetPutcharHandlerForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xE783518C
|}
Returns pointer to current debug print char handler.
<source lang="c">void *sceDebugGetPutcharHandlerForKernel(void);</source>
=== sceDebugRegisterPutcharHandlerForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xE6115A72
|}
Set debug print char handler.
<source lang="c">int sceDebugRegisterPutcharHandlerForKernel(int (*func)(void *args, char c), void *args);</source>
=== SceDebugForKernel_082B8D6A ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x082B8D6A
|}
Print kernel exception information.
<source lang="C">
// name can be:
// UNDEF - ?
// PABT - Prefetch Abort
// DABT - Data Abort
// NEST - ?
int SceDebugForKernel_082B8D6A(void *unk, void *ctx, int index, char *name);
</source>
=== sceDebugDisableInfoDumpForKernel ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 3.60 || non-secure || 0xF857CDD6
|}
<source lang="C">
// ex: sceDebugDisableInfoDumpForKernel(0); as used in henkaku/payload.c
int sceDebugDisableInfoDumpForKernel(int flag);
</source>
== SceDebugForDriver ==
=== Types ===
<source lang="C">
struct kernel_message_ctx
{
  int hex_value0_hi;
  int hex_value0_lo;
  int hex_value1;
  char* msg0;
  int num;
  char* msg1;
};
</source>
=== sceDebugPrintfForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x391B74B7
|}
<source lang="C">int sceDebugPrintfForDriver(const char *fmt, ...);</source>
=== sceDebugPrintf2ForDriver ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x02B04343
|}
<source lang="C">int sceDebugPrintf2ForDriver(int msg_type_flag, kernel_message_ctx *msg_ctx, const char *fmt, ...);</source>
=== print_kernel_panic ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x391B5B74
|}
<source lang="C">int print_kernel_panic(kernel_message_ctx *msg_ctx, void *some_address);</source>
=== printf_kernel_panic ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x00CCE39C
|}
<source lang="C">int printf_kernel_panic(kernel_message_ctx *msg_ctx, void *some_address, const char* fmt, ...);</source>
=== print_kernel_assertion ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x35A35322
|}
<source lang="C">int print_kernel_assertion(int condition, kernel_message_ctx *msg_ctx, void *some_address);</source>
=== printf_kernel_assertion ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x821A2D59
|}
<source lang="C">int printf_kernel_assertion(int unk, int condition, kernel_message_ctx *msg_ctx, int some_address, const char *fmt, ...);</source>
=== invoke_some_callback ===
{| class="wikitable"
! Version !! World !! NID
|-
| 3.60 || non-secure || 0x411C0733
|}
Uses sceKernelCpuLockSuspendIntrStoreLRForDriver and sceKernelCpuLockResumeIntrStoreLRForDriver.
Calls SceSysclibForDriver_E38E7605.
Maybe invoke debug handler.
<source lang="C">int invoke_some_callback(char *format, va_list ap);</source>
== SceSysmemForTZS ==
=== sceKernelAllocMemBlockForPidForTZS ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || Secure || 0x0028E26C
|}
<source lang="c">int sceKernelAllocMemBlockForPidForTZS(SceUID pid, const char *name, SceKernelMemBlockType type, SceSize size, SceKernelAllocMemBlockKernelOpt *optp);</source>
== SceSysrootForTZS ==
=== sceSysrootGetSysrootBufferForTZS ===
{| class="wikitable"
|-
! Version !! World !! NID
|-
| 1.69 || secure || 0x29C1049E
|}
Returns pointer to [[Sysroot]] buffer.
<source lang="C">void *sceSysrootGetSysrootBufferForTZS(void);</source>
[[Category:Modules]]
[[Category:Kernel]]

Revision as of 22:50, 28 August 2018

SceSysmemForKernel

sceKernelRxMemcpyKernelToUserForPidForKernel

Version World NID
1.69 non-secure 0x30931572
3.60 non-secure 0x30931572

Unrestricted memcpy to the virtual address space for process pid. Both dst and src must be in the address space of pid but src must also be accessible in the address space of the caller. This is normally used for resolving stubs in module loads. Same as write to RO but does a cache flush.

int sceKernelRxMemcpyKernelToUserForPidForKernel(SceUID pid, uintptr_t dst, const void *src, size_t len);

sceKernelFindClassByNameForKernel

Version World NID
3.60 Non-secure 0x62989905
int sceKernelFindClassByNameForKernel(const char *name, SceClass **class);

sceKernelGetMemBlockTypeForKernel

Version World NID
3.60 Non-secure 0x289BE3EC
/***
 * Gets the memory block type of a memory block
 *
 * @param[in] uid - SceUID of the memory block
 * @param[out] type - Type of the memory block identified by uid
 *
 * @return 0 on success, < 0 on error.
*/
int sceKernelGetMemBlockTypeForKernel(SceUID uid, unsigned int *type);

sceKernelCreateUidObjForKernel

Version World NID
3.60 Non-secure 0xDF0288D7
SceUID sceKernelCreateUidObjForKernel(SceClass *class, const char *name, SceCreateUidObjOpt *opt, SceObjectBase **obj);

sceKernelGetUidHeapClassForKernel

Version World NID
3.60 Non-secure 0x4CCA935D
SceClass *sceKernelGetUidHeapClassForKernel(void);

sceKernelGetUidMemBlockClassForKernel

Version World NID
3.60 Non-secure 0xAF729575
SceClass *sceKernelGetUidMemBlockClassForKernel(void);

sceKernelGetUidDLinkClassForKernel

Version World NID
3.60 Non-secure 0xC105604E
SceClass *sceKernelGetUidDLinkClassForKernel(void);