uOFW
Reverse engineered PSP kernel 6.60.
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
Loadcore Module

Data Structures

struct  DirectCall
 
struct  Syscall
 
union  SceStub
 
struct  SceVariableStub
 
struct  SceResidentLibraryEntryTable
 
struct  SceStubLibraryEntryTable
 
struct  SceBootCallback
 
struct  SceStubLibrary
 
struct  SceResidentLibrary
 
struct  SceLoadCoreProtectInfo
 
struct  SceLoadCoreBootModuleInfo
 
struct  SceLoadCoreBootInfo
 
struct  SceLoadCoreExecFileInfo
 
struct  SceModule
 
struct  SceSyscallTable
 
struct  SceLoadCore
 

Macros

#define LIBRARY_VERSION_MINOR   (0)
 
#define LIBRARY_VERSION_MAJOR   (1)
 
#define LIBRARY_VERSION_NUMBER_CATEGORY_SIZE   (2)
 
#define LIBRARY_ENTRY_TABLE_OLD_LEN   (4)
 
#define LIBRARY_ENTRY_TABLE_NEW_LEN   (5)
 
#define STUB_LIBRARY_ENTRY_TABLE_OLD_LEN   (6)
 
#define STUB_LIBRARY_ENTRY_TABLE_NEW_LEN   (7)
 
#define LOADCORE_LIB_HASH_TABLE_SIZE   (128)
 
#define SCE_BOOT_CALLBACK_FUNCTION_QUEUED   (1)
 
#define SCE_PROTECT_INFO_STATE_IS_ALLOCATED   (1 << 0)
 
#define SCE_PROTECT_INFO_TYPE_FILE_NAME   (0x2)
 
#define SCE_PROTECT_INFO_TYPE_VSH_PARAM   (0x4)
 
#define SCE_PROTECT_INFO_TYPE_DISC_IMAGE   (0x40)
 
#define SCE_PROTECT_INFO_TYPE_NPDRM_DATA   (0x80)
 
#define SCE_PROTECT_INFO_TYPE_USER_PARAM   (0x100)
 
#define SCE_PROTECT_INFO_TYPE_PARAM_SFO   (0x400)
 
#define GET_PROTECT_INFO_STATE(attr)   ((u32)(attr) >> 16)
 
#define SET_PROTECT_INFO_STATE(state, src)   (((state) << 16) | (src))
 
#define REMOVE_PROTECT_INFO_STATE(state, src)   ((~((state) << 16)) & (src))
 
#define GET_PROTECT_INFO_TYPE(attr)   ((attr) & 0xFFFF)
 
#define SET_PROTECT_INFO_TYPE(type, src)   (((type) & 0xFFFF) | (src))
 
#define SCE_MODULE_USER_MODULE   (0x100)
 
#define GET_MCB_STATUS(status)   (status & 0xF)
 

Typedefs

typedef s32(* SceKernelBootCallbackFunction) (void *data, s32 arg, void *opt)
 
typedef s32(* SceKernelRebootBeforeForKernel) (void *arg1, s32 arg2, s32 arg3, s32 arg4)
 
typedef struct SceStubLibrary SceStubLibrary
 
typedef struct SceResidentLibrary SceResidentLibrary
 
typedef struct SceModule SceModule
 
typedef struct SceSyscallTable SceSyscallTable
 

Enumerations

enum  SceExecFileAttr { SCE_EXEC_FILE_COMPRESSED = 0x1 , SCE_EXEC_FILE_ELF = 0x2 , SCE_EXEC_FILE_GZIP_OVERLAP = 0x8 , SCE_EXEC_FILE_KL4E_COMPRESSED = 0x200 }
 
enum  SceExecFileModeAttr { SCE_EXEC_FILE_DECRYPT = 0 , SCE_EXEC_FILE_NO_HEADER_COMPRESSION = 1 , SCE_EXEC_FILE_NO_COMPRESSION = 2 }
 
enum  SceExecFileElfType { SCE_EXEC_FILE_TYPE_INVALID_ELF = -1 , SCE_EXEC_FILE_TYPE_PRX = 1 , SCE_EXEC_FILE_TYPE_PRX_2 = 2 , SCE_EXEC_FILE_TYPE_ELF = 3 }
 
enum  SceLibAttr {
  SCE_LIB_NO_SPECIAL_ATTR = 0x0 , SCE_LIB_AUTO_EXPORT = 0x1 , SCE_LIB_WEAK_EXPORT = 0x2 , SCE_LIB_NOLINK_EXPORT = 0x4 ,
  SCE_LIB_WEAK_IMPORT = 0x8 , SCE_LIB_SYSCALL_EXPORT = 0x4000 , SCE_LIB_IS_SYSLIB = 0x8000
}
 

Functions

s32 sceKernelRegisterLibrary (SceResidentLibraryEntryTable *libEntryTable)
 
s32 sceKernelCanReleaseLibrary (SceResidentLibraryEntryTable *libEntryTable)
 
s32 sceKernelLinkLibraryEntries (SceStubLibraryEntryTable *libStubTable, u32 size)
 
s32 sceKernelUnlinkLibraryEntries (SceStubLibraryEntryTable *libStubTable, u32 size)
 
s32 sceKernelLoadModuleBootLoadCore (SceLoadCoreBootModuleInfo *bootModInfo, SceLoadCoreExecFileInfo *execInfo, SceUID *modMemId)
 
s32 sceKernelLoadCoreLock (void)
 
void sceKernelLoadCoreUnlock (s32 intrState)
 
s32 sceKernelRegisterLibraryForUser (SceResidentLibraryEntryTable *libEntryTable)
 
s32 sceKernelReleaseLibrary (SceResidentLibraryEntryTable *libEntryTable)
 
s32 sceKernelLinkLibraryEntriesForUser (SceStubLibraryEntryTable *libStubTable, u32 size)
 
s32 sceKernelLinkLibraryEntriesWithModule (SceModule *mod, SceStubLibraryEntryTable *libStubTable, u32 size)
 
u32 sceKernelMaskLibraryEntries (void)
 
SceLoadCoresceKernelQueryLoadCoreCB (void)
 
s32 sceKernelSetBootCallbackLevel (SceKernelBootCallbackFunction bootCBFunc, u32 flag, s32 *status)
 
u32 sceKernelLoadCoreMode (void)
 
s32 sceKernelCheckPspConfig (u8 *file, u32 size)
 
s32 sceKernelLoadRebootBin (u8 *file, u32 size)
 
s32 sceKernelSegmentChecksum (SceModule *mod)
 
s32 sceKernelCheckExecFile (u8 *buf, SceLoadCoreExecFileInfo *execInfo)
 
s32 sceKernelProbeExecutableObject (u8 *buf, SceLoadCoreExecFileInfo *execInfo)
 
s32 sceKernelLoadExecutableObject (u8 *buf, SceLoadCoreExecFileInfo *execInfo)
 
SceModulesceKernelCreateModule (void)
 
s32 sceKernelAssignModule (SceModule *mod, SceLoadCoreExecFileInfo *execFileInfo)
 
s32 sceKernelReleaseModule (SceModule *mod)
 
s32 sceKernelGetModuleIdListForKernel (SceUID *modIdList, u32 size, u32 *modCount, u32 userModsOnly)
 
SceModulesceKernelGetModuleFromUID (SceUID uid)
 
s32 sceKernelDeleteModule (SceModule *mod)
 
SceModulesceKernelCreateAssignModule (SceLoadCoreExecFileInfo *execFileInfo)
 
s32 sceKernelRegisterModule (SceModule *mod)
 
SceModulesceKernelFindModuleByName (const char *name)
 
SceModulesceKernelFindModuleByAddress (u32 addr)
 
s32 sceKernelGetModuleGPByAddressForKernel (u32 addr)
 
SceModulesceKernelFindModuleByUID (SceUID uid)
 
SceUID sceKernelGetModuleListWithAlloc (u32 *modCount)
 

Detailed Description

Copyright (C) 2011, 2012, 2013 The uOFW team See the file COPYING for copying permission.
Module loader and library import/export manager.


Macro Definition Documentation

◆ LIBRARY_VERSION_MINOR

#define LIBRARY_VERSION_MINOR   (0)

Library number category minor.

◆ LIBRARY_VERSION_MAJOR

#define LIBRARY_VERSION_MAJOR   (1)

Library number category major.

◆ LIBRARY_VERSION_NUMBER_CATEGORY_SIZE

#define LIBRARY_VERSION_NUMBER_CATEGORY_SIZE   (2)

Current number category size for libraries.

◆ LIBRARY_ENTRY_TABLE_OLD_LEN

#define LIBRARY_ENTRY_TABLE_OLD_LEN   (4)

The length of the old resident library entry table format (without the members unk16 - uk19).

◆ LIBRARY_ENTRY_TABLE_NEW_LEN

#define LIBRARY_ENTRY_TABLE_NEW_LEN   (5)

The length of the new resident library entry table format (including the members unk16 - unk19).

◆ STUB_LIBRARY_ENTRY_TABLE_OLD_LEN

#define STUB_LIBRARY_ENTRY_TABLE_OLD_LEN   (6)

The length of the old stub library entry table format (without the member unk24).

◆ STUB_LIBRARY_ENTRY_TABLE_NEW_LEN

#define STUB_LIBRARY_ENTRY_TABLE_NEW_LEN   (7)

The length of the new stub library entry table format (including the member unk24).

◆ LOADCORE_LIB_HASH_TABLE_SIZE

#define LOADCORE_LIB_HASH_TABLE_SIZE   (128)

The possible number of libraries with different hash values.

◆ SCE_BOOT_CALLBACK_FUNCTION_QUEUED

#define SCE_BOOT_CALLBACK_FUNCTION_QUEUED   (1)

Indicates that a boot callback function was added to the internal boot callback queue.

◆ SCE_PROTECT_INFO_STATE_IS_ALLOCATED

#define SCE_PROTECT_INFO_STATE_IS_ALLOCATED   (1 << 0)

The protected information block is allocated.

◆ SCE_PROTECT_INFO_TYPE_FILE_NAME

#define SCE_PROTECT_INFO_TYPE_FILE_NAME   (0x2)

Indicates the type of the protected information block is a file name.

◆ SCE_PROTECT_INFO_TYPE_VSH_PARAM

#define SCE_PROTECT_INFO_TYPE_VSH_PARAM   (0x4)

Indicates the type of the protected information block is a VSH param.

◆ SCE_PROTECT_INFO_TYPE_DISC_IMAGE

#define SCE_PROTECT_INFO_TYPE_DISC_IMAGE   (0x40)

Indicates the type of the protected information block is a disc image.

◆ SCE_PROTECT_INFO_TYPE_NPDRM_DATA

#define SCE_PROTECT_INFO_TYPE_NPDRM_DATA   (0x80)

Indicates protected information block belongs to a NPDRM package.

◆ SCE_PROTECT_INFO_TYPE_USER_PARAM

#define SCE_PROTECT_INFO_TYPE_USER_PARAM   (0x100)

Indicates the type of the protected information block is a user param.

◆ SCE_PROTECT_INFO_TYPE_PARAM_SFO

#define SCE_PROTECT_INFO_TYPE_PARAM_SFO   (0x400)

Indicates the type of the protected information block is a param.sfo.

◆ GET_PROTECT_INFO_STATE

#define GET_PROTECT_INFO_STATE (   attr)    ((u32)(attr) >> 16)

Get the state of a protected information block.

Parameters
attrSceLoadCoreProtectInfo.attr

◆ SET_PROTECT_INFO_STATE

#define SET_PROTECT_INFO_STATE (   state,
  src 
)    (((state) << 16) | (src))

Set a new state of a protected information block.

Parameters
stateThe new state to set.
srcSceLoadCoreProtectInfo.attr

◆ REMOVE_PROTECT_INFO_STATE

#define REMOVE_PROTECT_INFO_STATE (   state,
  src 
)    ((~((state) << 16)) & (src))

Remove a state entry of a protected information block.

Parameters
stateThe state entry to remove.
srcSceLoadCoreProtectInfo.attr

◆ GET_PROTECT_INFO_TYPE

#define GET_PROTECT_INFO_TYPE (   attr)    ((attr) & 0xFFFF)

Get the type of a protected information block.

Parameters
attrSceLoadCoreProtectInfo.attr

◆ SET_PROTECT_INFO_TYPE

#define SET_PROTECT_INFO_TYPE (   type,
  src 
)    (((type) & 0xFFFF) | (src))

Set the type of a protected information block.

Parameters
typeThe new type to set.
srcSceLoadCoreProtectInfo.attr

◆ SCE_MODULE_USER_MODULE

#define SCE_MODULE_USER_MODULE   (0x100)

◆ GET_MCB_STATUS

#define GET_MCB_STATUS (   status)    (status & 0xF)

Typedef Documentation

◆ SceKernelBootCallbackFunction

typedef s32(* SceKernelBootCallbackFunction) (void *data, s32 arg, void *opt)

Boot Callback function.

◆ SceKernelRebootBeforeForKernel

typedef s32(* SceKernelRebootBeforeForKernel) (void *arg1, s32 arg2, s32 arg3, s32 arg4)

Reboot preparation functions

◆ SceStubLibrary

This structure represents a stub library control block. This control block is used to manage a stub library entry table internal.

◆ SceResidentLibrary

This structure represents a resident library control block. This control block is used to manage a resident library entry table registered to the system.

◆ SceModule

typedef struct SceModule SceModule

The SceModule structure represents a loaded module in memory.

◆ SceSyscallTable

This structure represents a system call table. Such a table takes care of the exported system calls registered to the system.

Enumeration Type Documentation

◆ SceExecFileAttr

Executable File Attributes.

Enumerator
SCE_EXEC_FILE_COMPRESSED 

The file is compressed. If SCE_EXEC_FILE_KL4E_COMPRESSED is not set, the file is GZIP compressed.

SCE_EXEC_FILE_ELF 

The file is a static ELF.

SCE_EXEC_FILE_GZIP_OVERLAP 

The file has GZIP overlap.

SCE_EXEC_FILE_KL4E_COMPRESSED 

The file is KL4E compressed.

◆ SceExecFileModeAttr

Executable File Mode Attributes.

Enumerator
SCE_EXEC_FILE_DECRYPT 

The file is decrypted.

SCE_EXEC_FILE_NO_HEADER_COMPRESSION 

The file header is not compressed.

SCE_EXEC_FILE_NO_COMPRESSION 

The file is not compressed.

◆ SceExecFileElfType

The possible ELF type of an executable.

Enumerator
SCE_EXEC_FILE_TYPE_INVALID_ELF 

The executable file is not an ELF. Such a file cannot be loaded.

SCE_EXEC_FILE_TYPE_PRX 

The executable file is a PRX, a relocatable ELF.

SCE_EXEC_FILE_TYPE_PRX_2 

The executable file is a PRX, a relocatable ELF.

SCE_EXEC_FILE_TYPE_ELF 

The executable file is a static ELF.

◆ SceLibAttr

enum SceLibAttr

Resident/Stub library attributes. Several members can be bitwise OR'ed together. Every library needs to have at least one of those attributes. Resident libraries can have the members SCE_LIB_AUTO_EXPORT, SCE_LIB_WEAK_EXPORT, (SCE_LIB_NOLINK_EXPORT), SCE_LIB_SYSCALL_EXPORT and SCE_LIB_IS_SYSLIB. Stub libraries can have SCE_LIB_NO_SPECIAL_ATTR or SCE_LIB_WEAK_IMPORT.

Enumerator
SCE_LIB_NO_SPECIAL_ATTR 

The library has no special attributes.

SCE_LIB_AUTO_EXPORT 

Automatically register the library to the system.

SCE_LIB_WEAK_EXPORT 

Indicates resident library can be overwritten.

SCE_LIB_NOLINK_EXPORT 

Indicates resident library is NOT being linked.

SCE_LIB_WEAK_IMPORT 

Load module that references this library even if this library is not registered.

SCE_LIB_SYSCALL_EXPORT 

Indicates the use of the SYSCALL technique for linking.

SCE_LIB_IS_SYSLIB 

The library is a system library (a mandatory library for all modules).

Function Documentation

◆ sceKernelRegisterLibrary()

s32 sceKernelRegisterLibrary ( SceResidentLibraryEntryTable libEntryTable)

Register a resident library's entry table in the system. A resident module can register any number of resident libraries. Note that this function is only meant to register kernel mode resident libraries. In order to register user mode libraries, use sceKernelRegisterLibraryForUser().

Parameters
libEntryTablePointer to the resident library's entry table.
Returns
0 on success.

◆ sceKernelCanReleaseLibrary()

s32 sceKernelCanReleaseLibrary ( SceResidentLibraryEntryTable libEntryTable)

Check if a resident library can be released. This check returns "true" when all corresponding stub libraries at the time of the check have one the following status: a) unlinked b) have the the attribute SCE_LIB_WEAK_IMPORT (they can exist without the resident library being registered).

Parameters
libEntryTablePointer to the resident library's entry table.
Returns
0 indicates the library can be released.

◆ sceKernelLinkLibraryEntries()

s32 sceKernelLinkLibraryEntries ( SceStubLibraryEntryTable libStubTable,
u32  size 
)

Link kernel mode stub libraries with the corresponding registered resident libraries. Note that this function assumes that the resident libraries linked with reside in kernel memory. Linking with user mode resident libraries will result in failure.

Parameters
libStubTablePointer to a stub library's entry table. If you want to link an array of entry tables, make libStubTable a pointer to the first element of that array.
sizeThe number of entry tables to link.
Returns
0 on success.

◆ sceKernelUnlinkLibraryEntries()

s32 sceKernelUnlinkLibraryEntries ( SceStubLibraryEntryTable libStubTable,
u32  size 
)

Unlink stub libraries from their corresponding registered resident libraries.

Parameters
libStubTablePointer to a stub library's entry table. If you want to unlink an array of entry tables, make libStubTable a pointer to the first element of that array.
sizeThe number of entry tables to unlink.
Returns

◆ sceKernelLoadModuleBootLoadCore()

s32 sceKernelLoadModuleBootLoadCore ( SceLoadCoreBootModuleInfo bootModInfo,
SceLoadCoreExecFileInfo execInfo,
SceUID *  modMemId 
)

Load a module. This function is used to boot modules during the start of Loadcore. In order for a module to be loaded, it has to be a kernel module.

Parameters
bootModInfoPointer to module information (including the file content of the module, its size,...) used to boot the module.
execInfoPointer an allocated execInfo structure used to handle load-checks against the program module. Furthermore, it collects various information about the module, such as its elfType, its segments (.text, .data, .bss), the locations of its exported functions.
modMemIdThe memory id of the allocated kernelPRX memory block used for the program module sections. The memory block specified by the ID holds the .text segment of the module.
Returns
0 on success.

◆ sceKernelLoadCoreLock()

s32 sceKernelLoadCoreLock ( void  )

Save interrupts state and disable all interrupts.

Returns
The current state of the interrupt controller. Use sceKernelLoadCoreUnlock() to return to that state.

◆ sceKernelLoadCoreUnlock()

void sceKernelLoadCoreUnlock ( s32  intrState)

Return interrupt state.

Parameters
intrStateThe state acquired by sceKernelLoadCoreLock().

◆ sceKernelRegisterLibraryForUser()

s32 sceKernelRegisterLibraryForUser ( SceResidentLibraryEntryTable libEntryTable)

Register a user mode resident library's entry table in the system. A resident module can register any number of resident libraries. In order to register kernel mode libraries, use sceKernelRegisterLibrary().

Restrictions on user mode resident libraries: 1) The resident library has to live in user memory. 2) Functions cannot be exported via the SYSCALL technique. 3) The resident library cannot be linked with stub libraries living in kernel memory.

Parameters
libEntryTablePointer to the resident library's entry table.
Returns
0 on success.

◆ sceKernelReleaseLibrary()

s32 sceKernelReleaseLibrary ( SceResidentLibraryEntryTable libEntryTable)

Delete a registered resident library from the system. Deletion cannot be performed if there are loaded modules using the resident library. These modules must be deleted first.

Parameters
libEntryTablePointer to the resident library's entry table.
Returns
0 on success.

◆ sceKernelLinkLibraryEntriesForUser()

s32 sceKernelLinkLibraryEntriesForUser ( SceStubLibraryEntryTable libStubTable,
u32  size 
)
Parameters
libStubTablePointer to a stub library's entry table. If you want to link an array of entry tables, make libStubTable a pointer to the first element of that array.
sizeThe number of entry tables to link.
Returns
0 on success.

◆ sceKernelLinkLibraryEntriesWithModule()

s32 sceKernelLinkLibraryEntriesWithModule ( SceModule mod,
SceStubLibraryEntryTable libStubTable,
u32  size 
)
Parameters
modPointer to a module. Should not be NULL. The module seems not to be used for anything useful.
libStubTablePointer to a stub library's entry table. If you want to link an array of entry tables, make libStubTable a pointer to the first element of that array.
sizeThe number of entry tables to link.
Returns
0 on success.

◆ sceKernelMaskLibraryEntries()

u32 sceKernelMaskLibraryEntries ( void  )

Does nothing but a simple return.

Returns
0.

◆ sceKernelQueryLoadCoreCB()

SceLoadCore * sceKernelQueryLoadCoreCB ( void  )

Get Loadcore's control block. The block takes care of the registered libraries, the unlinked stub libraries living in memory and the currently loaded modules.

Returns
A pointer to Loadcore's internal control block.

◆ sceKernelSetBootCallbackLevel()

s32 sceKernelSetBootCallbackLevel ( SceKernelBootCallbackFunction  bootCBFunc,
u32  flag,
s32 *  status 
)

Set a boot callback. Call this function during a module boot process.

Parameters
bootCBFuncThe boot callback function to execute once the important system modules (up to init.prx) have been booted.
flagDefines the execute order of the callbacks. Pass 0 for earliest execution, 3 for latest. 1 and 2 are between these two.
statusThe returned status of bootCBFunc in case it was executed directly.
Returns
0 for directly executing the boot callback function. 1 indicates boot callback function was enqueued into other existing boot callbacks and will be called after init.prx got booted.

◆ sceKernelLoadCoreMode()

u32 sceKernelLoadCoreMode ( void  )

Does nothing but a simple return, probably a debug function.

Returns
0.

◆ sceKernelCheckPspConfig()

s32 sceKernelCheckPspConfig ( u8 *  file,
u32  size 
)

Check and decrypt a PSP configuration file.

Parameters
fileThe configuration file (i.e. pspbtcnf.bin) to decrypt.
sizeThe size of the file.
Returns
The size of the decrypted file on success.

◆ sceKernelLoadRebootBin()

s32 sceKernelLoadRebootBin ( u8 *  file,
u32  size 
)

Decrypt and load a reboot file used to boot the system. Reboot.bin is only used for kernel reboots (warm reboots only).

Parameters
fileThe reboot file to use (i.e. reboot.bin).
sizeThe size of the file
Returns
0 on success.

◆ sceKernelSegmentChecksum()

s32 sceKernelSegmentChecksum ( SceModule mod)

Compute a checksum of every segment of a module.

Parameters
modThe module to create the checksum for.
Returns
The checksum. Shouldn't be 0.

◆ sceKernelCheckExecFile()

s32 sceKernelCheckExecFile ( u8 *  buf,
SceLoadCoreExecFileInfo execInfo 
)

Check an executable file. This contains scanning its ELF header and ~PSP header (if it has one) and filling the execInfo structure with basic information, like the ELF type, segment information, the size of the executable. The file is also uncompressed, if it was compressed before.

Parameters
bufPointer to the file's contents.
execInfoPointer to the executionInfo belonging to that executable.
Returns
0 on success.

◆ sceKernelProbeExecutableObject()

s32 sceKernelProbeExecutableObject ( u8 *  buf,
SceLoadCoreExecFileInfo execInfo 
)

Probe an executable file. This contains calculating the sizes for the three segments TEXT, DATA and BSS, filling the execInfo structure with information about the location and sizes of the resident/stub library entry tables. Furthermore, it is checked whether the executable has valid API type or not.

Parameters
bufPointer to the file's contents.
execInfoPointer to the executionInfo belonging to that executable.
Returns
0 on success.

◆ sceKernelLoadExecutableObject()

s32 sceKernelLoadExecutableObject ( u8 *  buf,
SceLoadCoreExecFileInfo execInfo 
)

Load an executable file. This contains allocating s memory block containing the three segments TEXT, DATA and BSS (in case the executable consists of only these three sections). Furthermore, relocation of the executable file, if needed, is also taken care off.

Parameters
bufPointer to the file's contents.
execInfoPointer to the executionInfo belonging to that executable.
Returns
0 on success.

◆ sceKernelCreateModule()

SceModule * sceKernelCreateModule ( void  )

Allocate memory for a new SceModule structure and fill it with default values. This function is called during the loading process of a module.

Returns
A pointer to the allocated SceModule structure on success, otherwise NULL.

◆ sceKernelAssignModule()

s32 sceKernelAssignModule ( SceModule mod,
SceLoadCoreExecFileInfo execFileInfo 
)

Assign a module and check if it can be loaded, is a valid module and copy the moduleInfo section of the execution file over to the SceModule structure.

Parameters
modThe module to receive the moduleInfo section data based on the provided execution file information.
execFileInfoThe execution file information used to copy over the moduleInfo section for the specified module.
Returns
0 on success.

◆ sceKernelReleaseModule()

s32 sceKernelReleaseModule ( SceModule mod)

Unlink a module from the internal loaded-modules-linked-list. The module has to be stopped before.

Parameters
modThe module to release.
Returns
0 on success.

◆ sceKernelGetModuleIdListForKernel()

s32 sceKernelGetModuleIdListForKernel ( SceUID *  modIdList,
u32  size,
u32 *  modCount,
u32  userModsOnly 
)

Receive a list of UIDs of loaded modules.

Parameters
modIdListPointer to a SceUID array which will receive the UIDs of the loaded modules.
sizeSize of modIdList. Specifies the number of entries that can be stored into modIdList.
modCountA pointer which will receive the total number of loaded modules.
userModsOnlySet to 1 to only receive UIDs from user mode modules. Set to 0 to receive UIDs from all loaded modules.
Returns
0 on success.

◆ sceKernelGetModuleFromUID()

SceModule * sceKernelGetModuleFromUID ( SceUID  uid)

Get a loaded module from its UID.

Parameters
uidThe UID (of a module) to check for.
Returns
Pointer to the found SceModule structure on success, otherwise NULL.

◆ sceKernelDeleteModule()

s32 sceKernelDeleteModule ( SceModule mod)

Delete a module from the system. The module has to be stopped and released before.

Parameters
modThe module to delete.
Returns
0 on success.

◆ sceKernelCreateAssignModule()

SceModule * sceKernelCreateAssignModule ( SceLoadCoreExecFileInfo execFileInfo)

Create and assign a module. It provides the same result as a sceKernelCreateModule() call followed by a sceKernelAssignModule() call.

Parameters
execFileInfoThe execution file information used to copy over the moduleInfo section for the specified module.
Returns
Pointer to the created SceModule structure on success, otherwise NULL.

◆ sceKernelRegisterModule()

s32 sceKernelRegisterModule ( SceModule mod)

Register a module in the system and link it into the internal loaded-modules-linked-list.

Parameters
modThe module to register.
Returns
0.

◆ sceKernelFindModuleByName()

SceModule * sceKernelFindModuleByName ( const char *  name)

Find a loaded module by its name. If more than one module with the same name is loaded, return the module which was loaded last.

Parameters
nameThe name of the module to find.
Returns
Pointer to the found SceModule structure on success, otherwise NULL.

◆ sceKernelFindModuleByAddress()

SceModule * sceKernelFindModuleByAddress ( u32  addr)

Find a loaded module containing the specified address.

Parameters
addrMemory address belonging to the module, i.e. the address of a function/global variable within the module.
Returns
Pointer to the found SceModule structure on success, otherwise NULL.

◆ sceKernelGetModuleGPByAddressForKernel()

s32 sceKernelGetModuleGPByAddressForKernel ( u32  addr)

Get the global pointer value of a module.

Parameters
addrMemory address belonging to the module, i.e. the address of a function/global variable within the module.
Returns
The global pointer value (greater than 0) of the found module on success.

◆ sceKernelFindModuleByUID()

SceModule * sceKernelFindModuleByUID ( SceUID  uid)

Find a loaded module by its UID.

Parameters
uidThe UID of the module to find.
Returns
Pointer to the found SceModule structure on success, otherwise NULL.

◆ sceKernelGetModuleListWithAlloc()

SceUID sceKernelGetModuleListWithAlloc ( u32 *  modCount)

Receive a list of UIDs of all loaded modules.

Parameters
modCountA pointer which will receive the total number of loaded modules.
Returns
The UID of the allocated array containing UIDs of the loaded modules on success. It should be greater than 0.