6 #ifndef _PSP2KERN_KERNEL_MODULEMGR_H_
7 #define _PSP2KERN_KERNEL_MODULEMGR_H_
109 typedef struct _SceKernelFunctionShimInfo {
115 typedef struct _SceKernelLibraryShimInfo {
123 typedef struct _SceKernelCompatibilityShimInfo {
534 #define ksceKernelGetModuleInternal ksceKernelGetModuleCB
535 #define ksceKernelGetProcessMainModule ksceKernelGetModuleIdByPid
void * buffer
Definition: bt.h:6
int flags
Event flags.
Definition: debug.h:3
SceUID pid
Definition: debug.h:1
void * entry
Definition: modulemgr.h:70
int ksceKernelGetExportedLibraryListInModule(SceUID pid, SceUID modid, SceUID *library_ids, SceSize *num)
SceUInt32 preload_disabled
Definition: modulemgr.h:104
const char * title_id
TitleID (process name) of the app this shim applies to.
Definition: modulemgr.h:124
int ksceKernelGetStubInfoForDebugger(SceUID pid, SceUID stubid, void *a3)
SceUID ksceKernelGetModuleIdByPid(SceUID pid)
Get the main module id for a given process.
SceSize size
sizeof(SceKernelSegmentInfo2) (0x14)
Definition: modulemgr.h:24
SceNID libnid
Definition: modulemgr.h:77
int data_0x110
Definition: modulemgr.h:80
void * module_proc_param
Definition: modulemgr.h:105
SceUInt32 unk_04
Always 0 ?
Definition: modulemgr.h:125
SceUID ksceKernelLoadModule(const char *path, int flags, SceKernelLMOption *option)
load module (kernel only)
SceUID ksceKernelLoadStartModule(const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
load and start module (kernel only)
char thread_name[0x20]
Definition: modulemgr.h:96
int ksceKernelGetLostLibraryInfo(SceUID pid, SceUID modid, SceNID libnid, SceKernelModuleImportNonlinkedInfo *info)
int ksceKernelGetModuleFingerprint(SceUID moduleId, SceUInt32 *pFingerprint)
int ksceKernelGetStubList(SceUID pid, SceUID *stub, SceSize *num)
SceNID replaced_function_nid
NID of the function that needs to be replaced.
Definition: modulemgr.h:110
int ksceKernelGetModuleIsSharedByAddr(SceUID pid, void *addr)
SceKernelFunctionShimInfo * function_shims
Definition: modulemgr.h:119
int ksceKernelGetModuleCBByAddr(SceUID pid, const void *module_addr, void **info)
Get module info by address (internal)
uint32_t nid
Definition: modulemgr.h:45
void * unk14
Definition: modulemgr.h:38
int ksceKernelStopModule(SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
stop module (kernel only)
int perm
Definition: modulemgr.h:25
int ksceKernelLoadPtLoadSegForFwloader(const char *path, int e_phnum, void *buffer, SceSize bufsize, int zero_unk, SceSize *bytes_read)
int ksceKernelUnloadModule(SceUID modid, int flags, SceKernelULMOption *option)
unload module (kernel only)
SceUInt32 sysver
Definition: modulemgr.h:95
int self_type
Definition: modulemgr.h:90
int unk_10
Definition: modulemgr.h:28
int ksceKernelGetLostLibraryListInModule(SceUID pid, SceUID modid, void *pList, SceSize *num)
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.
uint32_t unk40
Definition: modulemgr.h:43
SceSize size
Definition: modulemgr.h:33
int ksceKernelGetModuleList(SceUID pid, int flags1, int flags2, SceUID *modids, SceSize *num)
Get module id list.
void ksceKernelRegisterModulesAfterBoot(void)
Setup kernel for modulemgr.
int ksceKernelGetProgramIdentificationInfo(const char *path, SceUInt64 *pAuthid, SceSelfAppInfo *pInfo)
uint32_t version
Definition: modulemgr.h:35
char libname[0x100]
Definition: modulemgr.h:78
void ksceKernelRegisterSyscall(SceSize syscall_id, const void *func)
Register syscall function.
int ksceKernelMountBootfs(const char *bootImagePath)
mount bootfs (load bootfs module)
SceUID ksceKernelSearchModuleByName(const char *module_name)
search kernel module by module name
SceUInt32 initial_thread_priority
Definition: modulemgr.h:97
uint32_t unk10
Definition: modulemgr.h:37
int data_0x10C
Definition: modulemgr.h:79
char process_name[0x20]
Definition: modulemgr.h:103
uint32_t unk44
Definition: modulemgr.h:44
int ksceKernelGetImportedLibraryListInModule(SceUID pid, SceUID modid, SceUID *library_ids, SceSize *num)
SceNID libnid
Definition: modulemgr.h:69
int ksceKernelUnloadModuleForPid(SceUID pid, SceUID modid, int flags, SceKernelULMOption *option)
unload module
int ksceKernelStopModuleForPid(SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
stop module
void * vaddr
Definition: modulemgr.h:26
int ksceKernelGetModuleInfoForDebugger(SceUID pid, SceKernelModuleListInfo *infolists, SceSize *num)
int ksceKernelGetLibraryExportInfoForDebugger(SceUID pid, SceUID library_id, SceKernelModuleExportEntry *list, SceSize *num, SceSize cpy_skip_num)
SceUInt32 unk_0x30
Definition: modulemgr.h:100
SceSize size
Definition: modulemgr.h:75
SceUID modid
Definition: modulemgr.h:34
uint32_t module_version
Definition: modulemgr.h:36
char s[0x1C]
Definition: modulemgr.h:19
SceNID replacing_function_nid
NID of the function that will serve as a replacement - must probably come from same library as replac...
Definition: modulemgr.h:111
int ksceKernelStopUnloadSharedModuleForPid(SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
stop and unload module as shared module
int unk_0x50
Definition: modulemgr.h:102
VITASDK_BUILD_ASSERT_EQ(4, SceKernelPreloadInhibit)
void ksceKernelFinalizeKbl(void)
SceUID ksceKernelGetModuleIdByAddrForDebugger(SceUID pid, const void *module_addr)
Get module id by module address.
int ksceKernelGetLibraryInfoForDebugger(SceUID pid, SceUID library_id, SceKernelModuleLibraryInfo *info)
Get library info.
int data_0x120
Definition: modulemgr.h:84
int ksceKernelGetLostLibraryList(SceUID pid, void *a2, SceSize *num)
int ksceKernelStartModule(SceUID modid, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
start module (kernel only)
SceKernelThreadOptParam threadOptParam
Definition: modulemgr.h:101
uint32_t unk18
Definition: modulemgr.h:39
int data_0x11C
Definition: modulemgr.h:83
int ksceKernelGetStubNidTableForDebugger(SceUID pid, SceUID stubid, void *a3, SceSize *num, SceSize cpy_skip_num)
SceUInt32 function_shims_count
Size of the array pointed to by next field.
Definition: modulemgr.h:118
SceUInt32 library_shims_count
Size of the array pointed to by next field.
Definition: modulemgr.h:126
int ksceKernelStopUnloadModule(SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
stop and unload module (kernel only)
int ksceKernelGetMetaDataForDebugger(SceUID pid, SceUID uModuleId, void **start, void **stop)
int ksceKernelGetModulePath(SceUID modid, char *path, SceSize pathlen)
Get the module path.
void * unk1C
Definition: modulemgr.h:40
int ksceKernelGetLibEntCBListForSyslibtrace(void **ppList, SceSize *num)
int data_0x114
Definition: modulemgr.h:81
int ksceKernelUmountBootfs(void)
unmount bootfs (unload bootfs module)
int ksceKernelStartModuleForPid(SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
start module
SceSize initial_thread_stack_size
Definition: modulemgr.h:98
int data_0x118
Definition: modulemgr.h:82
const char * library_name
Name of the library the shimmed functions come from (i.e.
Definition: modulemgr.h:116
SceUInt32 unk_04
Always 0 ?
Definition: modulemgr.h:117
uint32_t memsz
Definition: modulemgr.h:27
int ksceKernelLoadPreloadingModules(SceUID pid, const SceLoadProcessParam *pParam, int flags)
int ksceKernelStartPreloadingModules(SceUID pid)
int ksceKernelGetModuleInfo(SceUID pid, SceUID modid, SceKernelModuleInfo *info)
Get module info.
SceUID modid
Definition: modulemgr.h:76
SceKernelLibraryShimInfo * library_shims
Definition: modulemgr.h:127
int ksceKernelStopUnloadModuleForPid(SceUID pid, SceUID modid, SceSize args, void *argp, int flags, SceKernelULMOption *option, int *status)
stop and unload module
int ksceKernelUnloadProcessModules(SceUID pid)
void * unk20
Definition: modulemgr.h:41
int ksceKernelGetModuleCB(SceUID modid, void **info)
Get module info (internal)
int ksceKernelModuleUnloadMySelf(void)
void * ksceKernelGetModuleEntryPoint(SceUID modid)
SceUID ksceKernelLoadModuleForPid(SceUID pid, const char *path, int flags, SceKernelLMOption *option)
load module
SceUID ksceKernelLoadStartModuleForPid(SceUID pid, const char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status)
load and start module
SceUID ksceKernelLoadProcessImage(SceUID pid, const char *path, int flags, SceSelfAuthInfo *auth_info, SceLoadProcessParam *param, SceKernelCompatibilityShimInfo *shim_info)
SceUInt32 unk_0x2C
Definition: modulemgr.h:99
int ksceKernelGetLibraryClientList(SceUID pid, SceUID library_id, SceUID *modids, SceSize *num, SceSize cpy_skip_num)
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 vendor_id
Definition: modulemgr.h:89
int ksceKernelGetSystemSwVersion(SceKernelFwInfo *data)
Get fw info.
SceSize segments_num
Definition: modulemgr.h:46
int ksceKernelGetLibraryDBFlags(SceUID pid, int *pFlags)
int ksceKernelGetLibraryList(SceUID pid, SceUID *library_ids, SceSize *num)
Definition: modulemgr.h:123
Definition: modulemgr.h:109
Definition: modulemgr.h:98
Definition: modulemgr.h:115
Definition: modulemgr.h:68
Definition: modulemgr.h:74
Definition: modulemgr.h:75
Definition: modulemgr.h:119
Definition: modulemgr.h:32
Definition: modulemgr.h:18
Definition: modulemgr.h:23
Definition: modulemgr.h:108
Definition: modulemgr.h:103
Definition: modulemgr.h:94
Definition: modulemgr.h:88
Additional options used when creating threads.
Definition: threadmgr.h:65
unsigned int SceSize
Definition: types.h:56
int SceUID
UIDs are used to describe many different kernel objects.
Definition: types.h:90
uint64_t SceUInt64
Definition: types.h:51
unsigned int SceNID
Library/Function NID.
Definition: types.h:92
uint32_t SceUInt32
Definition: types.h:45