1919#include <pspmodulemgr.h>
2020
2121/** @defgroup ModuleMgrKern Kernel Module Manager Library
22- * This module contains the imports for the kernel's module management routines.
23- */
22+ * This module contains the imports for the kernel's module management routines.
23+ */
24+
25+ enum SceModuleMgrExecModes {
26+ MODULE_EXEC_CMD_LOAD ,
27+ MODULE_EXEC_CMD_RELOCATE ,
28+ MODULE_EXEC_CMD_START ,
29+ MODULE_EXEC_CMD_STOP ,
30+ MODULE_EXEC_CMD_UNLOAD ,
31+ };
32+
33+ /**
34+ * Structure used internally for many `sceModuleManager` module functions.
35+ *
36+ * Also seems to be passed to `sceKernelStartThread` eventually by those internal functions.
37+ * */
38+ typedef struct {
39+ /** The Operation to start on. One of the `SceModuleMgrExecModes` modes. */
40+ u8 mode_start ;
41+ /** The Operation to finish on. One of the `SceModuleMgrExecModes` modes. */
42+ u8 mode_finish ;
43+ /** The module placement policy in memory. One of `PspSysMemBlockTypes`. */
44+ u8 position ;
45+ u8 access ;
46+ SceUID * result ;
47+ SceUID * new_block_id ;
48+ /** The module in memory. */
49+ SceModule * mod ;
50+ /** The executable information of the module. */
51+ SceLoadCoreExecFileInfo * exec_info ;
52+ /** The API type of the module. */
53+ u32 api_type ;
54+ /** The file ID for module file. */
55+ SceUID fd ;
56+ /** The module thread priority. */
57+ s32 thread_priority ;
58+ /** The module thread attributes. */
59+ u32 thread_attr ;
60+ /** The memory partition where the program of the module will be stored. */
61+ SceUID mpid_text ;
62+ /** The memory partition where the data of the module will be stored. */
63+ SceUID mpid_data ;
64+ SceUID thread_mpid_stack ;
65+ SceSize stack_size ;
66+ /** The module ID. */
67+ SceUID mod_id ;
68+ SceUID caller_mod_id ;
69+ SceSize mod_size ;
70+ void * file_base ;
71+ SceSize arg_size ;
72+ void * argp ;
73+ u32 unk1 ;
74+ u32 unk2 ;
75+ s32 * status ;
76+ SceUID event_id ;
77+ u32 unk3 ;
78+ u32 unk4 ;
79+ u32 unk5 ;
80+ SceUID extern_mem_block_id_kernel ;
81+ SceUID extern_mem_block_partition_id ;
82+ SceSize extern_mem_block_size ;
83+ u32 unk6 ;
84+ void * block_gzip ;
85+ u32 unk7 ;
86+ char secure_install_id [SCE_SECURE_INSTALL_ID_LEN ];
87+ SceUID extern_mem_block_id_user ;
88+ u32 unk8 ;
89+ SceOff mem_block_offset ;
90+ } SceModuleMgrParam ;
2491
2592#ifdef __cplusplus
2693extern "C" {
@@ -30,20 +97,20 @@ extern "C" {
3097/**@{*/
3198
3299/**
33- * Gets the current module list.
34- *
35- * @param readbufsize - The size of the read buffer.
36- * @param readbuf - Pointer to a buffer to store the IDs
37- *
38- * @return < 0 on error.
39- */
100+ * Gets the current module list.
101+ *
102+ * @param readbufsize - The size of the read buffer.
103+ * @param readbuf - Pointer to a buffer to store the IDs
104+ *
105+ * @return < 0 on error.
106+ */
40107int sceKernelGetModuleList (int readbufsize , SceUID * readbuf );
41108
42109/**
43- * Get the number of loaded modules.
44- *
45- * @return The number of loaded modules.
46- */
110+ * Get the number of loaded modules.
111+ *
112+ * @return The number of loaded modules.
113+ */
47114int sceKernelModuleCount (void );
48115
49116/**
0 commit comments