92 int read_buffer_length;
93 int read_buffer_offset;
95 int ring_buffer_index;
103 typedef void *(*loadfile_elf_load_alloc_buffer_from_heap_callback_t)(u32 size);
104 typedef void (*loadfile_elf_load_dealloc_buffer_from_heap_callback_t)(
void *buffer);
110 loadfile_elf_load_proc_callback_t elf_load_proc;
111 loadfile_check_valid_ee_elf_callback_t check_valid_ee_elf;
112 loadfile_elf_get_program_header_callback_t elf_get_program_header;
113 loadfile_elf_load_alloc_buffer_from_heap_callback_t elf_load_alloc_buffer_from_heap;
114 loadfile_elf_load_dealloc_buffer_from_heap_callback_t elf_load_dealloc_buffer_from_heap;
115 loadfile_load_kelf_from_card_callback_t load_kelf_from_card;
116 loadfile_load_kelf_from_disk_callback_t load_kelf_from_disk;
119 typedef void *(*SecrCardBootFile_callback_t)(
int port,
int slot,
void *buffer);
120 typedef void *(*SecrDiskBootFile_callback_t)(
void *buffer);
122 typedef int (*CheckKelfPath_callback_t)(
const char *filename,
int *port,
int *slot);
124 extern void GetModloadInternalData(
void **pInternalData);
126 extern int ReBootStart(
const char *command,
unsigned int flags);
127 extern int LoadModuleAddress(
const char *name,
void *addr,
int offset);
128 extern int LoadModule(
const char *name);
129 extern int LoadStartModule(
const char *name,
int arglen,
const char *args,
int *result);
130 extern int StartModule(
int modid,
const char *name,
int arglen,
const char *args,
int *result);
131 extern int LoadModuleBufferAddress(
void *buffer,
void *addr,
int offset);
132 extern int LoadModuleBuffer(
void *buffer);
133 extern int LoadStartKelfModule(
const char *name,
int arglen,
const char *args,
int *result);
134 extern void SetSecrmanCallbacks(SecrCardBootFile_callback_t SecrCardBootFile_fnc, SecrDiskBootFile_callback_t SecrDiskBootFile_fnc, SetLoadfileCallbacks_callback_t SetLoadfileCallbacks_fnc);
135 extern void SetCheckKelfPathCallback(CheckKelfPath_callback_t CheckKelfPath_fnc);
136 extern void GetLoadfileCallbacks(CheckKelfPath_callback_t *CheckKelfPath_fnc, SetLoadfileCallbacks_callback_t *SetLoadfileCallbacks_fnc);
137 extern int IsIllegalBootDevice(
const char *path);
139 #define modload_IMPORTS_start DECLARE_IMPORT_TABLE(modload, 1, 1)
140 #define modload_IMPORTS_end END_IMPORT_TABLE
142 #define I_GetModloadInternalData DECLARE_IMPORT(3, GetModloadInternalData);
143 #define I_ReBootStart DECLARE_IMPORT(4, ReBootStart)
144 #define I_LoadModuleAddress DECLARE_IMPORT(5, LoadModuleAddress)
145 #define I_LoadModule DECLARE_IMPORT(6, LoadModule)
146 #define I_LoadStartModule DECLARE_IMPORT(7, LoadStartModule)
147 #define I_StartModule DECLARE_IMPORT(8, StartModule)
148 #define I_LoadModuleBufferAddress DECLARE_IMPORT(9, LoadModuleBufferAddress)
149 #define I_LoadModuleBuffer DECLARE_IMPORT(10, LoadModuleBuffer)
150 #define I_LoadStartKelfModule DECLARE_IMPORT(11, LoadStartKelfModule)
151 #define I_SetSecrmanCallbacks DECLARE_IMPORT(12, SetSecrmanCallbacks)
152 #define I_SetCheckKelfPathCallback DECLARE_IMPORT(13, SetCheckKelfPathCallback)
153 #define I_GetLoadfileCallbacks DECLARE_IMPORT(14, GetLoadfileCallbacks)
154 #define I_IsIllegalBootDevice DECLARE_IMPORT(15, IsIllegalBootDevice)