vitasdk
Documentation of the vitasdk

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSysrootForDriver_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (0x41C, SceUIDSysrootObject)
 
 VITASDK_BUILD_ASSERT_EQ (0xC, SceKernelSysrootSelfInfo)
 
SceSysrootksceSysrootGetSysroot (void)
 Get sysroot object pointer. More...
 
void ksceKernelSysrootSetSysroot (SceUID sysroot_uid)
 Set sysroot object uid. More...
 
void * ksceKernelSysrootGetKblParam (void)
 Get SceKblParam. More...
 
int ksceKernelSysrootGetProcessTitleId (SceUID pid, char *titleid, SceSize len)
 
int ksceSysrootGetSelfInfo (SceKernelSysrootSelfIndex index, SceKernelSysrootSelfInfo *info)
 
int ksceSysrootUseExternalStorage (void)
 Get UseExternalStorage status. More...
 
int ksceSysrootUseInternalStorage (void)
 Get UseInternalStorage status. More...
 
int ksceSysrootIsManufacturingMode (void)
 Get ManufacturingMode status. More...
 
int ksceSysrootIsNonRemovableCardMode (void)
 Get NonRemovableCardMode status. More...
 
 VITASDK_BUILD_ASSERT_EQ (0x28, SceSysrootProcessHandler)
 
int ksceKernelSysrootSetProcessHandler (const SceSysrootProcessHandler *handlers)
 Set handlers for the process lifecycle. More...
 
 VITASDK_BUILD_ASSERT_EQ (0x5C, SceSysrootDbgpHandler)
 
int ksceKernelSysrootRegisterDbgpHandler (const SceSysrootDbgpHandler *handlers)
 Register Dbgp handlers. More...
 
void ksceKernelSysrootUnregisterDbgpHandler (void)
 Unregister Dbgp handlers. More...
 
int ksceSysrootGetHardwareFlags (void *flags)
 Get hardware flags. More...
 
int ksceSysrootIsBsodReboot (void)
 
int ksceSysrootIsSafeMode (void)
 
int ksceSysrootIsUpdateMode (void)
 
int ksceSysrootIsUsbEnumWakeup (void)
 
int ksceSysrootIsExternalBootMode (void)
 
void ksceKernelSysrootSetGetSystemSwVersionFunc (SceKernelGetSystemSwVersionFunc func)
 Set GetSystemSwVersion function. More...
 
int ksceKernelSysrootGetSystemSwVersion (void)
 Get System software version from ksceKernelSysrootSetGetSystemSwVersionFunc setting function. More...
 
SceUID ksceKernelSysrootGetShellPid (void)
 Get SceShell process id. More...
 
void ksceKernelSysrootRegisterCoredumpTrigger (SceKernelCoredumpTriggerFunc func)
 Register coredump trigger function. More...
 

Typedefs

typedef struct SceKernelBootArgs SceKernelBootArgs
 
typedef struct SceSysrootModulemgrHandlers SceSysrootModulemgrHandlers
 
typedef struct SceSysrootForKernel_D29BCA77_struct SceSysrootForKernel_D29BCA77_struct
 
typedef struct SceSysrootForDriver_733C243E_struct SceSysrootForDriver_733C243E_struct
 
typedef SceUIDSysrootObject SceSysroot
 
typedef int(* SceKernelGetSystemSwVersionFunc) (void)
 
typedef int(* SceKernelCoredumpTriggerFunc) (SceUID pid, SceKernelCoredumpStateUpdateCallback update_func, SceKernelCoredumpStateFinishCallback finish_func, SceCoredumpTriggerParam *param)
 

Macros

#define SCE_SYSROOT_INIT_CALLBACK_MAX_FUNC   (9)
 
#define SCE_SYSROOT_INIT_CALLBACK_MAX_SLOT   (8)
 
#define ksceKernelGetSysrootBuffer()   ksceKernelSysrootGetKblParam()
 
#define ksceKernelGetProcessTitleId(pid, titleid, len)   ksceKernelSysrootGetProcessTitleId(pid, titleid, len)
 

Data Structure Documentation

◆ SceUIDSysrootObject

struct SceUIDSysrootObject

Data Fields

void * object
 
SceClasssce_class
 
SceSize size
 
SceUInt32 magic1
 
int cpu_intr
 
SceSize boot_alloc_memory_size
 
void * boot_alloc_memory
 
int unk_0x1C
 
void * unk_0x20
 
SceUInt32 boot_flags
 
SceUInt32 status
 
SceCorelockContext corelock_context
 
int unk_0x34
 
int unk_0x38
 
void * unk_0x3C
 
void * unk_0x40
 
void * unk_0x44
 
void * unk_0x48
 
void * unk_0x4C
 
void * unk_0x50
 
int unk_0x54
 
void * unk_0x58
 
int unk_0x5C
 
int unk_0x60
 
int unk_0x64
 
int unk_0x68
 
SceKblParamkbl_param
 
SceKernelBootArgsboot_args
 
SceUInt32 soc_revision
 
SceUInt32 unk_0x78
 
SceUInt32 soc_revision2
 
SceUInt32 model_info
 
SceUInt32 model_capability
 
void * longtime5base
 
int cpu_intr_for_init_callback
 
SceUInt32 init_callback_registable_base_number
 
struct {
int(* callback )(int a1, void *args)
 
void * args
 
init_callback_slot [SCE_SYSROOT_INIT_CALLBACK_MAX_FUNC][SCE_SYSROOT_INIT_CALLBACK_MAX_SLOT]
 
int(* funcThreadMgrStartAfterProcess )(void)
 
int(* funcIofilemgrStart )(void)
 
void * unk_0x2DC
 
void * unk_0x2E0
 
char * sysroot_names [9]
 
SceUID this_object_uid
 
void * unk_0x30C
 
void * unk_0x310
 
void * unk_0x314
 
void * VBAR
 
void * MVBAR
 
void * unk_0x320
 
void ** unk_func_0x324
 
SceUID(* funcGetThreadId )(void)
 
int(* funcThreadFunction3 )(void)
 
SceUID(* funcGetProcessId )(void)
 
int(* funcThreadFunction4 )(void)
 
int(* funcThreadFunction5 )(void)
 
int(* funcThreadFunction6 )(void)
 
void(* funcThreadFunction7 )(void)
 
int(* funcThreadFunction8 )(void)
 
int(* funcThreadFunction9 )(int a1, int a2, int a3)
 
int(* funcThreadFunction10 )(int a1)
 
SceSysrootModulemgrHandlersmodulemgr_handlers
 
int unk_0x354
 
SceSysrootForKernel_D29BCA77_structprocessmgr_callbacks1
 
SceSysrootForDriver_733C243E_structprocessmgr_callbacks2
 
void * unk_func_0x360
 
int(* funcGetBusError )(void *dst, uint32_t len)
 
int(* funcAppMgrFunction1 )(int a1, int a2, int a3, int a4, int a5, int a6)
 
SceUID(* funcGetShellPid )(void)
 
void * unk_func_0x370
 
void * unk_func_0x374
 
void * unk_func_0x378
 
int unk_0x37C
 
void * unk_func_0x380
 
int(* unk_func_0x384 )(void)
 
int(* unk_func_0x388 )(void)
 
void * unk_func_0x38C
 
void * unk_func_0x390
 
int(* funcHasNpTestFlag )(void)
 
void * unk_func_0x398
 
int(* funcLedSetMode )(int led, int mode, void *led_configuration)
 
SceKernelVARangecached_sm_info_ranges
 
int(* funcGetFunctionNameByNID )(SceNID funcnid, const char **name)
 
void * unk_0x3A8
 
void * unk_0x3AC
 
void * unk_struct_0x3B0
 
void * unk_0x3B4
 
void * unk_0x3B8
 
void * unk_0x3BC
 
void * unk_0x3C0
 
SceSysrootProcessHandlerprocess_handler
 
SceSysrootDbgpHandlerdbgp_handler
 
void * unk_func_0x3CC
 
void * unk_func_0x3D0
 
void * unk_func_0x3D4
 
void * unk_func_0x3D8
 
void * unk_func_0x3DC
 
void * unk_func_0x3E0
 
int(* funcAppMgrFunction3 )(int a1, int a2)
 
int(* funcAppMgrFunction4 )(int a1, int a2)
 
int(* funcAppMgrFunction5 )(int a1)
 
void * unk_func_0x3F0
 
void * unk_struct_0x3F4
 
void * unk_struct_0x3F8
 
void * unk_struct_0x3FC
 
void * unk_data_0x400
 
void * unk_func_0x404
 
void * unk_func_0x408
 
void * unk_func_0x40C
 
void * unk_func_0x410
 
void * unk_func_0x414
 
SceUInt32 magic2
 

◆ SceKernelSysrootSelfInfo

struct SceKernelSysrootSelfInfo
Data Fields
SceSize size
void * self_data
SceSize self_size

◆ SceSysrootProcessHandler

struct SceSysrootProcessHandler

Data Fields

SceSize size
 sizeof(SceSysrootProcessHandler) More...
 
void(* unk_4 )(SceUID pid, SceUID modid, int flags, uint64_t time)
 process start shared modules More...
 
void(* exit )(SceUID pid, int flags, uint64_t time)
 
void(* kill )(SceUID pid)
 by SceShell More...
 
void(* unk_10 )(SceUID pid, SceUID modid, uint64_t time)
 
void(* unk_14 )(SceUID pid, SceUID modid, uint64_t time)
 
void(* unk_18 )(SceUID pid, SceUID modid, uint64_t time)
 
int(* on_process_created )(int a1, int a2, int a3)
 called when process is created More...
 
void(* unk_20 )(SceUID pid, SceUID modid, uint64_t time)
 
void(* unk_24 )(SceUID pid, SceUID modid, int flags, uint64_t time)
 

◆ SceSysrootDbgpHandler

struct SceSysrootDbgpHandler

Data Fields

SceSize size
 sizeof(SceSysrootDbgpHandler):0x5C More...
 
void(* unk_0x04 )(int a1, int a2, int a3, int a4)
 
void(* unk_0x08 )(int a1, int a2, int a3, int a4)
 
void(* unk_0x0C )(int a1)
 
void(* unk_0x10 )(int a1, int a2, int a3, int a4)
 
void(* unk_0x14 )(int a1, int a2, int a3, int a4)
 
void(* unk_0x18 )(SceUID pid, SceUID modid, int flags, uint64_t time)
 
void(* unk_0x1C )(int a1, int a2, int a3)
 
void(* unk_0x20 )(int a1, int a2, int a3)
 
void(* unk_0x24 )(int a1, int a2, int a3)
 
void(* unk_0x28 )(SceUID pid, SceUID modid, uint64_t time)
 
void(* unk_0x2C )(SceUID pid, SceUID modid, uint64_t time)
 
int(* unk_0x30 )(SceUID pid)
 
int(* unk_0x34 )(int a1, int a2, int a3)
 
int(* unk_0x38 )(int a1, int a2, void *a3)
 
int(* unk_0x3C )(int a1, int a2, int a3)
 
int(* unk_0x40 )(SceUID pid, int *some_flag)
 
int(* unk_0x44 )(SceUID pid, SceUID modid, int flags, uint64_t time)
 
int(* unk_0x48 )(int a1, int a2, int a3)
 
void(* unk_0x4C )(void)
 
void(* unk_0x50 )(void)
 
int(* unk_0x54 )(int a1, int a2, int a3, int a4, int a5)
 
int(* unk_0x58 )(int a1, int a2, int a3)
 

◆ SceUIDSysrootObject.init_callback_slot

struct SceUIDSysrootObject.init_callback_slot

Data Fields

int(* callback )(int a1, void *args)
 
void * args
 

Field Documentation

◆ callback

◆ args

Macro Definition Documentation

◆ SCE_SYSROOT_INIT_CALLBACK_MAX_FUNC

#define SCE_SYSROOT_INIT_CALLBACK_MAX_FUNC   (9)

◆ SCE_SYSROOT_INIT_CALLBACK_MAX_SLOT

#define SCE_SYSROOT_INIT_CALLBACK_MAX_SLOT   (8)

◆ ksceKernelGetSysrootBuffer

#define ksceKernelGetSysrootBuffer ( )    ksceKernelSysrootGetKblParam()

◆ ksceKernelGetProcessTitleId

#define ksceKernelGetProcessTitleId (   pid,
  titleid,
  len 
)    ksceKernelSysrootGetProcessTitleId(pid, titleid, len)

Typedef Documentation

◆ SceKernelBootArgs

◆ SceSysrootModulemgrHandlers

◆ SceSysrootForKernel_D29BCA77_struct

◆ SceSysrootForDriver_733C243E_struct

◆ SceSysroot

◆ SceKernelGetSystemSwVersionFunc

typedef int(* SceKernelGetSystemSwVersionFunc) (void)

◆ SceKernelCoredumpTriggerFunc

typedef int(* SceKernelCoredumpTriggerFunc) (SceUID pid, SceKernelCoredumpStateUpdateCallback update_func, SceKernelCoredumpStateFinishCallback finish_func, SceCoredumpTriggerParam *param)

Enumeration Type Documentation

◆ SceKernelSysrootSelfIndex

Enumerator
SCE_KERNEL_SYSROOT_SELF_INDEX_GCAUTHMGR_SM 
SCE_KERNEL_SYSROOT_SELF_INDEX_RMAUTH_SM 
SCE_KERNEL_SYSROOT_SELF_INDEX_ENCDEC_W_PORTABILITY_SM 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/4]

VITASDK_BUILD_ASSERT_EQ ( 0x41C  ,
SceUIDSysrootObject   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/4]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceKernelSysrootSelfInfo   
)

◆ ksceSysrootGetSysroot()

SceSysroot* ksceSysrootGetSysroot ( void  )

Get sysroot object pointer.

Returns
sysroot object pointer.

◆ ksceKernelSysrootSetSysroot()

void ksceKernelSysrootSetSysroot ( SceUID  sysroot_uid)

Set sysroot object uid.

Returns
none.

note - Not should be call this function after boot.

◆ ksceKernelSysrootGetKblParam()

void* ksceKernelSysrootGetKblParam ( void  )

Get SceKblParam.

Returns
The pointer of SceKblParam data or NULL.

◆ ksceKernelSysrootGetProcessTitleId()

int ksceKernelSysrootGetProcessTitleId ( SceUID  pid,
char *  titleid,
SceSize  len 
)

◆ ksceSysrootGetSelfInfo()

int ksceSysrootGetSelfInfo ( SceKernelSysrootSelfIndex  index,
SceKernelSysrootSelfInfo info 
)

◆ ksceSysrootUseExternalStorage()

int ksceSysrootUseExternalStorage ( void  )

Get UseExternalStorage status.

Returns 1 if an external device(sdcard) is available.

Returns
0 or 1.

◆ ksceSysrootUseInternalStorage()

int ksceSysrootUseInternalStorage ( void  )

Get UseInternalStorage status.

Returns 1 if using an internal device(pre-memcard).

Returns
0 or 1.

◆ ksceSysrootIsManufacturingMode()

int ksceSysrootIsManufacturingMode ( void  )

Get ManufacturingMode status.

Returns 1 if the device is in manufacturing mode.

Returns
0 or 1.

◆ ksceSysrootIsNonRemovableCardMode()

int ksceSysrootIsNonRemovableCardMode ( void  )

Get NonRemovableCardMode status.

Returns 1 if using an non removable card(pre-memcard).

Returns
0 or 1.

◆ VITASDK_BUILD_ASSERT_EQ() [3/4]

VITASDK_BUILD_ASSERT_EQ ( 0x28  ,
SceSysrootProcessHandler   
)

◆ ksceKernelSysrootSetProcessHandler()

int ksceKernelSysrootSetProcessHandler ( const SceSysrootProcessHandler handlers)

Set handlers for the process lifecycle.

This internal function allows a developer to introspect and receive events based on the process lifecycle.

Parameters
[in]handlersPointer to struct containing the handlers. This function does not copy the handlers, so this pointer must remain valid after a successful call.
Returns
0 on success, < 0 on error.

◆ VITASDK_BUILD_ASSERT_EQ() [4/4]

VITASDK_BUILD_ASSERT_EQ ( 0x5C  ,
SceSysrootDbgpHandler   
)

◆ ksceKernelSysrootRegisterDbgpHandler()

int ksceKernelSysrootRegisterDbgpHandler ( const SceSysrootDbgpHandler handlers)

Register Dbgp handlers.

Parameters
[in]handlerspointer of handlers
Returns
0 on success, < 0 on error.

◆ ksceKernelSysrootUnregisterDbgpHandler()

void ksceKernelSysrootUnregisterDbgpHandler ( void  )

Unregister Dbgp handlers.

Returns
none.

◆ ksceSysrootGetHardwareFlags()

int ksceSysrootGetHardwareFlags ( void *  flags)

Get hardware flags.

Parameters
[out]flags- The flags output buffer. size is 0x10 byte
Returns
always 0.

◆ ksceSysrootIsBsodReboot()

int ksceSysrootIsBsodReboot ( void  )

◆ ksceSysrootIsSafeMode()

int ksceSysrootIsSafeMode ( void  )

◆ ksceSysrootIsUpdateMode()

int ksceSysrootIsUpdateMode ( void  )

◆ ksceSysrootIsUsbEnumWakeup()

int ksceSysrootIsUsbEnumWakeup ( void  )

◆ ksceSysrootIsExternalBootMode()

int ksceSysrootIsExternalBootMode ( void  )

◆ ksceKernelSysrootSetGetSystemSwVersionFunc()

void ksceKernelSysrootSetGetSystemSwVersionFunc ( SceKernelGetSystemSwVersionFunc  func)

Set GetSystemSwVersion function.

Parameters
[in]func- The GetSystemSwVersion function pointer.
Returns
none.

◆ ksceKernelSysrootGetSystemSwVersion()

int ksceKernelSysrootGetSystemSwVersion ( void  )

Get System software version from ksceKernelSysrootSetGetSystemSwVersionFunc setting function.

Returns
SystemSwVersion on success, < 0 on error.

◆ ksceKernelSysrootGetShellPid()

SceUID ksceKernelSysrootGetShellPid ( void  )

Get SceShell process id.

Returns
pid on success, < 0 on error.

◆ ksceKernelSysrootRegisterCoredumpTrigger()

void ksceKernelSysrootRegisterCoredumpTrigger ( SceKernelCoredumpTriggerFunc  func)

Register coredump trigger function.

Parameters
[in]func- The coredump trigger function pointer.
Returns
none.