sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
iopmgr - IOP Manager

Functions

void list_all_libraries ()
void list_all_modules ()
void list_devices_ioman ()
void list_devices_iomanx ()
void list_fs_devices (int mgrtype)
void cmdline_handle (char *command, char *arg1)
iop_device_t * iopmgr_get_iomandev (char *device)
iop_device_t * iopmgr_get_iomanxdev (char *device)
int iopmgr_get_devicelist (int man, int devtype, char *buffer)
iop_device_t * iopmgr_get_device (char *device)
int iopmgr_get_devicetype (char *device)
int _start (int argc, char *argv[])
int shutdown ()
iop_library_t * slib_get_lib_by_name (const char *name)
void * slib_get_exportlist_by_name (const char *name)
int slib_get_version_by_name (const char *name)
int slib_release_library (const char *name)
ModuleInfo_t * smod_get_next_mod (ModuleInfo_t *cur_mod)
ModuleInfo_t * smod_get_mod_by_name (const char *name)
int smod_get_modcount_by_name (const char *name)
int smod_get_modversion_by_name (const char *name)
int smod_unload_module (const char *name)

Detailed Description

Function Documentation

◆ _start()

int _start ( int argc,
char * argv[] )

Entry point for IRX.

if argc <= 1 , install as library. if argc > 1 , run given command in argv[1].

Parameters
argcNumber of arguments.
argvPointer to array of arguments.
Returns
Module Status on Exit.

return values: MODULE_RESIDENT_END if loaded and registered as library. MODULE_NO_RESIDENT_END if just exiting normally.

Definition at line 46 of file main.c.

◆ cmdline_handle()

void cmdline_handle ( char * command,
char * arg1 )

Handles basic parsing of commands, for command execution mode.

Parameters
commandPointer to command string.

Definition at line 161 of file commandline.c.

◆ iopmgr_get_device()

iop_device_t * iopmgr_get_device ( char * device)

Get a pointer to a device of either type

Parameters
deviceStringname of device (eg "host).
Returns
Pointer to device structure.

return values: 0 if not found. pointer to device structure for named driver if found.

Definition at line 163 of file devices.c.

◆ iopmgr_get_devicelist()

int iopmgr_get_devicelist ( int man,
int devtype,
char * buffer )

Get a list of devices of a certain type

Parameters
manDevice manager mask (IOPMGR_DEVTYPE_IOMAN or IOPMGR_DEVTYPE_IOMANX).
devtypeDevice type mask (0x10 for filesystems).
Returns
Number of devices found

return values: 0 if no matching devices found device count, if found, and buffer buffer filled with ascii serial string of device names.

Definition at line 102 of file devices.c.

◆ iopmgr_get_devicetype()

int iopmgr_get_devicetype ( char * device)

Returns which i/o manager handles the given device.

Parameters
deviceStringname of device (eg "host).
Returns
numeric value for i/o manager.

return values: IOPMGR_DEVTYPE_INVALID if not found, IOPMGR_DEVTYPE_IOMAN if found and ioman device, IOPMGR_DEVTYPE_IOMANX if found and iomanx device.

Definition at line 184 of file devices.c.

◆ iopmgr_get_iomandev()

iop_device_t * iopmgr_get_iomandev ( char * device)

Get a pointer to an ioman device handler.

Parameters
deviceStringname of device (eg "host").
Returns
Pointer to device structure.

return values: 0 if not found. pointer to device structure for named driver if found.

Definition at line 34 of file devices.c.

◆ iopmgr_get_iomanxdev()

iop_device_t * iopmgr_get_iomanxdev ( char * device)

Get a pointer to an iomanx device handler.

Parameters
deviceStringname of device (eg "hdd").
Returns
Pointer to device structure.

return values: 0 if not found. pointer to device structure for named driver if found.

Definition at line 67 of file devices.c.

◆ list_all_libraries()

void list_all_libraries ( )

Prints out a list of all currently registered libraries with their name and version.

Definition at line 28 of file commandline.c.

◆ list_all_modules()

void list_all_modules ( )

Prints out a list of all currently loaded IRX modules with description and version number.

Definition at line 52 of file commandline.c.

◆ list_devices_ioman()

void list_devices_ioman ( )

Print out all devices for ONLY ioman and shows which one they belong to.

Definition at line 69 of file commandline.c.

◆ list_devices_iomanx()

void list_devices_iomanx ( )

Print out all devices for ONLY iomanx and shows which one they belong to.

Definition at line 99 of file commandline.c.

◆ list_fs_devices()

void list_fs_devices ( int mgrtype)

Print out all devices for both ioman and iomanx and shows which one they belong to.

Parameters
mgrtypeDevice manager type search mask (IOPMGR_DEVTYPE_XXXX).

Definition at line 131 of file commandline.c.

◆ shutdown()

int shutdown ( void )

shutdown the IRX.

This checks if the library is registered, if it is then it unregisters it.

Returns
Module Status on Exit.

return values: MODULE_RESIDENT_END if loaded and registered as library. MODULE_NO_RESIDENT_END if just exiting normally.

Definition at line 99 of file main.c.

◆ slib_get_exportlist_by_name()

void * slib_get_exportlist_by_name ( const char * name)

Get pointer to export list for named library.

Parameters
nameStringname of library (eg "ioman").
Returns
Pointer to export list.

return values: 0 if not found. pointer to export list for registered library if found.

Definition at line 62 of file slib.c.

◆ slib_get_lib_by_name()

iop_library_t * slib_get_lib_by_name ( const char * name)

Get pointer to system library structure for named library.

Parameters
nameStringname of library (eg "ioman").
Returns
Pointer to IOP library structure.

return values: 0 if not found. pointer to library structure for registered library if found.

Definition at line 37 of file slib.c.

◆ slib_get_version_by_name()

int slib_get_version_by_name ( const char * name)

Get version number for named library.

Parameters
nameStringname of library (eg "ioman").
Returns
version number.

return values: 0 if not found. Version number for registered library if found. (0xXXYY, XX=HIGH, YY=LOW)

Definition at line 82 of file slib.c.

◆ slib_release_library()

int slib_release_library ( const char * name)

Release (Unregister) a given named registered library.

Parameters
nameStringname of library (eg "ioman").
Returns
Status of operation.

return values: 0 if found and sucessfully unregistered. -1 if found, but failed to unregister. -2 if library was not found.

Definition at line 103 of file slib.c.

◆ smod_get_mod_by_name()

ModuleInfo_t * smod_get_mod_by_name ( const char * name)

Get pointer to module structure for named module.

Parameters
nameStringname of module (eg "atad_driver").
Returns
Pointer to module structure.

return values: 0 if not found. pointer to module structure for loaded module if found.

Definition at line 63 of file smod.c.

◆ smod_get_modcount_by_name()

int smod_get_modcount_by_name ( const char * name)

Get instance count for given module name.

Parameters
nameStringname of module (eg "atad_driver").
Returns
Number of instances loaded.

NOTE: if doing this to check for own module, the run being used to check automatically adds one to the count.. so ret=2 means another, instance loaded as well as current one.

Definition at line 88 of file smod.c.

◆ smod_get_modversion_by_name()

int smod_get_modversion_by_name ( const char * name)

Get version number for given module name.

Parameters
nameStringname of module (eg "atad_driver").
Returns
Version number.

return values: 0 if not found. Version number for module if found. (0xXXYY, XX=HIGH, YY=LOW)

Definition at line 115 of file smod.c.

◆ smod_get_next_mod()

ModuleInfo_t * smod_get_next_mod ( ModuleInfo_t * cur_mod)

Get pointer to head of module list, or next module in list.

Parameters
cur_modPointer to module structure, or 0 to return the head.
Returns
Pointer to module structure.

return values: 0 if end of list. pointer to head of module list if cur_mod=0. pointer to next module, if cur_mod!=0.

Definition at line 39 of file smod.c.

◆ smod_unload_module()

int smod_unload_module ( const char * name)

Unload the named module.

Parameters
nameStringname of module (eg "atad_driver").
Returns
Status of operation.

return values: 0 if found and sucessfully unloaded. -1 if found, but failed to unload. -2 if module was not found.

Definition at line 136 of file smod.c.