vitasdk
Documentation of the vitasdk

Exports for Kernel. More...

Data Structures

struct  SceKernelStartModuleOpt
 
struct  SceKernelStopModuleOpt
 
struct  SceKernelSegmentInfo
 
struct  SceKernelModuleInfo
 Information about a loaded module. More...
 
struct  SceKernelLMOption
 
struct  SceKernelULMOption
 
struct  SceKernelSystemSwVersion
 
struct  SceKernelModuleLibraryInfo
 
struct  SceKernelModuleName
 
struct  SceKernelSegmentInfo2
 
struct  SceKernelModuleListInfo
 
struct  SceKernelModuleExportEntry
 
struct  SceKernelModuleImportNonlinkedInfo
 
struct  SceSelfAppInfo
 
struct  SceLoadProcessParam
 
struct  SceKernelFunctionShimInfo
 
struct  SceKernelLibraryShimInfo
 
struct  SceKernelCompatibilityShimInfo
 
union  SceKernelModuleLibraryInfo.__unnamed14__
 
union  SceKernelModuleLibraryInfo.__unnamed16__
 
union  SceKernelSegmentInfo2.__unnamed37__
 
union  SceKernelModuleListInfo.__unnamed39__
 
struct  SceKernelModuleListInfo.__unnamed39__.__unnamed43__
 
union  SceKernelModuleListInfo.__unnamed41__
 
struct  SceKernelModuleListInfo.__unnamed41__.seg1
 
struct  SceKernelModuleListInfo.__unnamed41__.seg2
 
struct  SceKernelModuleListInfo.__unnamed41__.seg3
 
struct  SceKernelModuleListInfo.__unnamed41__.seg4
 

Macros

#define SCE_KERNEL_START_SUCCESS   (0)
 Return values for plugins module_start and module_stop
 
#define SCE_KERNEL_START_RESIDENT   SCE_KERNEL_START_SUCCESS
 
#define SCE_KERNEL_START_NO_RESIDENT   (1)
 
#define SCE_KERNEL_START_FAILED   (2)
 
#define SCE_KERNEL_STOP_SUCCESS   (0)
 
#define SCE_KERNEL_STOP_FAIL   (1)
 
#define SCE_KERNEL_STOP_CANCEL   SCE_KERNEL_STOP_FAIL
 
#define SCE_MODULE_ATTR_NONE   (0x0000)
 
#define SCE_KERNEL_MODULE_ATTR_NONE   SCE_MODULE_ATTR_NONE
 
#define ksceKernelGetModuleInternal   ksceKernelGetModuleCB
 
#define ksceKernelGetProcessMainModule   ksceKernelGetModuleIdByPid
 

Typedefs

typedef SceKernelSystemSwVersion SceKernelFwInfo
 

Enumerations

enum  SceKernelModuleState { SCE_KERNEL_MODULE_STATE_READY = 0x00000002 , SCE_KERNEL_MODULE_STATE_STARTED = 0x00000006 , SCE_KERNEL_MODULE_STATE_ENDED = 0x00000009 }
 
enum  SceKernelPreloadInhibit {
  SCE_KERNEL_PRELOAD_INHIBIT_NONE = 0x00000000 , SCE_KERNEL_PRELOAD_INHIBIT_LIBC = 0x10000 , SCE_KERNEL_PRELOAD_INHIBIT_LIBDBG = 0x20000 , SCE_KERNEL_PRELOAD_INHIBIT_LIBSHELLSVC = 0x80000 ,
  SCE_KERNEL_PRELOAD_INHIBIT_LIBCDLG = 0x100000 , SCE_KERNEL_PRELOAD_INHIBIT_LIBFIOS2 = 0x200000 , SCE_KERNEL_PRELOAD_INHIBIT_APPUTIL = 0x400000 , SCE_KERNEL_PRELOAD_INHIBIT_LIBSCEFT2 = 0x800000 ,
  SCE_KERNEL_PRELOAD_INHIBIT_LIBPVF = 0x1000000 , SCE_KERNEL_PRELOAD_INHIBIT_LIBPERF = 0x2000000
}
 

Functions

 VITASDK_BUILD_ASSERT_EQ (4, SceKernelPreloadInhibit)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceKernelStartModuleOpt)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceKernelStopModuleOpt)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceKernelSegmentInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x1B8, SceKernelModuleInfo)
 
 VITASDK_BUILD_ASSERT_EQ (4, SceKernelLMOption)
 
 VITASDK_BUILD_ASSERT_EQ (4, SceKernelULMOption)
 
 VITASDK_BUILD_ASSERT_EQ (0x28, SceKernelSystemSwVersion)
 
 VITASDK_BUILD_ASSERT_EQ (0x120, SceKernelModuleLibraryInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x1C, SceKernelModuleName)
 
 VITASDK_BUILD_ASSERT_EQ (0x14, SceKernelSegmentInfo2)
 
 VITASDK_BUILD_ASSERT_EQ (0xB0, SceKernelModuleListInfo)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceKernelModuleExportEntry)
 
 VITASDK_BUILD_ASSERT_EQ (0x124, SceKernelModuleImportNonlinkedInfo)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceSelfAppInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x7C, SceLoadProcessParam)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceKernelFunctionShimInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceKernelLibraryShimInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceKernelCompatibilityShimInfo)
 
void ksceKernelRegisterSyscall (SceSize syscall_id, const void *func)
 Register syscall function.
 
void ksceKernelRegisterModulesAfterBoot (void)
 Setup kernel for modulemgr.
 
int ksceKernelGetModuleList (SceUID pid, int flags1, int flags2, SceUID *modids, SceSize *num)
 Get module id list.
 
int ksceKernelGetModuleInfoForDebugger (SceUID pid, SceKernelModuleListInfo *infolists, SceSize *num)
 
int ksceKernelGetModuleInfo (SceUID pid, SceUID modid, SceKernelModuleInfo *info)
 Get module info.
 
int ksceKernelGetModuleInfoMinByAddr (SceUID pid, const void *module_addr, uint32_t *module_nid, const void **program_text_addr, SceKernelModuleName *module_name)
 Get module info mini by module address.
 
int ksceKernelGetModuleCB (SceUID modid, void **info)
 Get module info (internal)
 
int ksceKernelGetModuleCBByAddr (SceUID pid, const void *module_addr, void **info)
 Get module info by address (internal)
 
SceUID ksceKernelGetModuleIdByAddrForDebugger (SceUID pid, const void *module_addr)
 Get module id by module address.
 
SceUID ksceKernelSearchModuleByName (const char *module_name)
 search kernel module by module name
 
int ksceKernelGetSystemSwVersion (SceKernelFwInfo *data)
 Get fw info.
 
SceUID ksceKernelLoadModule (const char *path, int flags, SceKernelLMOption *option)
 load module (kernel only)
 
int ksceKernelStartModule (SceUID modid, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
 start module (kernel only)
 
SceUID ksceKernelLoadStartModule (const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
 load and start module (kernel only)
 
int ksceKernelStopModule (SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
 stop module (kernel only)
 
int ksceKernelUnloadModule (SceUID modid, int flags, SceKernelULMOption *option)
 unload module (kernel only)
 
int ksceKernelStopUnloadModule (SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
 stop and unload module (kernel only)
 
SceUID ksceKernelLoadModuleForPid (SceUID pid, const char *path, int flags, SceKernelLMOption *option)
 load module
 
int ksceKernelStartModuleForPid (SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
 start module
 
SceUID ksceKernelLoadStartModuleForPid (SceUID pid, const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
 load and start module
 
int ksceKernelStopModuleForPid (SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
 stop module
 
int ksceKernelUnloadModuleForPid (SceUID pid, SceUID modid, int flags, SceKernelULMOption *option)
 unload module
 
int ksceKernelStopUnloadModuleForPid (SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
 stop and unload module
 
SceUID ksceKernelLoadStartSharedModuleForPid (SceUID pid, const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
 load and start module as shared module
 
int ksceKernelStopUnloadSharedModuleForPid (SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
 stop and unload module as shared module
 
int ksceKernelMountBootfs (const char *bootImagePath)
 mount bootfs (load bootfs module)
 
int ksceKernelUmountBootfs (void)
 unmount bootfs (unload bootfs module)
 
SceUID ksceKernelGetModuleIdByPid (SceUID pid)
 Get the main module id for a given process.
 
int ksceKernelGetModulePath (SceUID modid, char *path, SceSize pathlen)
 Get the module path.
 
int ksceKernelGetLibraryInfoForDebugger (SceUID pid, SceUID library_id, SceKernelModuleLibraryInfo *info)
 Get library info.
 
void ksceKernelFinalizeKbl (void)
 
int ksceKernelGetExportedLibraryListInModule (SceUID pid, SceUID modid, SceUID *library_ids, SceSize *num)
 
int ksceKernelGetImportedLibraryListInModule (SceUID pid, SceUID modid, SceUID *library_ids, SceSize *num)
 
int ksceKernelGetLibEntCBListForSyslibtrace (void **ppList, SceSize *num)
 
int ksceKernelGetLibraryList (SceUID pid, SceUID *library_ids, SceSize *num)
 
int ksceKernelGetLibraryClientList (SceUID pid, SceUID library_id, SceUID *modids, SceSize *num, SceSize cpy_skip_num)
 
int ksceKernelGetLibraryDBFlags (SceUID pid, int *pFlags)
 
int ksceKernelGetLibraryExportInfoForDebugger (SceUID pid, SceUID library_id, SceKernelModuleExportEntry *list, SceSize *num, SceSize cpy_skip_num)
 
int ksceKernelGetLostLibraryInfo (SceUID pid, SceUID modid, SceNID libnid, SceKernelModuleImportNonlinkedInfo *info)
 
int ksceKernelGetLostLibraryList (SceUID pid, void *a2, SceSize *num)
 
int ksceKernelGetLostLibraryListInModule (SceUID pid, SceUID modid, void *pList, SceSize *num)
 
int ksceKernelGetMetaDataForDebugger (SceUID pid, SceUID uModuleId, void **start, void **stop)
 
void * ksceKernelGetModuleEntryPoint (SceUID modid)
 
int ksceKernelGetModuleFingerprint (SceUID moduleId, SceUInt32 *pFingerprint)
 
int ksceKernelGetModuleIsSharedByAddr (SceUID pid, void *addr)
 
int ksceKernelGetProgramIdentificationInfo (const char *path, SceUInt64 *pAuthid, SceSelfAppInfo *pInfo)
 
int ksceKernelGetStubInfoForDebugger (SceUID pid, SceUID stubid, void *a3)
 
int ksceKernelGetStubList (SceUID pid, SceUID *stub, SceSize *num)
 
int ksceKernelGetStubNidTableForDebugger (SceUID pid, SceUID stubid, void *a3, SceSize *num, SceSize cpy_skip_num)
 
int ksceKernelLoadPreloadingModules (SceUID pid, const SceLoadProcessParam *pParam, int flags)
 
SceUID ksceKernelLoadProcessImage (SceUID pid, const char *path, int flags, SceSelfAuthInfo *auth_info, SceLoadProcessParam *param, SceKernelCompatibilityShimInfo *shim_info)
 
int ksceKernelLoadPtLoadSegForFwloader (const char *path, int e_phnum, void *buffer, SceSize bufsize, int zero_unk, SceSize *bytes_read)
 
int ksceKernelModuleUnloadMySelf (void)
 
int ksceKernelStartPreloadingModules (SceUID pid)
 
int ksceKernelUnloadProcessModules (SceUID pid)
 
int ksceKernelGetModuleInfoByAddr (const void *module_addr, SceKernelModuleInfo *info)
 Gets information about the loaded kernel module containing an address.
 
int ksceKernelRegisterLibary (const void *libent)
 Registers an export library from a loaded kernel module.
 
int ksceKernelReleaseLibary (const void *libent)
 Unregisters an export library from a loaded kernel module and relinks modules whose imports are affected.
 

Variables

SceSize SceKernelStartModuleOpt::size
 Size of this structure.
 
SceUInt32 SceKernelStartModuleOpt::reserved [3]
 Copied from user memory but unused on FW 3.60; initialize to 0.
 
SceSize SceKernelStopModuleOpt::size
 Size of this structure.
 
SceUInt32 SceKernelStopModuleOpt::reserved [3]
 Copied from user memory but unused on FW 3.60; initialize to 0.
 
SceSize SceKernelSegmentInfo::size
 Size of this structure.
 
SceUInt SceKernelSegmentInfo::perms
 Access-permission byte combined with a loader metadata byte shifted left by 20 on FW 3.60.
 
void * SceKernelSegmentInfo::vaddr
 Segment virtual address.
 
SceSize SceKernelSegmentInfo::memsz
 Segment size in memory.
 
SceSize SceKernelSegmentInfo::filesz
 Segment size in the module file.
 
SceUInt SceKernelSegmentInfo::res
 unused
 
SceSize SceKernelModuleInfo::size
 Size of this structure; left unchanged by the FW 3.60 kernel APIs.
 
SceUID SceKernelModuleInfo::modid
 Module identifier.
 
uint16_t SceKernelModuleInfo::modattr
 Module attributes.
 
uint8_t SceKernelModuleInfo::modver [2]
 Module version.
 
char SceKernelModuleInfo::module_name [28]
 Module name; zero the structure first to ensure NUL termination.
 
SceUInt SceKernelModuleInfo::unk28
 
void * SceKernelModuleInfo::start_entry
 Module start entry point.
 
void * SceKernelModuleInfo::stop_entry
 Module stop entry point.
 
void * SceKernelModuleInfo::exit_entry
 Module exit entry point.
 
void * SceKernelModuleInfo::exidx_top
 Start of the ARM exception index table.
 
void * SceKernelModuleInfo::exidx_btm
 End of the ARM exception index table.
 
void * SceKernelModuleInfo::extab_top
 Start of the ARM exception table.
 
void * SceKernelModuleInfo::extab_btm
 End of the ARM exception table.
 
void * SceKernelModuleInfo::tlsInit
 TLS initialization image.
 
SceSize SceKernelModuleInfo::tlsInitSize
 Size of the TLS initialization image.
 
SceSize SceKernelModuleInfo::tlsAreaSize
 Total TLS area size.
 
char SceKernelModuleInfo::path [256]
 Module path.
 
SceKernelSegmentInfo SceKernelModuleInfo::segments [4]
 Information for up to four mapped segments.
 
SceUInt SceKernelModuleInfo::state
 One of SceKernelModuleState.
 
SceSize SceKernelLMOption::size
 
SceSize SceKernelULMOption::size
 
SceSize SceKernelSystemSwVersion::size
 
char SceKernelSystemSwVersion::versionString [0x1C]
 
SceUInt SceKernelSystemSwVersion::version
 
SceUInt SceKernelSystemSwVersion::unk_24
 
SceSize SceKernelModuleLibraryInfo::size
 sizeof(SceKernelModuleLibraryInfo) : 0x120
 
SceUID SceKernelModuleLibraryInfo::library_id
 
uint32_t SceKernelModuleLibraryInfo::libnid
 
uint16_t SceKernelModuleLibraryInfo::version
 
uint16_t SceKernelModuleLibraryInfo::flags
 
uint16_t SceKernelModuleLibraryInfo::entry_num_function
 
uint16_t SceKernelModuleLibraryInfo::entry_num_variable
 
uint16_t SceKernelModuleLibraryInfo::unk_0x14
 
uint16_t SceKernelModuleLibraryInfo::unk_0x16
 
char SceKernelModuleLibraryInfo::library_name [0x100]
 
SceSize SceKernelModuleLibraryInfo::client_count
 Number of modules importing this library.
 
SceSize SceKernelModuleLibraryInfo::number_of_imported
 Legacy name for client_count.
 
union { 
 
SceSize client_count
 Number of modules importing this library.
 
SceSize number_of_imported
 Legacy name for client_count.
 
};  
 
SceUID SceKernelModuleLibraryInfo::owner_module_id
 ID of the module that owns the library.
 
SceUID SceKernelModuleLibraryInfo::modid2
 Legacy name for owner_module_id.
 
union { 
 
SceUID owner_module_id
 ID of the module that owns the library.
 
SceUID modid2
 Legacy name for owner_module_id.
 
};  
 
char SceKernelModuleName::s [0x1C]
 
SceSize SceKernelSegmentInfo2::size
 sizeof(SceKernelSegmentInfo2) (0x14)
 
int SceKernelSegmentInfo2::perm
 
void * SceKernelSegmentInfo2::vaddr
 
uint32_t SceKernelSegmentInfo2::memsz
 
SceSize SceKernelSegmentInfo2::alignment
 Power-of-two segment alignment.
 
int SceKernelSegmentInfo2::unk_10
 Legacy name for alignment.
 
union { 
 
SceSize alignment
 Power-of-two segment alignment.
 
int unk_10
 Legacy name for alignment.
 
};  
 
SceSize SceKernelModuleListInfo::size
 
SceUID SceKernelModuleListInfo::modid
 
uint32_t SceKernelModuleListInfo::version
 
uint32_t SceKernelModuleListInfo::module_version
 
uint32_t SceKernelModuleListInfo::unk10
 Legacy field containing the packed module type and flags.
 
uint8_t SceKernelModuleListInfo::module_type
 
uint8_t SceKernelModuleListInfo::reserved_0x11
 
uint16_t SceKernelModuleListInfo::module_flags
 
struct { 
 
uint8_t module_type
 
uint8_t reserved_0x11
 
uint16_t module_flags
 
}  
 
union { 
 
uint32_t unk10
 Legacy field containing the packed module type and flags.
 
   struct { 
 
uint8_t module_type
 
uint8_t reserved_0x11
 
uint16_t module_flags
 
   }  
 
};  
 
void * SceKernelModuleListInfo::unk14
 
uint32_t SceKernelModuleListInfo::unk18
 
void * SceKernelModuleListInfo::unk1C
 
void * SceKernelModuleListInfo::unk20
 
char SceKernelModuleListInfo::module_name [28]
 
uint32_t SceKernelModuleListInfo::unk40
 
uint32_t SceKernelModuleListInfo::unk44
 
uint32_t SceKernelModuleListInfo::nid
 
SceSize SceKernelModuleListInfo::segments_num
 
SceKernelSegmentInfo2 SceKernelModuleListInfo::SegmentInfo [1]
 
uint32_t SceKernelModuleListInfo::addr [4]
 
struct { 
 
SceKernelSegmentInfo2 SegmentInfo [1]
 
uint32_t addr [4]
 
} SceKernelModuleListInfo::seg1 
 
SceKernelSegmentInfo2 SceKernelModuleListInfo::SegmentInfo [2]
 
uint32_t SceKernelModuleListInfo::addr [4]
 
struct { 
 
SceKernelSegmentInfo2 SegmentInfo [2]
 
uint32_t addr [4]
 
} SceKernelModuleListInfo::seg2 
 
SceKernelSegmentInfo2 SceKernelModuleListInfo::SegmentInfo [3]
 
uint32_t SceKernelModuleListInfo::addr [4]
 
struct { 
 
SceKernelSegmentInfo2 SegmentInfo [3]
 
uint32_t addr [4]
 
} SceKernelModuleListInfo::seg3 
 
SceKernelSegmentInfo2 SceKernelModuleListInfo::SegmentInfo [4]
 
uint32_t SceKernelModuleListInfo::addr [4]
 
struct { 
 
SceKernelSegmentInfo2 SegmentInfo [4]
 
uint32_t addr [4]
 
} SceKernelModuleListInfo::seg4 
 
union { 
 
   struct { 
 
SceKernelSegmentInfo2 SegmentInfo [1]
 
uint32_t addr [4]
 
   } seg1 
 
   struct { 
 
SceKernelSegmentInfo2 SegmentInfo [2]
 
uint32_t addr [4]
 
   } seg2 
 
   struct { 
 
SceKernelSegmentInfo2 SegmentInfo [3]
 
uint32_t addr [4]
 
   } seg3 
 
   struct { 
 
SceKernelSegmentInfo2 SegmentInfo [4]
 
uint32_t addr [4]
 
   } seg4 
 
};  
 
SceNID SceKernelModuleExportEntry::libnid
 
void * SceKernelModuleExportEntry::entry
 
SceSize SceKernelModuleImportNonlinkedInfo::size
 
SceUID SceKernelModuleImportNonlinkedInfo::modid
 
SceNID SceKernelModuleImportNonlinkedInfo::libnid
 
char SceKernelModuleImportNonlinkedInfo::libname [0x100]
 
int SceKernelModuleImportNonlinkedInfo::data_0x10C
 
int SceKernelModuleImportNonlinkedInfo::data_0x110
 
int SceKernelModuleImportNonlinkedInfo::data_0x114
 
int SceKernelModuleImportNonlinkedInfo::data_0x118
 
int SceKernelModuleImportNonlinkedInfo::data_0x11C
 
int SceKernelModuleImportNonlinkedInfo::data_0x120
 
int SceSelfAppInfo::vendor_id
 
int SceSelfAppInfo::self_type
 
SceUInt32 SceLoadProcessParam::sysver
 
char SceLoadProcessParam::thread_name [0x20]
 
SceUInt32 SceLoadProcessParam::initial_thread_priority
 
SceSize SceLoadProcessParam::initial_thread_stack_size
 
SceUInt32 SceLoadProcessParam::unk_0x2C
 
SceUInt32 SceLoadProcessParam::unk_0x30
 
SceKernelThreadOptParam SceLoadProcessParam::threadOptParam
 
int SceLoadProcessParam::unk_0x50
 
char SceLoadProcessParam::process_name [0x20]
 
SceUInt32 SceLoadProcessParam::preload_disabled
 
void * SceLoadProcessParam::module_proc_param
 
SceNID SceKernelFunctionShimInfo::replaced_function_nid
 NID of the function that needs to be replaced.
 
SceNID SceKernelFunctionShimInfo::replacing_function_nid
 NID of the function that will serve as a replacement - must probably come from same library as replaced function.
 
const char * SceKernelLibraryShimInfo::library_name
 Name of the library the shimmed functions come from (i.e.
 
SceUInt32 SceKernelLibraryShimInfo::unk_04
 Always 0 ?
 
SceUInt32 SceKernelLibraryShimInfo::function_shims_count
 Size of the array pointed to by next field.
 
SceKernelFunctionShimInfo * SceKernelLibraryShimInfo::function_shims
 
const char * SceKernelCompatibilityShimInfo::title_id
 TitleID (process name) of the app this shim applies to.
 
SceUInt32 SceKernelCompatibilityShimInfo::unk_04
 Always 0 ?
 
SceUInt32 SceKernelCompatibilityShimInfo::library_shims_count
 Size of the array pointed to by next field.
 
SceKernelLibraryShimInfo * SceKernelCompatibilityShimInfo::library_shims
 

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceModulemgrForKernel_stub SceModulemgrForDriver_stub




Data Structure Documentation

◆ SceKernelStartModuleOpt

struct SceKernelStartModuleOpt
Data Fields
SceSize size Size of this structure.
SceUInt32 reserved[3] Copied from user memory but unused on FW 3.60; initialize to 0.

◆ SceKernelStopModuleOpt

struct SceKernelStopModuleOpt
Data Fields
SceSize size Size of this structure.
SceUInt32 reserved[3] Copied from user memory but unused on FW 3.60; initialize to 0.

◆ SceKernelSegmentInfo

struct SceKernelSegmentInfo
Data Fields
SceSize size Size of this structure.
SceUInt perms Access-permission byte combined with a loader metadata byte shifted left by 20 on FW 3.60.
void * vaddr Segment virtual address.
SceSize memsz Segment size in memory.
SceSize filesz Segment size in the module file.
SceUInt res unused

◆ SceKernelModuleInfo

struct SceKernelModuleInfo

Information about a loaded module.

The FW 3.60 kernel APIs use this fixed 0x1B8-byte layout, but do not clear the output buffer or write every reserved byte. Before calling these kernel APIs, zero the entire structure and initialize size. The user function sceKernelGetModuleInfo does this internally.

Data Fields
SceSize size Size of this structure; left unchanged by the FW 3.60 kernel APIs.
SceUID modid Module identifier.
uint16_t modattr Module attributes.
uint8_t modver[2] Module version.
char module_name[28] Module name; zero the structure first to ensure NUL termination.
SceUInt unk28
void * start_entry Module start entry point.
void * stop_entry Module stop entry point.
void * exit_entry Module exit entry point.
void * exidx_top Start of the ARM exception index table.
void * exidx_btm End of the ARM exception index table.
void * extab_top Start of the ARM exception table.
void * extab_btm End of the ARM exception table.
void * tlsInit TLS initialization image.
SceSize tlsInitSize Size of the TLS initialization image.
SceSize tlsAreaSize Total TLS area size.
char path[256] Module path.
SceKernelSegmentInfo segments[4] Information for up to four mapped segments.
SceUInt state One of SceKernelModuleState.

◆ SceKernelLMOption

struct SceKernelLMOption
Data Fields
SceSize size

◆ SceKernelULMOption

struct SceKernelULMOption
Data Fields
SceSize size

◆ SceKernelSystemSwVersion

struct SceKernelSystemSwVersion
Data Fields
SceSize size
char versionString[0x1C]
SceUInt version
SceUInt unk_24

◆ SceKernelModuleLibraryInfo

struct SceKernelModuleLibraryInfo
Data Fields
SceSize size sizeof(SceKernelModuleLibraryInfo) : 0x120
SceUID library_id
uint32_t libnid
uint16_t version
uint16_t flags
uint16_t entry_num_function
uint16_t entry_num_variable
uint16_t unk_0x14
uint16_t unk_0x16
char library_name[0x100]
union SceKernelModuleLibraryInfo.__unnamed14__ __unnamed__
union SceKernelModuleLibraryInfo.__unnamed16__ __unnamed__

◆ SceKernelModuleName

struct SceKernelModuleName
Data Fields
char s[0x1C]

◆ SceKernelSegmentInfo2

struct SceKernelSegmentInfo2
Data Fields
SceSize size sizeof(SceKernelSegmentInfo2) (0x14)
int perm
void * vaddr
uint32_t memsz
union SceKernelSegmentInfo2.__unnamed37__ __unnamed__

◆ SceKernelModuleListInfo

struct SceKernelModuleListInfo
Data Fields
SceSize size
SceUID modid
uint32_t version
uint32_t module_version
union SceKernelModuleListInfo.__unnamed39__ __unnamed__
void * unk14
uint32_t unk18
void * unk1C
void * unk20
char module_name[28]
uint32_t unk40
uint32_t unk44
uint32_t nid
SceSize segments_num
union SceKernelModuleListInfo.__unnamed41__ __unnamed__

◆ SceKernelModuleExportEntry

struct SceKernelModuleExportEntry
Data Fields
SceNID libnid
void * entry

◆ SceKernelModuleImportNonlinkedInfo

struct SceKernelModuleImportNonlinkedInfo
Data Fields
SceSize size
SceUID modid
SceNID libnid
char libname[0x100]
int data_0x10C
int data_0x110
int data_0x114
int data_0x118
int data_0x11C
int data_0x120

◆ SceSelfAppInfo

struct SceSelfAppInfo
Data Fields
int vendor_id
int self_type

◆ SceLoadProcessParam

struct SceLoadProcessParam
Data Fields
SceUInt32 sysver
char thread_name[0x20]
SceUInt32 initial_thread_priority
SceSize initial_thread_stack_size
SceUInt32 unk_0x2C
SceUInt32 unk_0x30
SceKernelThreadOptParam threadOptParam
int unk_0x50
char process_name[0x20]
SceUInt32 preload_disabled
void * module_proc_param

◆ SceKernelFunctionShimInfo

struct SceKernelFunctionShimInfo
Data Fields
SceNID replaced_function_nid NID of the function that needs to be replaced.
SceNID replacing_function_nid NID of the function that will serve as a replacement - must probably come from same library as replaced function.

◆ SceKernelLibraryShimInfo

struct SceKernelLibraryShimInfo
Data Fields
const char * library_name Name of the library the shimmed functions come from (i.e.

SceThreadmgr)

SceUInt32 unk_04 Always 0 ?
SceUInt32 function_shims_count Size of the array pointed to by next field.
SceKernelFunctionShimInfo * function_shims

◆ SceKernelCompatibilityShimInfo

struct SceKernelCompatibilityShimInfo
Data Fields
const char * title_id TitleID (process name) of the app this shim applies to.
SceUInt32 unk_04 Always 0 ?
SceUInt32 library_shims_count Size of the array pointed to by next field.
SceKernelLibraryShimInfo * library_shims

◆ SceKernelModuleLibraryInfo.__unnamed14__

union SceKernelModuleLibraryInfo.__unnamed14__
Data Fields
SceSize client_count Number of modules importing this library.
SceSize number_of_imported Legacy name for client_count.

◆ SceKernelModuleLibraryInfo.__unnamed16__

union SceKernelModuleLibraryInfo.__unnamed16__
Data Fields
SceUID owner_module_id ID of the module that owns the library.
SceUID modid2 Legacy name for owner_module_id.

◆ SceKernelSegmentInfo2.__unnamed37__

union SceKernelSegmentInfo2.__unnamed37__
Data Fields
SceSize alignment Power-of-two segment alignment.
int unk_10 Legacy name for alignment.

◆ SceKernelModuleListInfo.__unnamed39__

union SceKernelModuleListInfo.__unnamed39__
Data Fields
uint32_t unk10 Legacy field containing the packed module type and flags.
struct SceKernelModuleListInfo.__unnamed39__.__unnamed43__ __unnamed__

◆ SceKernelModuleListInfo.__unnamed39__.__unnamed43__

struct SceKernelModuleListInfo.__unnamed39__.__unnamed43__
Data Fields
uint8_t module_type
uint8_t reserved_0x11
uint16_t module_flags

◆ SceKernelModuleListInfo.__unnamed41__

◆ SceKernelModuleListInfo.__unnamed41__.seg1

struct SceKernelModuleListInfo.__unnamed41__.seg1
Data Fields
SceKernelSegmentInfo2 SegmentInfo[1]
uint32_t addr[4]

◆ SceKernelModuleListInfo.__unnamed41__.seg2

struct SceKernelModuleListInfo.__unnamed41__.seg2
Data Fields
SceKernelSegmentInfo2 SegmentInfo[2]
uint32_t addr[4]

◆ SceKernelModuleListInfo.__unnamed41__.seg3

struct SceKernelModuleListInfo.__unnamed41__.seg3
Data Fields
SceKernelSegmentInfo2 SegmentInfo[3]
uint32_t addr[4]

◆ SceKernelModuleListInfo.__unnamed41__.seg4

struct SceKernelModuleListInfo.__unnamed41__.seg4
Data Fields
SceKernelSegmentInfo2 SegmentInfo[4]
uint32_t addr[4]

Macro Definition Documentation

◆ SCE_KERNEL_START_SUCCESS

#define SCE_KERNEL_START_SUCCESS   (0)

Return values for plugins module_start and module_stop

◆ SCE_KERNEL_START_RESIDENT

#define SCE_KERNEL_START_RESIDENT   SCE_KERNEL_START_SUCCESS

◆ SCE_KERNEL_START_NO_RESIDENT

#define SCE_KERNEL_START_NO_RESIDENT   (1)

◆ SCE_KERNEL_START_FAILED

#define SCE_KERNEL_START_FAILED   (2)

◆ SCE_KERNEL_STOP_SUCCESS

#define SCE_KERNEL_STOP_SUCCESS   (0)

◆ SCE_KERNEL_STOP_FAIL

#define SCE_KERNEL_STOP_FAIL   (1)

◆ SCE_KERNEL_STOP_CANCEL

#define SCE_KERNEL_STOP_CANCEL   SCE_KERNEL_STOP_FAIL

◆ SCE_MODULE_ATTR_NONE

#define SCE_MODULE_ATTR_NONE   (0x0000)

◆ SCE_KERNEL_MODULE_ATTR_NONE

#define SCE_KERNEL_MODULE_ATTR_NONE   SCE_MODULE_ATTR_NONE

◆ ksceKernelGetModuleInternal

#define ksceKernelGetModuleInternal   ksceKernelGetModuleCB

◆ ksceKernelGetProcessMainModule

#define ksceKernelGetProcessMainModule   ksceKernelGetModuleIdByPid

Typedef Documentation

◆ SceKernelFwInfo

Enumeration Type Documentation

◆ SceKernelModuleState

Enumerator
SCE_KERNEL_MODULE_STATE_READY 
SCE_KERNEL_MODULE_STATE_STARTED 
SCE_KERNEL_MODULE_STATE_ENDED 

◆ SceKernelPreloadInhibit

Enumerator
SCE_KERNEL_PRELOAD_INHIBIT_NONE 
SCE_KERNEL_PRELOAD_INHIBIT_LIBC 
SCE_KERNEL_PRELOAD_INHIBIT_LIBDBG 
SCE_KERNEL_PRELOAD_INHIBIT_LIBSHELLSVC 
SCE_KERNEL_PRELOAD_INHIBIT_LIBCDLG 
SCE_KERNEL_PRELOAD_INHIBIT_LIBFIOS2 
SCE_KERNEL_PRELOAD_INHIBIT_APPUTIL 
SCE_KERNEL_PRELOAD_INHIBIT_LIBSCEFT2 
SCE_KERNEL_PRELOAD_INHIBIT_LIBPVF 
SCE_KERNEL_PRELOAD_INHIBIT_LIBPERF 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/19]

VITASDK_BUILD_ASSERT_EQ ( 4  ,
SceKernelPreloadInhibit   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/19]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceKernelStartModuleOpt   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/19]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceKernelStopModuleOpt   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/19]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceKernelSegmentInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/19]

VITASDK_BUILD_ASSERT_EQ ( 0x1B8  ,
SceKernelModuleInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/19]

VITASDK_BUILD_ASSERT_EQ ( 4  ,
SceKernelLMOption   
)

◆ VITASDK_BUILD_ASSERT_EQ() [7/19]

VITASDK_BUILD_ASSERT_EQ ( 4  ,
SceKernelULMOption   
)

◆ VITASDK_BUILD_ASSERT_EQ() [8/19]

VITASDK_BUILD_ASSERT_EQ ( 0x28  ,
SceKernelSystemSwVersion   
)

◆ VITASDK_BUILD_ASSERT_EQ() [9/19]

VITASDK_BUILD_ASSERT_EQ ( 0x120  ,
SceKernelModuleLibraryInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [10/19]

VITASDK_BUILD_ASSERT_EQ ( 0x1C  ,
SceKernelModuleName   
)

◆ VITASDK_BUILD_ASSERT_EQ() [11/19]

VITASDK_BUILD_ASSERT_EQ ( 0x14  ,
SceKernelSegmentInfo2   
)

◆ VITASDK_BUILD_ASSERT_EQ() [12/19]

VITASDK_BUILD_ASSERT_EQ ( 0xB0  ,
SceKernelModuleListInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [13/19]

VITASDK_BUILD_ASSERT_EQ ( 8  ,
SceKernelModuleExportEntry   
)

◆ VITASDK_BUILD_ASSERT_EQ() [14/19]

VITASDK_BUILD_ASSERT_EQ ( 0x124  ,
SceKernelModuleImportNonlinkedInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [15/19]

VITASDK_BUILD_ASSERT_EQ ( 8  ,
SceSelfAppInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [16/19]

VITASDK_BUILD_ASSERT_EQ ( 0x7C  ,
SceLoadProcessParam   
)

◆ VITASDK_BUILD_ASSERT_EQ() [17/19]

VITASDK_BUILD_ASSERT_EQ ( 8  ,
SceKernelFunctionShimInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [18/19]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceKernelLibraryShimInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [19/19]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceKernelCompatibilityShimInfo   
)

◆ ksceKernelRegisterSyscall()

void ksceKernelRegisterSyscall ( SceSize  syscall_id,
const void *  func 
)

Register syscall function.

Parameters
[in]syscall_id- register syscall id (Must be less than 0x1000)
[in]func- syscall function
Returns
none

◆ ksceKernelRegisterModulesAfterBoot()

void ksceKernelRegisterModulesAfterBoot ( void  )

Setup kernel for modulemgr.

Note
- allocate and initialize syscall table
Returns
none

◆ ksceKernelGetModuleList()

int ksceKernelGetModuleList ( SceUID  pid,
int  flags1,
int  flags2,
SceUID *  modids,
SceSize *  num 
)

Get module id list.

Parameters
[in]pid- target pid
[in]flags1- unknown, use 0x7FFFFFFF
[in]flags2- unknown, use 1
[out]modids- info output pointer
[in,out]num- in:list max num, out:get modid num
Returns
0 on success, < 0 on error.

◆ ksceKernelGetModuleInfoForDebugger()

int ksceKernelGetModuleInfoForDebugger ( SceUID  pid,
SceKernelModuleListInfo *  infolists,
SceSize *  num 
)
Example1: Get max to 10 kernel module info
size_t num = 10;// Get max
uint32_t offset = 0;
SceKernelModuleListInfo *info = &infolists[0];
ksceKernelGetModuleInfoForDebugger(0x10005, infolists, &num);
for(int i=0;i<num;i++){
printf("name : %s\n", info->module_name);
if(info->segments_num == 1){
printf("vaddr:0x%08X\n", info->seg1.SegmentInfo[0].vaddr);
}else if(info->segments_num == 2){
printf("vaddr:0x%08X\n", info->seg2.SegmentInfo[0].vaddr);
}
info = ((char *)info) + info->size;
}
SceSize size
Definition modulemgr.h:36
char module_name[28]
Definition modulemgr.h:52
int ksceKernelGetModuleInfoForDebugger(SceUID pid, SceKernelModuleListInfo *infolists, SceSize *num)
SceSize segments_num
Definition modulemgr.h:56
Definition modulemgr.h:35
Parameters
[in]pid- target pid
[out]infolists- infolists output
[in,out]num- Specify the maximum number of modinfolist to retrieve. If the function returns 0, it returns the number of modules loaded in the target pid in num
Returns
0 on success, < 0 on error.

◆ ksceKernelGetModuleInfo()

int ksceKernelGetModuleInfo ( SceUID  pid,
SceUID  modid,
SceKernelModuleInfo *  info 
)

Get module info.

Parameters
[in]pid- target pid
[in]modid- target module id
[out]info- info output pointer
Returns
0 on success, < 0 on error.

◆ ksceKernelGetModuleInfoMinByAddr()

int ksceKernelGetModuleInfoMinByAddr ( SceUID  pid,
const void *  module_addr,
uint32_t *  module_nid,
const void **  program_text_addr,
SceKernelModuleName *  module_name 
)

Get module info mini by module address.

Parameters
[in]pid- target pid
[in]module_addr- target module address, Also possible with data segment address
[out]module_nid- can also set NULL, module nid output
[out]program_text_addr- can also set NULL, program text addr output
[out]module_name- can also set NULL, module name output
Returns
0 on success, < 0 on error.

◆ ksceKernelGetModuleCB()

int ksceKernelGetModuleCB ( SceUID  modid,
void **  info 
)

Get module info (internal)

Parameters
[in]modid- target module id
[out]info- module_info output pointer
Returns
0 on success, < 0 on error.

◆ ksceKernelGetModuleCBByAddr()

int ksceKernelGetModuleCBByAddr ( SceUID  pid,
const void *  module_addr,
void **  info 
)

Get module info by address (internal)

Parameters
[in]pid- target process id
[in]module_addr- target module address
[out]info- module_info output pointer
Returns
0 on success, < 0 on error.

◆ ksceKernelGetModuleIdByAddrForDebugger()

SceUID ksceKernelGetModuleIdByAddrForDebugger ( SceUID  pid,
const void *  module_addr 
)

Get module id by module address.

Parameters
[in]pid- target pid
[in]module_addr- target module address
Returns
modid on success, < 0 on error.

◆ ksceKernelSearchModuleByName()

SceUID ksceKernelSearchModuleByName ( const char *  module_name)

search kernel module by module name

Parameters
[in]module_name- target module name
Returns
modid on success, < 0 on error.

◆ ksceKernelGetSystemSwVersion()

int ksceKernelGetSystemSwVersion ( SceKernelFwInfo *  data)

Get fw info.

Parameters
[out]data- fw info output pointer
Returns
0 on success, < 0 on error.

◆ ksceKernelLoadModule()

SceUID ksceKernelLoadModule ( const char *  path,
int  flags,
SceKernelLMOption *  option 
)

load module (kernel only)

Parameters
[in]path- module path
[in]flags- unknown, set zero
[in]option- unknown
Returns
modid on success, < 0 on error.

◆ ksceKernelStartModule()

int ksceKernelStartModule ( SceUID  modid,
SceSize  args,
void *  argp,
int  flags,
SceKernelLMOption *  option,
int *  status 
)

start module (kernel only)

Parameters
[in]modid- target module id
[in]args- module start args
[in]argp- module start argp
[in]flags- must be 0
[in]option- Optional 0x10-byte start-module options.
[out]status- module_start res, SCE_KERNEL_START_SUCCESS etc...
Returns
0 on success, < 0 on error.

◆ ksceKernelLoadStartModule()

SceUID ksceKernelLoadStartModule ( const char *  path,
SceSize  args,
void *  argp,
int  flags,
SceKernelLMOption *  option,
int *  status 
)

load and start module (kernel only)

Parameters
[in]path- module path
[in]args- module start args
[in]argp- module start argp
[in]flags- unknown, set zero
[in]option- unknown
[out]status- module_start res, SCE_KERNEL_START_SUCCESS etc...
Returns
modid on success, < 0 on error.

◆ ksceKernelStopModule()

int ksceKernelStopModule ( SceUID  modid,
SceSize  args,
void *  argp,
int  flags,
SceKernelULMOption *  option,
int *  status 
)

stop module (kernel only)

Parameters
[in]modid- target module id
[in]args- module stop args
[in]argp- module stop argp
[in]flags- unknown, set zero
[in]option- Optional 0x10-byte stop-module options.
[out]status- module_stop res, SCE_KERNEL_STOP_SUCCESS etc...
Returns
0 on success, < 0 on error.

◆ ksceKernelUnloadModule()

int ksceKernelUnloadModule ( SceUID  modid,
int  flags,
SceKernelULMOption *  option 
)

unload module (kernel only)

Parameters
[in]modid- target module id
[in]flags- unknown, set zero
[in]option- unknown
Returns
0 on success, < 0 on error.

◆ ksceKernelStopUnloadModule()

int ksceKernelStopUnloadModule ( SceUID  modid,
SceSize  args,
void *  argp,
int  flags,
SceKernelULMOption *  option,
int *  status 
)

stop and unload module (kernel only)

Parameters
[in]modid- target module id
[in]args- module stop args
[in]argp- module stop argp
[in]flags- unknown, set zero
[in]option- unknown
[out]status- module_stop res, SCE_KERNEL_STOP_SUCCESS etc...
Returns
0 on success, < 0 on error.

◆ ksceKernelLoadModuleForPid()

SceUID ksceKernelLoadModuleForPid ( SceUID  pid,
const char *  path,
int  flags,
SceKernelLMOption *  option 
)

load module

Parameters
[in]pid- target pid
[in]path- module path
[in]flags- unknown, set zero
[in]option- unknown
Returns
modid on success, < 0 on error.

◆ ksceKernelStartModuleForPid()

int ksceKernelStartModuleForPid ( SceUID  pid,
SceUID  modid,
SceSize  args,
void *  argp,
int  flags,
SceKernelLMOption *  option,
int *  status 
)

start module

Parameters
[in]pid- target pid
[in]modid- target module id
[in]args- module start args
[in]argp- module start argp
[in]flags- unknown, set zero
[in]option- Optional 0x10-byte start-module options.
[out]status- module_start res, SCE_KERNEL_START_SUCCESS etc...
Returns
0 on success, < 0 on error.

◆ ksceKernelLoadStartModuleForPid()

SceUID ksceKernelLoadStartModuleForPid ( SceUID  pid,
const char *  path,
SceSize  args,
void *  argp,
int  flags,
SceKernelLMOption *  option,
int *  status 
)

load and start module

Parameters
[in]pid- target pid
[in]path- module path
[in]args- module start args
[in]argp- module start argp
[in]flags- unknown, set zero
[in]option- unknown
[out]status- module_start res, SCE_KERNEL_START_SUCCESS etc...
Returns
modid on success, < 0 on error.

◆ ksceKernelStopModuleForPid()

int ksceKernelStopModuleForPid ( SceUID  pid,
SceUID  modid,
SceSize  args,
void *  argp,
int  flags,
SceKernelULMOption *  option,
int *  status 
)

stop module

Parameters
[in]pid- target pid
[in]modid- target module id
[in]args- module stop args
[in]argp- module stop argp
[in]flags- unknown, set zero
[in]option- Optional 0x10-byte stop-module options.
[out]status- module_stop res, SCE_KERNEL_STOP_SUCCESS etc...
Returns
0 on success, < 0 on error.

◆ ksceKernelUnloadModuleForPid()

int ksceKernelUnloadModuleForPid ( SceUID  pid,
SceUID  modid,
int  flags,
SceKernelULMOption *  option 
)

unload module

Parameters
[in]pid- target pid
[in]modid- target module id
[in]flags- unknown, set zero
[in]option- unknown
Returns
0 on success, < 0 on error.

◆ ksceKernelStopUnloadModuleForPid()

int ksceKernelStopUnloadModuleForPid ( SceUID  pid,
SceUID  modid,
SceSize  args,
void *  argp,
int  flags,
SceKernelULMOption *  option,
int *  status 
)

stop and unload module

Parameters
[in]pid- target pid
[in]modid- target module id
[in]args- module stop args
[in]argp- module stop argp
[in]flags- unknown, set zero
[in]option- unknown
[out]status- module_stop res, SCE_KERNEL_STOP_SUCCESS etc...
Returns
0 on success, < 0 on error.

◆ ksceKernelLoadStartSharedModuleForPid()

SceUID ksceKernelLoadStartSharedModuleForPid ( SceUID  pid,
const char *  path,
SceSize  args,
void *  argp,
int  flags,
SceKernelLMOption *  option,
int *  status 
)

load and start module as shared module

Parameters
[in]pid- target pid
[in]path- module path
[in]args- module start args
[in]argp- module start argp
[in]flags- unknown, set zero
[in]option- unknown
[out]status- module_start res, SCE_KERNEL_START_SUCCESS etc...
Returns
modid on success, < 0 on error.

◆ ksceKernelStopUnloadSharedModuleForPid()

int ksceKernelStopUnloadSharedModuleForPid ( SceUID  pid,
SceUID  modid,
SceSize  args,
void *  argp,
int  flags,
SceKernelULMOption *  option,
int *  status 
)

stop and unload module as shared module

Parameters
[in]pid- target pid
[in]modid- target module id
[in]args- module stop args
[in]argp- module stop argp
[in]flags- unknown, set zero
[in]option- unknown
[out]status- module_stop res, SCE_KERNEL_STOP_SUCCESS etc...
Returns
0 on success, < 0 on error.

◆ ksceKernelMountBootfs()

int ksceKernelMountBootfs ( const char *  bootImagePath)

mount bootfs (load bootfs module)

Parameters
[in]bootImagePath- bootfs module path
Returns
0 on success, < 0 on error.

◆ ksceKernelUmountBootfs()

int ksceKernelUmountBootfs ( void  )

unmount bootfs (unload bootfs module)

Returns
0 on success, < 0 on error.

◆ ksceKernelGetModuleIdByPid()

SceUID ksceKernelGetModuleIdByPid ( SceUID  pid)

Get the main module id for a given process.

Parameters
pidThe process to query.
Returns
the UID of the module else < 0 for an error.

◆ ksceKernelGetModulePath()

int ksceKernelGetModulePath ( SceUID  modid,
char *  path,
SceSize  pathlen 
)

Get the module path.

Parameters
[in]modid- target module ID
[out]path- module path output
[in]pathlen- path output max len
Returns
0 on success, < 0 on error.

◆ ksceKernelGetLibraryInfoForDebugger()

int ksceKernelGetLibraryInfoForDebugger ( SceUID  pid,
SceUID  library_id,
SceKernelModuleLibraryInfo *  info 
)

Get library info.

Parameters
[in]pid- target pid
[in]library_id- target library ID
[out]info- info output
Returns
0 on success, < 0 on error.

◆ ksceKernelFinalizeKbl()

void ksceKernelFinalizeKbl ( void  )

◆ ksceKernelGetExportedLibraryListInModule()

int ksceKernelGetExportedLibraryListInModule ( SceUID  pid,
SceUID  modid,
SceUID *  library_ids,
SceSize *  num 
)

◆ ksceKernelGetImportedLibraryListInModule()

int ksceKernelGetImportedLibraryListInModule ( SceUID  pid,
SceUID  modid,
SceUID *  library_ids,
SceSize *  num 
)

◆ ksceKernelGetLibEntCBListForSyslibtrace()

int ksceKernelGetLibEntCBListForSyslibtrace ( void **  ppList,
SceSize *  num 
)

◆ ksceKernelGetLibraryList()

int ksceKernelGetLibraryList ( SceUID  pid,
SceUID *  library_ids,
SceSize *  num 
)

◆ ksceKernelGetLibraryClientList()

int ksceKernelGetLibraryClientList ( SceUID  pid,
SceUID  library_id,
SceUID *  modids,
SceSize *  num,
SceSize  cpy_skip_num 
)

◆ ksceKernelGetLibraryDBFlags()

int ksceKernelGetLibraryDBFlags ( SceUID  pid,
int *  pFlags 
)

◆ ksceKernelGetLibraryExportInfoForDebugger()

int ksceKernelGetLibraryExportInfoForDebugger ( SceUID  pid,
SceUID  library_id,
SceKernelModuleExportEntry *  list,
SceSize *  num,
SceSize  cpy_skip_num 
)

◆ ksceKernelGetLostLibraryInfo()

int ksceKernelGetLostLibraryInfo ( SceUID  pid,
SceUID  modid,
SceNID  libnid,
SceKernelModuleImportNonlinkedInfo *  info 
)

◆ ksceKernelGetLostLibraryList()

int ksceKernelGetLostLibraryList ( SceUID  pid,
void *  a2,
SceSize *  num 
)

◆ ksceKernelGetLostLibraryListInModule()

int ksceKernelGetLostLibraryListInModule ( SceUID  pid,
SceUID  modid,
void *  pList,
SceSize *  num 
)

◆ ksceKernelGetMetaDataForDebugger()

int ksceKernelGetMetaDataForDebugger ( SceUID  pid,
SceUID  uModuleId,
void **  start,
void **  stop 
)

◆ ksceKernelGetModuleEntryPoint()

void * ksceKernelGetModuleEntryPoint ( SceUID  modid)

◆ ksceKernelGetModuleFingerprint()

int ksceKernelGetModuleFingerprint ( SceUID  moduleId,
SceUInt32 *  pFingerprint 
)

◆ ksceKernelGetModuleIsSharedByAddr()

int ksceKernelGetModuleIsSharedByAddr ( SceUID  pid,
void *  addr 
)

◆ ksceKernelGetProgramIdentificationInfo()

int ksceKernelGetProgramIdentificationInfo ( const char *  path,
SceUInt64 *  pAuthid,
SceSelfAppInfo *  pInfo 
)

◆ ksceKernelGetStubInfoForDebugger()

int ksceKernelGetStubInfoForDebugger ( SceUID  pid,
SceUID  stubid,
void *  a3 
)

◆ ksceKernelGetStubList()

int ksceKernelGetStubList ( SceUID  pid,
SceUID *  stub,
SceSize *  num 
)

◆ ksceKernelGetStubNidTableForDebugger()

int ksceKernelGetStubNidTableForDebugger ( SceUID  pid,
SceUID  stubid,
void *  a3,
SceSize *  num,
SceSize  cpy_skip_num 
)

◆ ksceKernelLoadPreloadingModules()

int ksceKernelLoadPreloadingModules ( SceUID  pid,
const SceLoadProcessParam *  pParam,
int  flags 
)

◆ ksceKernelLoadProcessImage()

SceUID ksceKernelLoadProcessImage ( SceUID  pid,
const char *  path,
int  flags,
SceSelfAuthInfo *  auth_info,
SceLoadProcessParam *  param,
SceKernelCompatibilityShimInfo *  shim_info 
)

◆ ksceKernelLoadPtLoadSegForFwloader()

int ksceKernelLoadPtLoadSegForFwloader ( const char *  path,
int  e_phnum,
void *  buffer,
SceSize  bufsize,
int  zero_unk,
SceSize *  bytes_read 
)

◆ ksceKernelModuleUnloadMySelf()

int ksceKernelModuleUnloadMySelf ( void  )

◆ ksceKernelStartPreloadingModules()

int ksceKernelStartPreloadingModules ( SceUID  pid)

◆ ksceKernelUnloadProcessModules()

int ksceKernelUnloadProcessModules ( SceUID  pid)

◆ ksceKernelGetModuleInfoByAddr()

int ksceKernelGetModuleInfoByAddr ( const void *  module_addr,
SceKernelModuleInfo *  info 
)

Gets information about the loaded kernel module containing an address.

Parameters
[in]module_addrAddress in any mapped module segment.
[out]infoSceKernelModuleInfo buffer. Zero it and set its size field to the size of the structure before calling.
Returns
0 on success, < 0 on error.

◆ ksceKernelRegisterLibary()

int ksceKernelRegisterLibary ( const void *  libent)

Registers an export library from a loaded kernel module.

Parameters
[in]libentPointer to the aligned 0x20-byte library export-table entry within the loaded kernel module that owns it.
Returns
0 on success, < 0 on error.

◆ ksceKernelReleaseLibary()

int ksceKernelReleaseLibary ( const void *  libent)

Unregisters an export library from a loaded kernel module and relinks modules whose imports are affected.

Parameters
[in]libentPointer to the aligned 0x20-byte library export-table entry within the loaded kernel module that owns it.
Returns
0 on success, < 0 on error.

Variable Documentation

◆ size [1/11]

SceSize SceKernelStartModuleOpt::size

Size of this structure.

◆ reserved [1/2]

SceUInt32 SceKernelStartModuleOpt::reserved[3]

Copied from user memory but unused on FW 3.60; initialize to 0.

◆ size [2/11]

SceSize SceKernelStopModuleOpt::size

Size of this structure.

◆ reserved [2/2]

SceUInt32 SceKernelStopModuleOpt::reserved[3]

Copied from user memory but unused on FW 3.60; initialize to 0.

◆ size [3/11]

SceSize SceKernelSegmentInfo::size

Size of this structure.

◆ perms

SceUInt SceKernelSegmentInfo::perms

Access-permission byte combined with a loader metadata byte shifted left by 20 on FW 3.60.

◆ vaddr [1/2]

void* SceKernelSegmentInfo::vaddr

Segment virtual address.

◆ memsz [1/2]

SceSize SceKernelSegmentInfo::memsz

Segment size in memory.

◆ filesz

SceSize SceKernelSegmentInfo::filesz

Segment size in the module file.

◆ res

SceUInt SceKernelSegmentInfo::res

unused

◆ size [4/11]

SceSize SceKernelModuleInfo::size

Size of this structure; left unchanged by the FW 3.60 kernel APIs.

◆ modid [1/3]

SceUID SceKernelModuleInfo::modid

Module identifier.

◆ modattr

uint16_t SceKernelModuleInfo::modattr

Module attributes.

◆ modver

uint8_t SceKernelModuleInfo::modver[2]

Module version.

◆ module_name [1/2]

char SceKernelModuleInfo::module_name[28]

Module name; zero the structure first to ensure NUL termination.

◆ unk28

SceUInt SceKernelModuleInfo::unk28

◆ start_entry

void* SceKernelModuleInfo::start_entry

Module start entry point.

◆ stop_entry

void* SceKernelModuleInfo::stop_entry

Module stop entry point.

◆ exit_entry

void* SceKernelModuleInfo::exit_entry

Module exit entry point.

◆ exidx_top

void* SceKernelModuleInfo::exidx_top

Start of the ARM exception index table.

◆ exidx_btm

void* SceKernelModuleInfo::exidx_btm

End of the ARM exception index table.

◆ extab_top

void* SceKernelModuleInfo::extab_top

Start of the ARM exception table.

◆ extab_btm

void* SceKernelModuleInfo::extab_btm

End of the ARM exception table.

◆ tlsInit

void* SceKernelModuleInfo::tlsInit

TLS initialization image.

◆ tlsInitSize

SceSize SceKernelModuleInfo::tlsInitSize

Size of the TLS initialization image.

◆ tlsAreaSize

SceSize SceKernelModuleInfo::tlsAreaSize

Total TLS area size.

◆ path

char SceKernelModuleInfo::path[256]

Module path.

◆ segments

SceKernelSegmentInfo SceKernelModuleInfo::segments[4]

Information for up to four mapped segments.

◆ state

SceUInt SceKernelModuleInfo::state

◆ size [5/11]

SceSize SceKernelLMOption::size

◆ size [6/11]

SceSize SceKernelULMOption::size

◆ size [7/11]

SceSize SceKernelSystemSwVersion::size

◆ versionString

char SceKernelSystemSwVersion::versionString[0x1C]

◆ version [1/3]

SceUInt SceKernelSystemSwVersion::version

◆ unk_24

SceUInt SceKernelSystemSwVersion::unk_24

◆ size [8/11]

SceSize SceKernelModuleLibraryInfo::size

sizeof(SceKernelModuleLibraryInfo) : 0x120

◆ library_id

SceUID SceKernelModuleLibraryInfo::library_id

◆ libnid [1/3]

uint32_t SceKernelModuleLibraryInfo::libnid

◆ version [2/3]

uint16_t SceKernelModuleLibraryInfo::version

◆ flags

uint16_t SceKernelModuleLibraryInfo::flags

◆ entry_num_function

uint16_t SceKernelModuleLibraryInfo::entry_num_function

◆ entry_num_variable

uint16_t SceKernelModuleLibraryInfo::entry_num_variable

◆ unk_0x14

uint16_t SceKernelModuleLibraryInfo::unk_0x14

◆ unk_0x16

uint16_t SceKernelModuleLibraryInfo::unk_0x16

◆ library_name [1/2]

char SceKernelModuleLibraryInfo::library_name[0x100]

◆ []

SceSize { ... } ::client_count

Number of modules importing this library.

◆ []

SceSize { ... } ::number_of_imported

Legacy name for client_count.

◆ [union]

◆ []

SceUID { ... } ::owner_module_id

ID of the module that owns the library.

◆ []

SceUID { ... } ::modid2

Legacy name for owner_module_id.

◆ [union]

◆ s

char SceKernelModuleName::s[0x1C]

◆ size [9/11]

SceSize SceKernelSegmentInfo2::size

sizeof(SceKernelSegmentInfo2) (0x14)

◆ perm

int SceKernelSegmentInfo2::perm

◆ vaddr [2/2]

void* SceKernelSegmentInfo2::vaddr

◆ memsz [2/2]

uint32_t SceKernelSegmentInfo2::memsz

◆ []

SceSize { ... } ::alignment

Power-of-two segment alignment.

◆ []

int { ... } ::unk_10

Legacy name for alignment.

◆ [union]

union { ... } SceKernelSegmentInfo2

◆ size [10/11]

SceSize SceKernelModuleListInfo::size

◆ modid [2/3]

SceUID SceKernelModuleListInfo::modid

◆ version [3/3]

uint32_t SceKernelModuleListInfo::version

◆ module_version

uint32_t SceKernelModuleListInfo::module_version

◆ []

uint32_t { ... } ::unk10

Legacy field containing the packed module type and flags.

◆ []

uint8_t { ... } ::module_type

◆ []

uint8_t { ... } ::reserved_0x11

◆ []

uint16_t { ... } ::module_flags

◆ [struct]

struct { ... } SceKernelModuleListInfo

◆ [union]

union { ... } SceKernelModuleListInfo

◆ unk14

void* SceKernelModuleListInfo::unk14

◆ unk18

uint32_t SceKernelModuleListInfo::unk18

◆ unk1C

void* SceKernelModuleListInfo::unk1C

◆ unk20

void* SceKernelModuleListInfo::unk20

◆ module_name [2/2]

char SceKernelModuleListInfo::module_name[28]

◆ unk40

uint32_t SceKernelModuleListInfo::unk40

◆ unk44

uint32_t SceKernelModuleListInfo::unk44

◆ nid

uint32_t SceKernelModuleListInfo::nid

◆ segments_num

SceSize SceKernelModuleListInfo::segments_num

◆ [] [1/4]

SceKernelSegmentInfo2 { ... } ::SegmentInfo[1]

◆ [] [1/4]

uint32_t { ... } ::addr[4]

◆ [struct]

struct { ... } SceKernelModuleListInfo::seg1

◆ [] [2/4]

SceKernelSegmentInfo2 { ... } ::SegmentInfo[2]

◆ [] [2/4]

uint32_t { ... } ::addr[4]

◆ [struct]

struct { ... } SceKernelModuleListInfo::seg2

◆ [] [3/4]

SceKernelSegmentInfo2 { ... } ::SegmentInfo[3]

◆ [] [3/4]

uint32_t { ... } ::addr[4]

◆ [struct]

struct { ... } SceKernelModuleListInfo::seg3

◆ [] [4/4]

SceKernelSegmentInfo2 { ... } ::SegmentInfo[4]

◆ [] [4/4]

uint32_t { ... } ::addr[4]

◆ [struct]

struct { ... } SceKernelModuleListInfo::seg4

◆ [union]

union { ... } SceKernelModuleListInfo

◆ libnid [2/3]

SceNID SceKernelModuleExportEntry::libnid

◆ entry

void* SceKernelModuleExportEntry::entry

◆ size [11/11]

SceSize SceKernelModuleImportNonlinkedInfo::size

◆ modid [3/3]

SceUID SceKernelModuleImportNonlinkedInfo::modid

◆ libnid [3/3]

SceNID SceKernelModuleImportNonlinkedInfo::libnid

◆ libname

char SceKernelModuleImportNonlinkedInfo::libname[0x100]

◆ data_0x10C

int SceKernelModuleImportNonlinkedInfo::data_0x10C

◆ data_0x110

int SceKernelModuleImportNonlinkedInfo::data_0x110

◆ data_0x114

int SceKernelModuleImportNonlinkedInfo::data_0x114

◆ data_0x118

int SceKernelModuleImportNonlinkedInfo::data_0x118

◆ data_0x11C

int SceKernelModuleImportNonlinkedInfo::data_0x11C

◆ data_0x120

int SceKernelModuleImportNonlinkedInfo::data_0x120

◆ vendor_id

int SceSelfAppInfo::vendor_id

◆ self_type

int SceSelfAppInfo::self_type

◆ sysver

SceUInt32 SceLoadProcessParam::sysver

◆ thread_name

char SceLoadProcessParam::thread_name[0x20]

◆ initial_thread_priority

SceUInt32 SceLoadProcessParam::initial_thread_priority

◆ initial_thread_stack_size

SceSize SceLoadProcessParam::initial_thread_stack_size

◆ unk_0x2C

SceUInt32 SceLoadProcessParam::unk_0x2C

◆ unk_0x30

SceUInt32 SceLoadProcessParam::unk_0x30

◆ threadOptParam

SceKernelThreadOptParam SceLoadProcessParam::threadOptParam

◆ unk_0x50

int SceLoadProcessParam::unk_0x50

◆ process_name

char SceLoadProcessParam::process_name[0x20]

◆ preload_disabled

SceUInt32 SceLoadProcessParam::preload_disabled

◆ module_proc_param

void* SceLoadProcessParam::module_proc_param

◆ replaced_function_nid

SceNID SceKernelFunctionShimInfo::replaced_function_nid

NID of the function that needs to be replaced.

◆ replacing_function_nid

SceNID SceKernelFunctionShimInfo::replacing_function_nid

NID of the function that will serve as a replacement - must probably come from same library as replaced function.

◆ library_name [2/2]

const char* SceKernelLibraryShimInfo::library_name

Name of the library the shimmed functions come from (i.e.

SceThreadmgr)

◆ unk_04 [1/2]

SceUInt32 SceKernelLibraryShimInfo::unk_04

Always 0 ?

◆ function_shims_count

SceUInt32 SceKernelLibraryShimInfo::function_shims_count

Size of the array pointed to by next field.

◆ function_shims

SceKernelFunctionShimInfo* SceKernelLibraryShimInfo::function_shims

◆ title_id

const char* SceKernelCompatibilityShimInfo::title_id

TitleID (process name) of the app this shim applies to.

◆ unk_04 [2/2]

SceUInt32 SceKernelCompatibilityShimInfo::unk_04

Always 0 ?

◆ library_shims_count

SceUInt32 SceKernelCompatibilityShimInfo::library_shims_count

Size of the array pointed to by next field.

◆ library_shims

SceKernelLibraryShimInfo* SceKernelCompatibilityShimInfo::library_shims