Skip to content

Commit

Permalink
Update psp2kern/kernel/modulemgr.h
Browse files Browse the repository at this point in the history
Add ksceKernelGetProcessEntryPointByAddr
Remove ksceKernelGetModuleLibExportList/ksceKernelGetModuleListByImport/ksceKernelGetProcessLibraryIdList
  • Loading branch information
Princess-of-Sleeping authored and d3m3vilurr committed Sep 30, 2021
1 parent 40eab2f commit 7777a1a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 47 deletions.
4 changes: 1 addition & 3 deletions db/360/SceKernelModulemgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ modules:
ksceKernelGetModuleInfo: 0xD269F915
ksceKernelGetModuleInfoMinByAddr: 0x8309E043
ksceKernelGetModuleInternal: 0xFE303863
ksceKernelGetModuleLibExportList: 0xD4BF409C
ksceKernelGetModuleLibraryInfo: 0x6A655255
ksceKernelGetModuleList: 0x97CF7B4E
ksceKernelGetModuleList2: 0x410E1D2E
ksceKernelGetModuleListByImport: 0x3B93CF88
ksceKernelGetModulePath: 0x779A1025
ksceKernelGetProcessLibraryIdList: 0x1FDEAE16
ksceKernelGetProcessEntryPointByAddr: 0x2C2618D9
ksceKernelGetProcessMainModule: 0x20A27FA9
ksceKernelLoadModuleForPid: 0xFA21D8CB
ksceKernelLoadPreloadingModules: 0x3AD26B43
Expand Down
57 changes: 13 additions & 44 deletions include/psp2kern/kernel/modulemgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,24 @@ int ksceKernelGetModuleInfoMinByAddr(SceUID pid, const void *module_addr, uint32
/**
* @brief Get module info (internal)
*
* @param[in] modid - target module id
* @param[out] module_info - module_info output pointer
* @param[in] modid - target module id
* @param[out] info - module_info output pointer
*
* @return 0 on success, < 0 on error.
*/
int ksceKernelGetModuleInternal(SceUID modid, void **info);

/**
* @brief Get module info by address (internal)
*
* @param[in] pid - target process id
* @param[in] module_addr - target module address
* @param[out] info - module_info output pointer
*
* @return 0 on success, < 0 on error.
*/
int ksceKernelGetProcessEntryPointByAddr(SceUID pid, const void *module_addr, void **info);

/**
* @brief Get module id by module address
*
Expand Down Expand Up @@ -501,48 +512,6 @@ int ksceKernelGetModulePath(SceUID modid, char *path, SceSize pathlen);
*/
int ksceKernelGetModuleLibraryInfo(SceUID pid, SceUID library_id, SceKernelModuleLibraryInfo *info);

typedef struct SceKernelModuleExportEntry {
uint32_t libnid;
const void *entry; // function ptr. or vars?
} SceKernelModuleExportEntry;

/**
* @brief Get module export entry
*
* @param[in] pid - target pid
* @param[in] libid - target library uid
* @param[out] list - data output
* @param[inout] num - in:list max num, out:get entry num
* @param[in] cpy_skip_num - The index at which to start copying
*
* @return 0 on success, < 0 on error.
*/
int ksceKernelGetModuleLibExportList(SceUID pid, SceUID library_id, SceKernelModuleExportEntry *list, SceSize *num, SceSize cpy_skip_num);

/**
* @brief Get module id list by import
*
* @param[in] pid - target pid
* @param[in] library_id - target library uid
* @param[out] modids - module id output list
* @param[inout] num - in:list max num, out:get entry num
* @param[in] cpy_skip_num - The index at which to start copying
*
* @return 0 on success, < 0 on error.
*/
int ksceKernelGetModuleListByImport(SceUID pid, SceUID library_id, SceUID *modids, SceSize *num, SceSize cpy_skip_num);

/**
* @brief Get module export list
*
* @param[in] pid - target pid
* @param[out] library_ids - library id output list
* @param[inout] num - in:list max num, out:get entry num
*
* @return 0 on success, < 0 on error.
*/
int ksceKernelGetProcessLibraryIdList(SceUID pid, SceUID *library_ids, SceSize *num);

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit 7777a1a

Please sign in to comment.