PSP2SDK
dirty-f9e4f2d
The free SDK for PSP2
|
00001 00012 #ifndef _PSP2_KERNEL_MODULEMGR_H_ 00013 #define _PSP2_KERNEL_MODULEMGR_H_ 00014 00015 #include <psp2/types.h> 00016 00017 typedef struct 00018 { 00019 SceUInt size; //< this structure size (0x18) 00020 SceUInt perms; //< probably rwx in low bits 00021 void *vaddr; //< address in memory 00022 SceUInt memsz; //< size in memory 00023 SceUInt flags; //< meanig unknown 00024 SceUInt res; //< unused? 00025 } Psp2SegmentInfo; 00026 00027 typedef struct 00028 { 00029 SceUInt size; //< 0x1B8 for Vita 1.x 00030 SceUInt handle; //< kernel module handle? 00031 SceUInt flags; //< some bits. could be priority or whatnot 00032 char module_name[28]; 00033 SceUInt unk28; 00034 void *module_start; 00035 SceUInt unk30; 00036 void *module_stop; 00037 void *exidxTop; 00038 void *exidxBtm; 00039 SceUInt unk40; 00040 SceUInt unk44; 00041 void *tlsInit; 00042 SceSize tlsInitSize; 00043 SceSize tlsAreaSize; 00044 char path[256]; 00045 Psp2SegmentInfo segments[4]; 00046 SceUInt type; //< 6 = user-mode PRX? 00047 } Psp2LoadedModuleInfo; 00048 00049 int sceKernelGetModuleList(int, SceUID *, unsigned int *); 00050 int sceKernelGetModuleInfo(SceUID, Psp2LoadedModuleInfo *); 00051 SceUID sceKernelLoadModule(const char *path, int flags, int *res); 00052 int sceKernelUnloadModule(SceUID); 00053 00054 #endif