6# error "Only include common_imp.h or common_header.h!"
9#include "../pspmoduleexport.h"
12#define SCE_MODULE_NAME_LEN (27)
15#define MODULE_VERSION_MINOR (0)
16#define MODULE_VERSION_MAJOR (1)
17#define MODULE_VERSION_NUMBER_CATEGORY_SIZE (2)
27 u8 modVersion[MODULE_VERSION_NUMBER_CATEGORY_SIZE];
29 char modName[SCE_MODULE_NAME_LEN];
69} SceModuleEntryThread;
76enum SceModuleAttribute {
78 SCE_MODULE_ATTR_NONE = 0x0000,
80 SCE_MODULE_ATTR_CANT_STOP = 0x0001,
85 SCE_MODULE_ATTR_EXCLUSIVE_LOAD = 0x0002,
90 SCE_MODULE_ATTR_EXCLUSIVE_START = 0x0004,
97enum SceModulePrivilegeLevel {
99 SCE_MODULE_USER = 0x0000,
101 SCE_MODULE_MS = 0x0200,
103 SCE_MODULE_USB_WLAN = 0x0400,
105 SCE_MODULE_APP = 0x0600,
107 SCE_MODULE_VSH = 0x0800,
109 SCE_MODULE_KERNEL = 0x1000,
111 SCE_MODULE_KIRK_MEMLMD_LIB = 0x2000,
113 SCE_MODULE_KIRK_SEMAPHORE_LIB = 0x4000,
116#define SCE_MODULE_PRIVILEGE_LEVELS (SCE_MODULE_MS | SCE_MODULE_USB_WLAN | SCE_MODULE_APP | SCE_MODULE_VSH | SCE_MODULE_KERNEL)
118#define SCE_MODINFO_SECTION_NAME ".rodata.sceModuleInfo"
120#define SDK_VERSION 0x06060010
121#define SCE_SDK_VERSION(ver) const int module_sdk_version = ver
126#define SCE_KERNEL_START_SUCCESS (0)
127#define SCE_KERNEL_START_FAIL (1)
129#define SCE_KERNEL_RESIDENT (SCE_KERNEL_START_SUCCESS)
130#define SCE_KERNEL_NO_RESIDENT (SCE_KERNEL_START_FAIL)
135#define SCE_KERNEL_STOP_SUCCESS (0)
136#define SCE_KERNEL_STOP_FAIL (1)
141#define SCE_MODULE_BOOTSTART(name) int module_start(SceSize argSize, const void *argBlock) __attribute__((alias(name))); \
142 int module_bootstart(SceSize argSize, const void *argBlock) __attribute__((alias(name)))
144#define SCE_MODULE_REBOOT_BEFORE(name) int module_reboot_before(void *arg0, s32 arg1, s32 arg2, s32 arg3) __attribute__((alias(name)))
145#define SCE_MODULE_REBOOT_BEFORE_FOR_USER(name) int module_reboot_before(SceSize arglen, void *argp) __attribute__((alias(name)))
146#define SCE_MODULE_REBOOT_PHASE(name) int module_reboot_phase(s32 arg1, void *arg2, s32 arg3, s32 arg4) __attribute__((alias(name)))
147#define SCE_MODULE_STOP(name) int module_stop(SceSize argSize, const void *argBlock) __attribute__((alias(name)))
149#define SCE_MODULE_INFO(name, attributes, majorVersion, minorVersion) \
152 " .section .lib.ent.top, \"a\", @progbits\n" \
156 " .section .lib.ent.btm, \"a\", @progbits\n" \
158 "__lib_ent_bottom:\n" \
160 " .section .lib.stub.top, \"a\", @progbits\n" \
163 "__lib_stub_top:\n" \
164 " .section .lib.stub.btm, \"a\", @progbits\n" \
166 "__lib_stub_bottom:\n" \
171 extern char __lib_ent_top[], __lib_ent_bottom[]; \
172 extern char __lib_stub_top[], __lib_stub_bottom[]; \
173 const SceModuleInfo module_info \
174 __attribute__((section(SCE_MODINFO_SECTION_NAME), \
175 aligned(16), unused)) = { \
176 attributes, { minorVersion, majorVersion }, name, 0, _gp, \
177 __lib_ent_top, __lib_ent_bottom, \
178 __lib_stub_top, __lib_stub_bottom \
181#define SCE_MODULE_START_THREAD_PARAMETER(numParams, initPriority, stackSize, attr) \
182 const SceModuleEntryThread module_start_thread_parameter = { numParams, initPriority, stackSize, attr };
184#define SCE_MODULE_STOP_THREAD_PARAMETER(numParams, initPriority, stackSize, attr) \
185 const SceModuleEntryThread module_stop_thread_parameter = { numParams, initPriority, stackSize, attr };
void * stubEnd
Definition module.h:53
s8 terminal
Definition module.h:31
void * entTop
Definition module.h:38
void * gpValue
Definition module.h:33
u16 modAttribute
Definition module.h:25
void * entEnd
Definition module.h:43
void * stubTop
Definition module.h:48