summaryrefslogtreecommitdiff
path: root/include/user/kernel/modulemgr.h
diff options
context:
space:
mode:
authorGlenn Anderson2015-08-14 23:27:02 -0400
committerGlenn Anderson2015-08-14 23:27:02 -0400
commit1f6cb4f3cbf7ae615d12c1dd66136347247ab7a6 (patch)
treeca88156373140a2081e64ae091d05555adadad69 /include/user/kernel/modulemgr.h
downloadvds-libraries-1f6cb4f3cbf7ae615d12c1dd66136347247ab7a6.tar.gz
Initial commit. Added headers from psp2sdk.
Diffstat (limited to 'include/user/kernel/modulemgr.h')
-rw-r--r--include/user/kernel/modulemgr.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/user/kernel/modulemgr.h b/include/user/kernel/modulemgr.h
new file mode 100644
index 0000000..f948b69
--- /dev/null
+++ b/include/user/kernel/modulemgr.h
@@ -0,0 +1,43 @@
+#ifndef _PSP2_KERNEL_MODULEMGR_H_
+#define _PSP2_KERNEL_MODULEMGR_H_
+
+#include <psp2/types.h>
+
+typedef struct
+{
+ SceUInt size; //< this structure size (0x18)
+ SceUInt perms; //< probably rwx in low bits
+ void *vaddr; //< address in memory
+ SceUInt memsz; //< size in memory
+ SceUInt flags; //< meanig unknown
+ SceUInt res; //< unused?
+} Psp2SegmentInfo;
+
+typedef struct
+{
+ SceUInt size; //< 0x1B8 for Vita 1.x
+ SceUInt handle; //< kernel module handle?
+ SceUInt flags; //< some bits. could be priority or whatnot
+ char module_name[28];
+ SceUInt unk28;
+ void *module_start;
+ SceUInt unk30;
+ void *module_stop;
+ void *exidxTop;
+ void *exidxBtm;
+ SceUInt unk40;
+ SceUInt unk44;
+ void *tlsInit;
+ SceSize tlsInitSize;
+ SceSize tlsAreaSize;
+ char path[256];
+ Psp2SegmentInfo segments[4];
+ SceUInt type; //< 6 = user-mode PRX?
+} Psp2LoadedModuleInfo;
+
+int sceKernelGetModuleList(int, SceUID *, unsigned int *);
+int sceKernelGetModuleInfo(SceUID, Psp2LoadedModuleInfo *);
+SceUID sceKernelLoadModule(const char *path, int flags, int *res);
+int sceKernelUnloadModule(SceUID);
+
+#endif