PSPSDK 2025-09-30
Loading...
Searching...
No Matches

Describes a loaded module in memory. More...

#include <kernel/psploadcore.h>

Collaboration diagram for SceModule:

Data Fields

struct SceModulenext
 Pointer to the next registered module.
 
u16 attribute
 The attributes of a module.
 
u8 version [2]
 The version of the module.
 
char modname [27]
 The module's name.
 
char terminal
 String terminator (always '\0').
 
u16 mod_state
 The status of the module.
 
char padding [2]
 
SceUID sec_id
 A secondary ID for the module.
 
SceUID modid
 The module's UID.
 
SceUID user_mod_thid
 The thread ID of a user module.
 
SceUID mem_id
 The ID of the memory block belonging to the module.
 
u32 mpid_text
 The ID of the TEXT segment's memory partition.
 
u32 mpid_data
 The ID of the DATA segment's memory partition.
 
void * ent_top
 Pointer to the first resident library entry table of the module.
 
SceSize ent_size
 The size of all resident library entry tables of the module.
 
void * stub_top
 Pointer to the first stub library entry table of the module.
 
SceSize stub_size
 The size of all stub library entry tables of the module.
 
SceKernelThreadEntry module_start
 A pointer to the (required) module's start entry function.
 
SceKernelThreadEntry module_stop
 A pointer to the (required) module's stop entry function.
 
SceKernelThreadEntry module_bootstart
 A pointer to a module's Bootstart entry function.
 
SceKernelRebootBeforeForKernel module_reboot_before
 A pointer to a module's rebootBefore entry function.
 
SceKernelRebootPhaseForKernel module_reboot_phase
 A pointer to a module's rebootPhase entry function.
 
u32 entry_addr
 The entry address of the module.
 
u32 gp_value
 Contains the offset from the start of the TEXT segment of the program's GP register value.
 
u32 text_addr
 The start address of the TEXT segment.
 
u32 text_size
 The size of the TEXT segment.
 
u32 data_size
 The size of the DATA segment.
 
u32 bss_size
 The size of the BSS segment.
 
u8 nsegment
 The number of segments the module consists of.
 
u8 padding2 [3]
 Reserved.
 
u32 segmentaddr [4]
 An array containing the start address of each segment.
 
SceSize segmentsize [4]
 An array containing the size of each segment.
 
u32 segmentalign [4]
 An array containing the alignment information of each segment.
 
s32 module_start_thread_priority
 The priority of the module start thread.
 
SceSize module_start_thread_stacksize
 The stack size of the module start thread.
 
SceUInt module_start_thread_attr
 The attributes of the module start thread.
 
s32 module_stop_thread_priority
 The priority of the module stop thread.
 
SceSize module_stop_thread_stacksize
 The stack size of the module stop thread.
 
SceUInt module_stop_thread_attr
 The attributes of the module stop thread.
 
s32 module_reboot_before_thread_priority
 The priority of the module reboot before thread.
 
SceSize module_reboot_before_thread_stacksize
 The stack size of the module reboot before thread.
 
SceUInt module_reboot_before_thread_attr
 The attributes of the module reboot before thread.
 
u32 count_reg_val
 The value of the coprocessor 0's count register when the module is created.
 
u32 segment_checksum
 The segment checksum of the module's segments.
 
u32 text_segment_checksum
 TEXT segment checksum of the module.
 
u32 compute_text_segment_checksum
 Whether to compute the text segment checksum before starting the module (see prologue).
 

Detailed Description

Describes a loaded module in memory.

This structure could change in future firmware revisions.

Field Documentation

◆ attribute

u16 SceModule::attribute

The attributes of a module.

One or more of SceModuleAttribute and SceModulePrivilegeLevel.

Referenced by pspSdkQueryModuleInfoV1().

◆ bss_size

u32 SceModule::bss_size

The size of the BSS segment.

Referenced by pspSdkQueryModuleInfoV1().

◆ compute_text_segment_checksum

u32 SceModule::compute_text_segment_checksum

Whether to compute the text segment checksum before starting the module (see prologue).

If non-zero, the text segment checksum will be computed after the module's resident libraries have been registered, and its stub libraries have been linked.

◆ count_reg_val

u32 SceModule::count_reg_val

The value of the coprocessor 0's count register when the module is created.

◆ data_size

u32 SceModule::data_size

The size of the DATA segment.

Referenced by pspSdkQueryModuleInfoV1().

◆ ent_size

SceSize SceModule::ent_size

The size of all resident library entry tables of the module.

◆ ent_top

void* SceModule::ent_top

Pointer to the first resident library entry table of the module.

◆ entry_addr

u32 SceModule::entry_addr

The entry address of the module.

It is the offset from the start of the TEXT segment to the program's entry point.

Referenced by pspSdkQueryModuleInfoV1().

◆ gp_value

u32 SceModule::gp_value

Contains the offset from the start of the TEXT segment of the program's GP register value.

Referenced by pspSdkQueryModuleInfoV1().

◆ mem_id

SceUID SceModule::mem_id

The ID of the memory block belonging to the module.

◆ mod_state

u16 SceModule::mod_state

The status of the module.

Contains information whether the module has been started, stopped, is a user module, etc.

◆ modid

SceUID SceModule::modid

The module's UID.

◆ modname

char SceModule::modname[27]

The module's name.

There can be several modules loaded with the same name.

Referenced by pspSdkQueryModuleInfoV1().

◆ module_bootstart

SceKernelThreadEntry SceModule::module_bootstart

A pointer to a module's Bootstart entry function.

This function is probably executed after a reboot.

◆ module_reboot_before

SceKernelRebootBeforeForKernel SceModule::module_reboot_before

A pointer to a module's rebootBefore entry function.

This function is probably executed before a reboot.

◆ module_reboot_before_thread_attr

SceUInt SceModule::module_reboot_before_thread_attr

The attributes of the module reboot before thread.

◆ module_reboot_before_thread_priority

s32 SceModule::module_reboot_before_thread_priority

The priority of the module reboot before thread.

◆ module_reboot_before_thread_stacksize

SceSize SceModule::module_reboot_before_thread_stacksize

The stack size of the module reboot before thread.

◆ module_reboot_phase

SceKernelRebootPhaseForKernel SceModule::module_reboot_phase

A pointer to a module's rebootPhase entry function.

This function is probably executed during a reboot.

◆ module_start

SceKernelThreadEntry SceModule::module_start

A pointer to the (required) module's start entry function.

This function is executed during the module's startup.

◆ module_start_thread_attr

SceUInt SceModule::module_start_thread_attr

The attributes of the module start thread.

◆ module_start_thread_priority

s32 SceModule::module_start_thread_priority

The priority of the module start thread.

◆ module_start_thread_stacksize

SceSize SceModule::module_start_thread_stacksize

The stack size of the module start thread.

◆ module_stop

SceKernelThreadEntry SceModule::module_stop

A pointer to the (required) module's stop entry function.

This function is executed during the module's stopping phase.

◆ module_stop_thread_attr

SceUInt SceModule::module_stop_thread_attr

The attributes of the module stop thread.

◆ module_stop_thread_priority

s32 SceModule::module_stop_thread_priority

The priority of the module stop thread.

◆ module_stop_thread_stacksize

SceSize SceModule::module_stop_thread_stacksize

The stack size of the module stop thread.

◆ mpid_data

u32 SceModule::mpid_data

The ID of the DATA segment's memory partition.

◆ mpid_text

u32 SceModule::mpid_text

The ID of the TEXT segment's memory partition.

◆ next

struct SceModule* SceModule::next

Pointer to the next registered module.

Modules are connected via a linked list.

◆ nsegment

u8 SceModule::nsegment

The number of segments the module consists of.

Referenced by pspSdkQueryModuleInfoV1().

◆ padding

char SceModule::padding[2]

◆ padding2

u8 SceModule::padding2[3]

Reserved.

◆ sec_id

SceUID SceModule::sec_id

A secondary ID for the module.

◆ segment_checksum

u32 SceModule::segment_checksum

The segment checksum of the module's segments.

◆ segmentaddr

u32 SceModule::segmentaddr[4]

An array containing the start address of each segment.

Referenced by pspSdkQueryModuleInfoV1().

◆ segmentalign

u32 SceModule::segmentalign[4]

An array containing the alignment information of each segment.

◆ segmentsize

SceSize SceModule::segmentsize[4]

An array containing the size of each segment.

Referenced by pspSdkQueryModuleInfoV1().

◆ stub_size

SceSize SceModule::stub_size

The size of all stub library entry tables of the module.

◆ stub_top

void* SceModule::stub_top

Pointer to the first stub library entry table of the module.

◆ terminal

char SceModule::terminal

String terminator (always '\0').

◆ text_addr

u32 SceModule::text_addr

The start address of the TEXT segment.

Referenced by pspSdkQueryModuleInfoV1().

◆ text_segment_checksum

u32 SceModule::text_segment_checksum

TEXT segment checksum of the module.

◆ text_size

u32 SceModule::text_size

The size of the TEXT segment.

Referenced by pspSdkQueryModuleInfoV1().

◆ user_mod_thid

SceUID SceModule::user_mod_thid

The thread ID of a user module.

◆ version

u8 SceModule::version[2]

The version of the module.

Consists of a major and minor part. There can be several modules loaded with the same name and version.

Referenced by pspSdkQueryModuleInfoV1().


The documentation for this struct was generated from the following file: