sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
modload.h File Reference
#include <types.h>
#include <irx.h>

Go to the source code of this file.

Classes

struct  loadfile_elf32_ehdr_
struct  loadfile_elf32_phdr_
struct  loadfile_elf32_shdr_
struct  loadfile_file_load_handler_struct_
struct  loadfile_ee_elf_ringbuffer_content_
struct  loadfile_allocate_handler_struct_
struct  SetLoadfileCallbacks_struct_

Macros

#define modload_IMPORTS_start   DECLARE_IMPORT_TABLE(modload, 1, 1)
#define modload_IMPORTS_end   END_IMPORT_TABLE
#define I_GetModloadInternalData   DECLARE_IMPORT(3, GetModloadInternalData);
#define I_ReBootStart   DECLARE_IMPORT(4, ReBootStart)
#define I_LoadModuleAddress   DECLARE_IMPORT(5, LoadModuleAddress)
#define I_LoadModule   DECLARE_IMPORT(6, LoadModule)
#define I_LoadStartModule   DECLARE_IMPORT(7, LoadStartModule)
#define I_StartModule   DECLARE_IMPORT(8, StartModule)
#define I_LoadModuleBufferAddress   DECLARE_IMPORT(9, LoadModuleBufferAddress)
#define I_LoadModuleBuffer   DECLARE_IMPORT(10, LoadModuleBuffer)
#define I_LoadStartKelfModule   DECLARE_IMPORT(11, LoadStartKelfModule)
#define I_SetSecrmanCallbacks   DECLARE_IMPORT(12, SetSecrmanCallbacks)
#define I_SetCheckKelfPathCallback   DECLARE_IMPORT(13, SetCheckKelfPathCallback)
#define I_GetLoadfileCallbacks   DECLARE_IMPORT(14, GetLoadfileCallbacks)
#define I_IsIllegalBootDevice   DECLARE_IMPORT(15, IsIllegalBootDevice)

Typedefs

typedef struct loadfile_elf32_ehdr_ loadfile_elf32_ehdr_t
typedef struct loadfile_elf32_phdr_ loadfile_elf32_phdr_t
typedef struct loadfile_elf32_shdr_ loadfile_elf32_shdr_t
typedef struct loadfile_file_load_handler_struct_ loadfile_file_load_handler_struct_t
typedef struct loadfile_ee_elf_ringbuffer_content_ loadfile_ee_elf_ringbuffer_content_t
typedef struct loadfile_allocate_handler_struct_ loadfile_allocate_handler_struct_t
typedef int(*) loadfile_read_chunk_callback_t(int fd, loadfile_allocate_handler_struct_t *allocate_info, void *read_callback_userdata)
typedef int(*) loadfile_elf_load_proc_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs, void *read_callback_userdata, loadfile_read_chunk_callback_t read_callback)
typedef int(*) loadfile_check_valid_ee_elf_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs)
typedef int(*) loadfile_elf_get_program_header_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs)
typedef void *(*) loadfile_elf_load_alloc_buffer_from_heap_callback_t(u32 size)
typedef void(*) loadfile_elf_load_dealloc_buffer_from_heap_callback_t(void *buffer)
typedef int(*) loadfile_load_kelf_from_card_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs, int port, int slot, int *result_out, int *result_module_out)
typedef int(*) loadfile_load_kelf_from_disk_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs, int *result_out, int *result_module_out)
typedef struct SetLoadfileCallbacks_struct_ SetLoadfileCallbacks_struct_t
typedef void *(*) SecrCardBootFile_callback_t(int port, int slot, void *buffer)
typedef void *(*) SecrDiskBootFile_callback_t(void *buffer)
typedef void(*) SetLoadfileCallbacks_callback_t(SetLoadfileCallbacks_struct_t *callbackinfo)
typedef int(*) CheckKelfPath_callback_t(const char *filename, int *port, int *slot)

Functions

void GetModloadInternalData (void **pInternalData)
int ReBootStart (const char *command, unsigned int flags)
int LoadModuleAddress (const char *name, void *addr, int offset)
int LoadModule (const char *name)
int LoadStartModule (const char *name, int arglen, const char *args, int *result)
int StartModule (int modid, const char *name, int arglen, const char *args, int *result)
int LoadModuleBufferAddress (void *buffer, void *addr, int offset)
int LoadModuleBuffer (void *buffer)
int LoadStartKelfModule (const char *name, int arglen, const char *args, int *result)
void SetSecrmanCallbacks (SecrCardBootFile_callback_t SecrCardBootFile_fnc, SecrDiskBootFile_callback_t SecrDiskBootFile_fnc, SetLoadfileCallbacks_callback_t SetLoadfileCallbacks_fnc)
void SetCheckKelfPathCallback (CheckKelfPath_callback_t CheckKelfPath_fnc)
void GetLoadfileCallbacks (CheckKelfPath_callback_t *CheckKelfPath_fnc, SetLoadfileCallbacks_callback_t *SetLoadfileCallbacks_fnc)
int IsIllegalBootDevice (const char *path)

Detailed Description

Kernel module loader.

Definition in file modload.h.

Macro Definition Documentation

◆ I_GetLoadfileCallbacks

#define I_GetLoadfileCallbacks   DECLARE_IMPORT(14, GetLoadfileCallbacks)

Definition at line 154 of file modload.h.

◆ I_GetModloadInternalData

#define I_GetModloadInternalData   DECLARE_IMPORT(3, GetModloadInternalData);

Definition at line 143 of file modload.h.

◆ I_IsIllegalBootDevice

#define I_IsIllegalBootDevice   DECLARE_IMPORT(15, IsIllegalBootDevice)

Definition at line 155 of file modload.h.

◆ I_LoadModule

#define I_LoadModule   DECLARE_IMPORT(6, LoadModule)

Definition at line 146 of file modload.h.

◆ I_LoadModuleAddress

#define I_LoadModuleAddress   DECLARE_IMPORT(5, LoadModuleAddress)

Definition at line 145 of file modload.h.

◆ I_LoadModuleBuffer

#define I_LoadModuleBuffer   DECLARE_IMPORT(10, LoadModuleBuffer)

Definition at line 150 of file modload.h.

◆ I_LoadModuleBufferAddress

#define I_LoadModuleBufferAddress   DECLARE_IMPORT(9, LoadModuleBufferAddress)

Definition at line 149 of file modload.h.

◆ I_LoadStartKelfModule

#define I_LoadStartKelfModule   DECLARE_IMPORT(11, LoadStartKelfModule)

Definition at line 151 of file modload.h.

◆ I_LoadStartModule

#define I_LoadStartModule   DECLARE_IMPORT(7, LoadStartModule)

Definition at line 147 of file modload.h.

◆ I_ReBootStart

#define I_ReBootStart   DECLARE_IMPORT(4, ReBootStart)

Definition at line 144 of file modload.h.

◆ I_SetCheckKelfPathCallback

#define I_SetCheckKelfPathCallback   DECLARE_IMPORT(13, SetCheckKelfPathCallback)

Definition at line 153 of file modload.h.

◆ I_SetSecrmanCallbacks

#define I_SetSecrmanCallbacks   DECLARE_IMPORT(12, SetSecrmanCallbacks)

Definition at line 152 of file modload.h.

◆ I_StartModule

#define I_StartModule   DECLARE_IMPORT(8, StartModule)

Definition at line 148 of file modload.h.

◆ modload_IMPORTS_end

#define modload_IMPORTS_end   END_IMPORT_TABLE

Definition at line 141 of file modload.h.

◆ modload_IMPORTS_start

#define modload_IMPORTS_start   DECLARE_IMPORT_TABLE(modload, 1, 1)

Definition at line 140 of file modload.h.

Typedef Documentation

◆ CheckKelfPath_callback_t

typedef int(*) CheckKelfPath_callback_t(const char *filename, int *port, int *slot)

Definition at line 123 of file modload.h.

◆ loadfile_check_valid_ee_elf_callback_t

typedef int(*) loadfile_check_valid_ee_elf_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs)

Definition at line 102 of file modload.h.

◆ loadfile_elf_get_program_header_callback_t

typedef int(*) loadfile_elf_get_program_header_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs)

Definition at line 103 of file modload.h.

◆ loadfile_elf_load_alloc_buffer_from_heap_callback_t

typedef void *(*) loadfile_elf_load_alloc_buffer_from_heap_callback_t(u32 size)

Definition at line 104 of file modload.h.

◆ loadfile_elf_load_dealloc_buffer_from_heap_callback_t

typedef void(*) loadfile_elf_load_dealloc_buffer_from_heap_callback_t(void *buffer)

Definition at line 105 of file modload.h.

◆ loadfile_elf_load_proc_callback_t

typedef int(*) loadfile_elf_load_proc_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs, void *read_callback_userdata, loadfile_read_chunk_callback_t read_callback)

Definition at line 101 of file modload.h.

◆ loadfile_load_kelf_from_card_callback_t

typedef int(*) loadfile_load_kelf_from_card_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs, int port, int slot, int *result_out, int *result_module_out)

Definition at line 106 of file modload.h.

◆ loadfile_load_kelf_from_disk_callback_t

typedef int(*) loadfile_load_kelf_from_disk_callback_t(loadfile_allocate_handler_struct_t *allocate_info, loadfile_file_load_handler_struct_t *flhs, int *result_out, int *result_module_out)

Definition at line 107 of file modload.h.

◆ loadfile_read_chunk_callback_t

typedef int(*) loadfile_read_chunk_callback_t(int fd, loadfile_allocate_handler_struct_t *allocate_info, void *read_callback_userdata)

Definition at line 100 of file modload.h.

◆ SecrCardBootFile_callback_t

typedef void *(*) SecrCardBootFile_callback_t(int port, int slot, void *buffer)

Definition at line 120 of file modload.h.

◆ SecrDiskBootFile_callback_t

typedef void *(*) SecrDiskBootFile_callback_t(void *buffer)

Definition at line 121 of file modload.h.

◆ SetLoadfileCallbacks_callback_t

typedef void(*) SetLoadfileCallbacks_callback_t(SetLoadfileCallbacks_struct_t *callbackinfo)

Definition at line 122 of file modload.h.

Function Documentation

◆ GetLoadfileCallbacks()

void GetLoadfileCallbacks ( CheckKelfPath_callback_t * CheckKelfPath_fnc,
SetLoadfileCallbacks_callback_t * SetLoadfileCallbacks_fnc )
extern

Definition at line 1933 of file modload.c.

◆ GetModloadInternalData()

void GetModloadInternalData ( void ** pInternalData)
extern

Definition at line 737 of file modload.c.

◆ IsIllegalBootDevice()

int IsIllegalBootDevice ( const char * path)
extern

Definition at line 1250 of file modload.c.

◆ LoadModule()

int LoadModule ( const char * name)
extern

Definition at line 408 of file modload.c.

◆ LoadModuleAddress()

int LoadModuleAddress ( const char * name,
void * addr,
int offset )
extern

Definition at line 389 of file modload.c.

◆ LoadModuleBuffer()

int LoadModuleBuffer ( void * buffer)
extern

Definition at line 430 of file modload.c.

◆ LoadModuleBufferAddress()

int LoadModuleBufferAddress ( void * buffer,
void * addr,
int offset )
extern

Definition at line 413 of file modload.c.

◆ LoadStartKelfModule()

int LoadStartKelfModule ( const char * name,
int arglen,
const char * args,
int * result )
extern

Definition at line 615 of file modload.c.

◆ LoadStartModule()

int LoadStartModule ( const char * name,
int arglen,
const char * args,
int * result )
extern

Definition at line 435 of file modload.c.

◆ ReBootStart()

int ReBootStart ( const char * command,
unsigned int flags )
extern

Definition at line 2104 of file modload.c.

◆ SetCheckKelfPathCallback()

void SetCheckKelfPathCallback ( CheckKelfPath_callback_t CheckKelfPath_fnc)
extern

Definition at line 1928 of file modload.c.

◆ SetSecrmanCallbacks()

void SetSecrmanCallbacks ( SecrCardBootFile_callback_t SecrCardBootFile_fnc,
SecrDiskBootFile_callback_t SecrDiskBootFile_fnc,
SetLoadfileCallbacks_callback_t SetLoadfileCallbacks_fnc )
extern

Definition at line 1918 of file modload.c.

◆ StartModule()

int StartModule ( int modid,
const char * name,
int arglen,
const char * args,
int * result )
extern

Definition at line 454 of file modload.c.