00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __MODLOAD_H__
00020 #define __MODLOAD_H__
00021
00022 #include <pspkerneltypes.h>
00023
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00034
00035 #define PSP_MEMORY_PARTITION_KERNEL 1
00036 #define PSP_MEMORY_PARTITION_USER 2
00037
00038 typedef struct SceKernelLMOption {
00039 SceSize size;
00040 SceUID mpidtext;
00041 SceUID mpiddata;
00042 unsigned int flags;
00043 char position;
00044 char access;
00045 char creserved[2];
00046 } SceKernelLMOption;
00047
00048 typedef struct SceKernelSMOption {
00049 SceSize size;
00050 SceUID mpidstack;
00051 SceSize stacksize;
00052 int priority;
00053 unsigned int attribute;
00054 } SceKernelSMOption;
00055
00056
00068 SceUID sceKernelLoadModule(const char *path, int flags, SceKernelLMOption *option);
00069
00080 SceUID sceKernelLoadModuleMs(const char *path, int flags, SceKernelLMOption *option);
00081
00091 SceUID sceKernelLoadModuleByID(SceUID fid, int flags, SceKernelLMOption *option);
00092
00106 SceUID sceKernelLoadModuleBufferUsbWlan(SceSize bufsize, void *buf, int flags, SceKernelLMOption *option);
00107
00119 int sceKernelStartModule(SceUID modid, SceSize argsize, void *argp, int *status, SceKernelSMOption *option);
00120
00132 int sceKernelStopModule(SceUID modid, SceSize argsize, void *argp, int *status, SceKernelSMOption *option);
00133
00141 int sceKernelUnloadModule(SceUID modid);
00142
00152 int sceKernelSelfStopUnloadModule(int unknown, SceSize argsize, void *argp);
00153
00164 int sceKernelStopUnloadSelfModule(SceSize argsize, void *argp, int *status, SceKernelSMOption *option);
00165
00166
00167 typedef struct SceKernelModuleInfo {
00168 SceSize size;
00169 char nsegment;
00170 char reserved[3];
00171 int segmentaddr[4];
00172 int segmentsize[4];
00173 unsigned int entry_addr;
00174 unsigned int gp_value;
00175 unsigned int text_addr;
00176 unsigned int text_size;
00177 unsigned int data_size;
00178 unsigned int bss_size;
00179
00180
00181 unsigned short attribute;
00182 unsigned char version[2];
00183 char name[28];
00184 } SceKernelModuleInfo;
00185
00198 int sceKernelQueryModuleInfo(SceUID modid, SceKernelModuleInfo *info);
00199
00210 int sceKernelGetModuleIdList(SceUID *readbuf, int readbufsize, int *idcount);
00211
00214 #ifdef __cplusplus
00215 }
00216 #endif
00217
00218 #endif