Difference between revisions of "SceLibKernel"

From Vita Development Wiki
Jump to navigation Jump to search
(10 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
! Version !! Name !! World !! Privilege !! NID
 
! Version !! Name !! World !! Privilege !! NID
 
|-
 
|-
| 1.69 || SceLibKernel || Non-secure || User || 0xC9FDFAA
+
| 1.69 || SceLibKernel || Non-secure || User || 0x0C9FDFAA
 +
|-
 +
| 3.15 || SceLibKernel || Non-secure || User || 0xFAA8A463
 +
|-
 +
| 3.18 || SceLibKernel || Non-secure || User || 0x4280FEB2
 +
|-
 +
| 3.51 || SceLibKernel || Non-secure || User || 0x4342F830
 
|}
 
|}
  
Line 66: Line 72:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x9739a5e2
+
| 3.60 || 0x9739A5E2
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoChstatAsync</code>
  
 
=== sceIoChstat ===
 
=== sceIoChstat ===
Line 74: Line 82:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x29482f7f
+
| 3.60 || 0x29482F7F
 
|}
 
|}
  
Line 82: Line 90:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x6e903ab2
+
| 3.60 || 0x6E903AB2
 
|}
 
|}
  
Line 90: Line 98:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xf5c6f098
+
| 3.60 || 0xF5C6F098
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>sceIoClose</code>
  
 
=== sceIoDevctlAsync ===
 
=== sceIoDevctlAsync ===
Line 98: Line 108:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x950f78eb
+
| 3.60 || 0x950F78EB
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoDevctlAsync</code>
  
 
=== sceIoDevctl ===
 
=== sceIoDevctl ===
Line 106: Line 118:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x04b30cb2
+
| 3.60 || 0x04B30CB2
 
|}
 
|}
  
Line 114: Line 126:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xa9283dd0
+
| 3.60 || 0xA9283DD0
 
|}
 
|}
  
Line 122: Line 134:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x9c8b6624
+
| 3.60 || 0x9C8B6624
 
|}
 
|}
  
Line 130: Line 142:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x57f8cd25
+
| 3.60 || 0x57F8CD25
 
|}
 
|}
  
Line 138: Line 150:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x82b20b41
+
| 3.60 || 0x82B20B41
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoGetstatAsync</code>
  
 
=== sceIoGetstat ===
 
=== sceIoGetstat ===
Line 146: Line 160:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xbca5b623
+
| 3.60 || 0xBCA5B623
 
|}
 
|}
  
Line 154: Line 168:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x099c54b9
+
| 3.60 || 0x099C54B9
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoIoctlAsync</code>
  
 
=== sceIoIoctl ===
 
=== sceIoIoctl ===
Line 162: Line 178:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x54abacfa
+
| 3.60 || 0x54ABACFA
 
|}
 
|}
  
Line 170: Line 186:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xcac5d672
+
| 3.60 || 0xCAC5D672
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoLseekAsync</code>
  
 
=== sceIoLseek ===
 
=== sceIoLseek ===
Line 178: Line 196:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x99ba173e
+
| 3.60 || 0x99BA173E
 
|}
 
|}
  
Line 186: Line 204:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x8e5fcbb1
+
| 3.60 || 0x8E5FCBB1
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoMkdirAsync</code>
  
 
=== sceIoMkdir ===
 
=== sceIoMkdir ===
Line 194: Line 214:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x9670d39f
+
| 3.60 || 0x9670D39F
 
|}
 
|}
  
Line 202: Line 222:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x6a7ea9fd
+
| 3.60 || 0x6A7EA9FD
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoOpenAsync</code>
  
 
=== sceIoOpen ===
 
=== sceIoOpen ===
Line 210: Line 232:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x6c60ac61
+
| 3.60 || 0x6C60AC61
 
|}
 
|}
  
Line 218: Line 240:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xa010141e
+
| 3.60 || 0xA010141E
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoPreadAsync</code>
  
 
=== sceIoPread ===
 
=== sceIoPread ===
Line 226: Line 250:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x52315ad7
+
| 3.60 || 0x52315AD7
 
|}
 
|}
  
Line 234: Line 258:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xed25beef
+
| 3.60 || 0xED25BEEF
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoPwriteAsync</code>
  
 
=== sceIoPwrite ===
 
=== sceIoPwrite ===
Line 242: Line 268:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x8ffff5a8
+
| 3.60 || 0x8FFFF5A8
 
|}
 
|}
  
Line 250: Line 276:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x713523e1
+
| 3.60 || 0x713523E1
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>sceIoRead</code>
  
 
=== sceIoRemoveAsync ===
 
=== sceIoRemoveAsync ===
Line 258: Line 286:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x446a60ac
+
| 3.60 || 0x446A60AC
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoRemoveAsync</code>
  
 
=== sceIoRemove ===
 
=== sceIoRemove ===
Line 266: Line 296:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xe20ed0f3
+
| 3.60 || 0xE20ED0F3
 
|}
 
|}
  
Line 274: Line 304:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xee9857cd
+
| 3.60 || 0xEE9857CD
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoRenameAsync</code>
  
 
=== sceIoRename ===
 
=== sceIoRename ===
Line 282: Line 314:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xf737e369
+
| 3.60 || 0xF737E369
 
|}
 
|}
  
Line 290: Line 322:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x9694d00f
+
| 3.60 || 0x9694D00F
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoRmdirAsync</code>
  
 
=== sceIoRmdir ===
 
=== sceIoRmdir ===
Line 298: Line 332:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xe9f91ec8
+
| 3.60 || 0xE9F91EC8
 
|}
 
|}
  
Line 306: Line 340:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xf7c7fbfe
+
| 3.60 || 0xF7C7FBFE
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoSyncAsync</code>
  
 
=== sceIoSync ===
 
=== sceIoSync ===
Line 314: Line 350:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x98aced6d
+
| 3.60 || 0x98ACED6D
 
|}
 
|}
  
Line 322: Line 358:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0x11fed231
+
| 3.60 || 0x11FED231
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>sceIoWrite</code>
  
 
=== sceIoCompleteMultiple ===
 
=== sceIoCompleteMultiple ===
Line 330: Line 368:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 3.60 || 0xa792c404
+
| 3.60 || 0xA792C404
 
|}
 
|}
 +
 +
derived from <code>SceIofilemgr</code> <code>_sceIoCompleteMultiple</code>
 +
 +
=== sceKernelRegisterThreadEventHandler ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x6D8C0F13
 +
|}
 +
 +
<source lang="C">
 +
int sceKernelRegisterThreadEventHandler(char *name, SceUID uid, int num0, void *handler, int num1);
 +
</source>
  
 
=== Heap ===
 
=== Heap ===
 
The latest version of [http://g.oswego.edu/dl/html/malloc.html dlmalloc] is included in SceLibKernel. Most of the assert checks and security are included.
 
The latest version of [http://g.oswego.edu/dl/html/malloc.html dlmalloc] is included in SceLibKernel. Most of the assert checks and security are included.
 +
 +
=== Thread specific data ===
 +
Each thread owns a private 2048bytes memory region with specific data. The end of this region is pointed by the TPIDRURO register (thus, the start of it is TPIDRURO - 0x800).
 +
 +
{| class="wikitable"
 +
|-
 +
! Offset !! Size !! Description
 +
|-
 +
| 0x000 || 4 || ??
 +
|-
 +
| 0x004 || 4 || Thread ID
 +
|-
 +
| 0x008 || 4 || Stack start address
 +
|-
 +
| 0x00C || 4 || Stack end address
 +
|-
 +
| 0x010 || 4 || Current VFP exception
 +
|-
 +
| 0x014 || 4 || LwMutex related
 +
|-
 +
| 0x020 || 4 || Current priority
 +
|-
 +
| 0x024 || 4 || CPU affinity mask
 +
|}
 +
  
 
[[Category:Modules]]
 
[[Category:Modules]]
 
[[Category:Userland]]
 
[[Category:Userland]]

Revision as of 21:19, 12 December 2018

SceLibKernel, not to be confused with Kernel is a user module that implements wrappers to some common syscalls (for example, SceIofilemgr), some user standard library functions (including C standard library), and other common features like heap management. This module is the functionally similar to libc.so.6 on Linux.

Module

This is a user module and exists only in userland. The SELF can be found in os0:us/libkernel.suprx.

Known NIDs

Version Name World Privilege NID
1.69 SceLibKernel Non-secure User 0x0C9FDFAA
3.15 SceLibKernel Non-secure User 0xFAA8A463
3.18 SceLibKernel Non-secure User 0x4280FEB2
3.51 SceLibKernel Non-secure User 0x4342F830

Libraries

Known NIDs

Version Name World Privilege NID
1.69 SceLibKernel Non-secure User 0xCAE9ACE6
1.69 SceLibRng Non-secure User 0xF9AC7CF8
1.69 SceLibGcc Non-secure User 0x567AF9A6
1.69 SceLibSsp Non-secure User 0x8FA98EF1
1.69 SceRtabi Non-secure User 0xA941943F
1.69 SceKernelForVM Non-secure User 0xA2B3EA8F

SceLibKernel

sceIoChstatAsync

Version NID
3.60 0x9739A5E2

derived from SceIofilemgr _sceIoChstatAsync

sceIoChstat

Version NID
3.60 0x29482F7F

sceIoChstatByFd

Version NID
3.60 0x6E903AB2

sceIoClose

Version NID
3.60 0xF5C6F098

derived from SceIofilemgr sceIoClose

sceIoDevctlAsync

Version NID
3.60 0x950F78EB

derived from SceIofilemgr _sceIoDevctlAsync

sceIoDevctl

Version NID
3.60 0x04B30CB2

sceIoDopen

Version NID
3.60 0xA9283DD0

sceIoDread

Version NID
3.60 0x9C8B6624

sceIoGetstatByFd

Version NID
3.60 0x57F8CD25

sceIoGetstatAsync

Version NID
3.60 0x82B20B41

derived from SceIofilemgr _sceIoGetstatAsync

sceIoGetstat

Version NID
3.60 0xBCA5B623

sceIoIoctlAsync

Version NID
3.60 0x099C54B9

derived from SceIofilemgr _sceIoIoctlAsync

sceIoIoctl

Version NID
3.60 0x54ABACFA

sceIoLseekAsync

Version NID
3.60 0xCAC5D672

derived from SceIofilemgr _sceIoLseekAsync

sceIoLseek

Version NID
3.60 0x99BA173E

sceIoMkdirAsync

Version NID
3.60 0x8E5FCBB1

derived from SceIofilemgr _sceIoMkdirAsync

sceIoMkdir

Version NID
3.60 0x9670D39F

sceIoOpenAsync

Version NID
3.60 0x6A7EA9FD

derived from SceIofilemgr _sceIoOpenAsync

sceIoOpen

Version NID
3.60 0x6C60AC61

sceIoPreadAsync

Version NID
3.60 0xA010141E

derived from SceIofilemgr _sceIoPreadAsync

sceIoPread

Version NID
3.60 0x52315AD7

sceIoPwriteAsync

Version NID
3.60 0xED25BEEF

derived from SceIofilemgr _sceIoPwriteAsync

sceIoPwrite

Version NID
3.60 0x8FFFF5A8

sceIoRead

Version NID
3.60 0x713523E1

derived from SceIofilemgr sceIoRead

sceIoRemoveAsync

Version NID
3.60 0x446A60AC

derived from SceIofilemgr _sceIoRemoveAsync

sceIoRemove

Version NID
3.60 0xE20ED0F3

sceIoRenameAsync

Version NID
3.60 0xEE9857CD

derived from SceIofilemgr _sceIoRenameAsync

sceIoRename

Version NID
3.60 0xF737E369

sceIoRmdirAsync

Version NID
3.60 0x9694D00F

derived from SceIofilemgr _sceIoRmdirAsync

sceIoRmdir

Version NID
3.60 0xE9F91EC8

sceIoSyncAsync

Version NID
3.60 0xF7C7FBFE

derived from SceIofilemgr _sceIoSyncAsync

sceIoSync

Version NID
3.60 0x98ACED6D

sceIoWrite

Version NID
3.60 0x11FED231

derived from SceIofilemgr sceIoWrite

sceIoCompleteMultiple

Version NID
3.60 0xA792C404

derived from SceIofilemgr _sceIoCompleteMultiple

sceKernelRegisterThreadEventHandler

Version NID
3.60 0x6D8C0F13
int sceKernelRegisterThreadEventHandler(char *name, SceUID uid, int num0, void *handler, int num1);

Heap

The latest version of dlmalloc is included in SceLibKernel. Most of the assert checks and security are included.

Thread specific data

Each thread owns a private 2048bytes memory region with specific data. The end of this region is pointed by the TPIDRURO register (thus, the start of it is TPIDRURO - 0x800).

Offset Size Description
0x000 4 ??
0x004 4 Thread ID
0x008 4 Stack start address
0x00C 4 Stack end address
0x010 4 Current VFP exception
0x014 4 LwMutex related
0x020 4 Current priority
0x024 4 CPU affinity mask