vitasdk
Documentation of the vitasdk

Exports for User. More...

Data Structures

struct  SceKernelSpackageArgs
 
struct  SceSblUsSpkgInfo
 Installed secure-package information. More...
 
struct  SceSblUsApplicableVersionInfo
 Applicable version information for OS0 and SLB2 packages. More...
 

Macros

#define SCE_UPDATE_MODE_SWU_GUI   0x10
 
#define SCE_UPDATE_MODE_SWU_CUI   0x30
 
#define sceSblSsUpdateMgrGetBootMode   sceSblUsGetUpdateMode
 
#define sceSblSsUpdateMgrSetBootMode   sceSblUsSetUpdateMode
 

Typedefs

typedef char SceUpdateMode
 

Enumerations

enum  SceSblUsSpackageType {
  SCE_SBL_US_SPACKAGE_TYPE_OS0 = 1 , SCE_SBL_US_SPACKAGE_TYPE_UNKNOWN_3 = 3 , SCE_SBL_US_SPACKAGE_TYPE_UNKNOWN_4 = 4 , SCE_SBL_US_SPACKAGE_TYPE_SYSCON_9A54 = 8 ,
  SCE_SBL_US_SPACKAGE_TYPE_SLB2 = 9 , SCE_SBL_US_SPACKAGE_TYPE_VS0 = 10 , SCE_SBL_US_SPACKAGE_TYPE_CP_FIRMWARE = 11 , SCE_SBL_US_SPACKAGE_TYPE_MOTION_FIRMWARE_0 = 12 ,
  SCE_SBL_US_SPACKAGE_TYPE_BBMC_FIRMWARE = 13 , SCE_SBL_US_SPACKAGE_TYPE_MOTION_FIRMWARE_1 = 15 , SCE_SBL_US_SPACKAGE_TYPE_TOUCH_FIRMWARE = 16 , SCE_SBL_US_SPACKAGE_TYPE_TOUCH_CONFIGURATION = 17 ,
  SCE_SBL_US_SPACKAGE_TYPE_BIC_FIRMWARE = 18 , SCE_SBL_US_SPACKAGE_TYPE_BIC_DATA_FLASH = 19 , SCE_SBL_US_SPACKAGE_TYPE_SYSCON_3665 = 20 , SCE_SBL_US_SPACKAGE_TYPE_OS0_PATCH = 21 ,
  SCE_SBL_US_SPACKAGE_TYPE_VS0_PATCH = 22 , SCE_SBL_US_SPACKAGE_TYPE_SA0 = 23 , SCE_SBL_US_SPACKAGE_TYPE_PD0 = 24 , SCE_SBL_US_SPACKAGE_TYPE_SYSCON_C5E7 = 25 ,
  SCE_SBL_US_SPACKAGE_TYPE_PREINSTALL_DATA = 27 , SCE_SBL_US_SPACKAGE_TYPE_PREINSTALL_DATA_PATCH = 28
}
 Secure-package component types accepted on FW 3.60. More...
 
enum  SceSblUsSpackageRequestType { SCE_SBL_US_SPACKAGE_REQUEST_UPDATE = 1 , SCE_SBL_US_SPACKAGE_REQUEST_INSPECT = 2 , SCE_SBL_US_SPACKAGE_REQUEST_EXTRACT = 3 }
 Asynchronous secure-package operation types. More...
 
enum  SceSblUsSpackageRequestState {
  SCE_SBL_US_SPACKAGE_STATE_ACCEPTED = 1 , SCE_SBL_US_SPACKAGE_STATE_VALIDATING = 2 , SCE_SBL_US_SPACKAGE_STATE_APPLYING = 3 , SCE_SBL_US_SPACKAGE_STATE_FINALIZING = 4 ,
  SCE_SBL_US_SPACKAGE_STATE_COMPLETED = 5
}
 Values reported through SceKernelSpackageArgs::request_state. More...
 
enum  SceSblUsSpackageFlags { SCE_SBL_US_SPACKAGE_FLAGS_SKIP_SYSTEM_VERSION_CHECK = 0x00000005 , SCE_SBL_US_SPACKAGE_FLAGS_CHECK_SYSTEM_VERSION = 0x00000009 }
 Flag values used by package-operation callers on FW 3.60. More...
 
enum  SceSblUsPowerControlMode {
  SCE_SBL_US_POWER_CONTROL_REBOOT = 0 , SCE_SBL_US_POWER_CONTROL_SHUTDOWN = 1 , SCE_SBL_US_POWER_CONTROL_LOCK = 2 , SCE_SBL_US_POWER_CONTROL_UNLOCK = 3 ,
  SCE_SBL_US_POWER_CONTROL_LED_ON = 4 , SCE_SBL_US_POWER_CONTROL_LED_OFF = 5 , SCE_SBL_US_POWER_CONTROL_LED_INIT = 6 , SCE_SBL_US_POWER_CONTROL_TICK = 7 ,
  SCE_SBL_US_POWER_CONTROL_CHECK_CP_ENABLED = 8
}
 

Functions

 VITASDK_BUILD_ASSERT_EQ (1, SceUpdateMode)
 
int sceSblUsGetUpdateMode (SceUpdateMode *mode)
 Getting system update mode on boot.
 
int sceSblUsSetUpdateMode (SceUpdateMode mode)
 Setting system update mode on boot.
 
int sceSblUsVerifyPup (const char *path)
 Verify PUP.
 
 VITASDK_BUILD_ASSERT_EQ (1, SceSblUsSpackageType)
 
 VITASDK_BUILD_ASSERT_EQ (1, SceSblUsSpackageRequestType)
 
 VITASDK_BUILD_ASSERT_EQ (1, SceSblUsSpackageRequestState)
 
 VITASDK_BUILD_ASSERT_EQ (1, SceSblUsSpackageFlags)
 
 VITASDK_BUILD_ASSERT_EQ (1, SceSblUsPowerControlMode)
 
 VITASDK_BUILD_ASSERT_EQ (0x2C, SceKernelSpackageArgs)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceSblUsSpkgInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceSblUsApplicableVersionInfo)
 
int sceSblUsAllocateBuffer (SceSize size, void **user_buffer)
 Allocate a process-owned update buffer.
 
SceInt32 sceSblUsCheckSystemIntegrity (void)
 Check system integrity.
 
int sceSblUsExtractSpackage (int package_type, const SceKernelSpackageArgs *args, int *request_id)
 Submit an asynchronous package-extraction request.
 
int sceSblUsGetApplicableVersion (int package_type, SceSblUsApplicableVersionInfo *version_info)
 Get an applicable package version.
 
int sceSblUsGetExtractSpackage (int request_type, int request_id, SceKernelSpackageArgs *args)
 Return a request buffer's user-space mapping.
 
int sceSblUsGetSpkgInfo (int package_type, SceSblUsSpkgInfo *info)
 Get information about an installed package.
 
int sceSblUsGetStatus (int request_type, int request_id, const SceKernelSpackageArgs *args)
 Get the state of an asynchronous package request.
 
int sceSblUsInformUpdateFinished (SceUInt32 task, const char *message, SceSize message_length)
 Inform the system that an update has finished.
 
int sceSblUsInformUpdateOngoing (SceUInt32 task, SceUInt32 percentage)
 Inform the system that an update is ongoing.
 
int sceSblUsInformUpdateStarted (SceUInt32 task, SceUInt32 value, const char *message, SceSize message_length)
 Inform the system that an update has started.
 
int sceSblUsInspectSpackage (int package_type, const SceKernelSpackageArgs *args, int *request_id)
 Submit an asynchronous package-inspection request.
 
int sceSblUsPowerControl (int mode, SceUInt32 flags)
 Perform an update-related power-control operation.
 
int sceSblUsReleaseBuffer (void *user_buffer)
 Release an update buffer allocated by sceSblUsAllocateBuffer.
 
int sceSblUsSetSwInfoBin (const char *name, SceSize name_length, const void *value, SceSize value_length)
 Set a binary software-information value.
 
int sceSblUsSetSwInfoInt (const char *name, SceSize name_length, SceUInt32 value)
 Set an integer software-information value.
 
int sceSblUsSetSwInfoStr (const char *name, SceSize name_length, const char *value, SceSize value_length)
 Set a string software-information value.
 
int sceSblUsUpdateSpackage (int package_type, const SceKernelSpackageArgs *args, int *request_id)
 Submit an asynchronous package-update request.
 
int sceSblUsVerifyPupAdditionalSign (const char *path)
 Verify an additional PUP signature.
 
int sceSblUsVerifyPupHeader (const char *path)
 Verify a PUP header.
 
int sceSblUsVerifyPupSegment (const char *path, SceUInt64 segment_index)
 Verify a PUP segment by index.
 
int sceSblUsVerifyPupSegmentById (const char *path, SceUInt64 segment_id)
 Verify a PUP segment by ID.
 
int sceSblUsVerifyPupWatermark (const char *path)
 Verify a PUP watermark.
 

Variables

SceSize SceKernelSpackageArgs::size
 Initialize to sizeof(SceKernelSpackageArgs); copied but not validated on FW 3.60.
 
SceUInt32 SceKernelSpackageArgs::package_type
 One of SceSblUsSpackageType; the function uses its package_type argument instead on FW 3.60.
 
void * SceKernelSpackageArgs::buffer
 Process-owned buffer returned by sceSblUsAllocateBuffer.
 
SceSize SceKernelSpackageArgs::buffer_size
 Must equal the size passed to sceSblUsAllocateBuffer for this buffer.
 
SceUInt32 SceKernelSpackageArgs::flags
 One of SceSblUsSpackageFlags.
 
SceUInt32 SceKernelSpackageArgs::reserved [2]
 Preserved by sceSblUsGetExtractSpackage and ignored by SceSblUpdateMgr.
 
SceUInt32 * SceKernelSpackageArgs::sequence_number
 Receives a counter incremented each time the request state changes.
 
SceInt32 * SceKernelSpackageArgs::request_result
 Receives the operation result; valid when the request is completed.
 
SceUInt32 * SceKernelSpackageArgs::request_state
 Receives one of SceSblUsSpackageRequestState.
 
SceUInt32 * SceKernelSpackageArgs::written_rate
 Receives the write-rate value; applicable update paths report 100 when finished.
 
SceSize SceSblUsSpkgInfo::size
 Set to sizeof(SceSblUsSpkgInfo) on success.
 
SceUInt32 SceSblUsSpkgInfo::version
 Installed package version.
 
SceUInt8 SceSblUsSpkgInfo::status [4]
 Package-specific status bytes; only elements 0 and 1 are used on FW 3.60.
 
SceInt32 SceSblUsSpkgInfo::reserved
 Set to 0 on FW 3.60.
 
SceUInt32 SceSblUsApplicableVersionInfo::version
 Applicable package version.
 
SceUInt32 SceSblUsApplicableVersionInfo::handled
 Set to 1 for OS0 and SLB2, or 0 for an unsupported package type.
 
SceUInt32 SceSblUsApplicableVersionInfo::reserved [2]
 Set to 0 on FW 3.60.
 

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSblUpdateMgr_stub



Every function in this header requires system-program privilege on FW 3.60.


Data Structure Documentation

◆ SceKernelSpackageArgs

struct SceKernelSpackageArgs
Data Fields
SceSize size Initialize to sizeof(SceKernelSpackageArgs); copied but not validated on FW 3.60.
SceUInt32 package_type One of SceSblUsSpackageType; the function uses its package_type argument instead on FW 3.60.
void * buffer Process-owned buffer returned by sceSblUsAllocateBuffer.
SceSize buffer_size Must equal the size passed to sceSblUsAllocateBuffer for this buffer.
SceUInt32 flags One of SceSblUsSpackageFlags.
SceUInt32 reserved[2] Preserved by sceSblUsGetExtractSpackage and ignored by SceSblUpdateMgr.
SceUInt32 * sequence_number Receives a counter incremented each time the request state changes.
SceInt32 * request_result Receives the operation result; valid when the request is completed.
SceUInt32 * request_state Receives one of SceSblUsSpackageRequestState.
SceUInt32 * written_rate Receives the write-rate value; applicable update paths report 100 when finished.

◆ SceSblUsSpkgInfo

struct SceSblUsSpkgInfo

Installed secure-package information.

On FW 3.60, SceSblUsSpkgInfo::status element 0 is used only for the BBMC firmware package and is zero only when the BBMC status query succeeds and returns a nonzero value. Element 1 is used only for the preinstall-data patch package and is one when its secondary stored status is nonzero.

Data Fields
SceSize size Set to sizeof(SceSblUsSpkgInfo) on success.
SceUInt32 version Installed package version.
SceUInt8 status[4] Package-specific status bytes; only elements 0 and 1 are used on FW 3.60.
SceInt32 reserved Set to 0 on FW 3.60.

◆ SceSblUsApplicableVersionInfo

struct SceSblUsApplicableVersionInfo

Applicable version information for OS0 and SLB2 packages.

Data Fields
SceUInt32 version Applicable package version.
SceUInt32 handled Set to 1 for OS0 and SLB2, or 0 for an unsupported package type.
SceUInt32 reserved[2] Set to 0 on FW 3.60.

Macro Definition Documentation

◆ SCE_UPDATE_MODE_SWU_GUI

#define SCE_UPDATE_MODE_SWU_GUI   0x10

◆ SCE_UPDATE_MODE_SWU_CUI

#define SCE_UPDATE_MODE_SWU_CUI   0x30

◆ sceSblSsUpdateMgrGetBootMode

#define sceSblSsUpdateMgrGetBootMode   sceSblUsGetUpdateMode

◆ sceSblSsUpdateMgrSetBootMode

#define sceSblSsUpdateMgrSetBootMode   sceSblUsSetUpdateMode

Typedef Documentation

◆ SceUpdateMode

typedef char SceUpdateMode

Enumeration Type Documentation

◆ SceSblUsSpackageType

Secure-package component types accepted on FW 3.60.

Types 3, 4, and 27 support extraction only. Types 10, 21, 22, 23, and 28 support inspection, update, and extraction. The other values declared here support inspection and update. Other numeric package types are rejected.

Enumerator
SCE_SBL_US_SPACKAGE_TYPE_OS0 
SCE_SBL_US_SPACKAGE_TYPE_UNKNOWN_3 
SCE_SBL_US_SPACKAGE_TYPE_UNKNOWN_4 
SCE_SBL_US_SPACKAGE_TYPE_SYSCON_9A54 
SCE_SBL_US_SPACKAGE_TYPE_SLB2 
SCE_SBL_US_SPACKAGE_TYPE_VS0 
SCE_SBL_US_SPACKAGE_TYPE_CP_FIRMWARE 
SCE_SBL_US_SPACKAGE_TYPE_MOTION_FIRMWARE_0 
SCE_SBL_US_SPACKAGE_TYPE_BBMC_FIRMWARE 
SCE_SBL_US_SPACKAGE_TYPE_MOTION_FIRMWARE_1 
SCE_SBL_US_SPACKAGE_TYPE_TOUCH_FIRMWARE 
SCE_SBL_US_SPACKAGE_TYPE_TOUCH_CONFIGURATION 
SCE_SBL_US_SPACKAGE_TYPE_BIC_FIRMWARE 
SCE_SBL_US_SPACKAGE_TYPE_BIC_DATA_FLASH 
SCE_SBL_US_SPACKAGE_TYPE_SYSCON_3665 
SCE_SBL_US_SPACKAGE_TYPE_OS0_PATCH 
SCE_SBL_US_SPACKAGE_TYPE_VS0_PATCH 
SCE_SBL_US_SPACKAGE_TYPE_SA0 
SCE_SBL_US_SPACKAGE_TYPE_PD0 
SCE_SBL_US_SPACKAGE_TYPE_SYSCON_C5E7 
SCE_SBL_US_SPACKAGE_TYPE_PREINSTALL_DATA 
SCE_SBL_US_SPACKAGE_TYPE_PREINSTALL_DATA_PATCH 

◆ SceSblUsSpackageRequestType

Asynchronous secure-package operation types.

Enumerator
SCE_SBL_US_SPACKAGE_REQUEST_UPDATE 

Validate and install a package.

SCE_SBL_US_SPACKAGE_REQUEST_INSPECT 

Validate a package without installing it.

SCE_SBL_US_SPACKAGE_REQUEST_EXTRACT 

Validate and decrypt a package without installing it.

◆ SceSblUsSpackageRequestState

Values reported through SceKernelSpackageArgs::request_state.

Enumerator
SCE_SBL_US_SPACKAGE_STATE_ACCEPTED 
SCE_SBL_US_SPACKAGE_STATE_VALIDATING 
SCE_SBL_US_SPACKAGE_STATE_APPLYING 
SCE_SBL_US_SPACKAGE_STATE_FINALIZING 
SCE_SBL_US_SPACKAGE_STATE_COMPLETED 

◆ SceSblUsSpackageFlags

Flag values used by package-operation callers on FW 3.60.

FW 3.60 requires the bits in mask 0x5 or 0x9 to be set, but does not reject additional bits. Value 0x9 enables version checks. Value 0x5 skips version checks for the boot and system-partition package types, but not peripheral firmware checks. When the system does not use external storage, value 0x5 is rejected on CEX units.

Enumerator
SCE_SBL_US_SPACKAGE_FLAGS_SKIP_SYSTEM_VERSION_CHECK 
SCE_SBL_US_SPACKAGE_FLAGS_CHECK_SYSTEM_VERSION 

◆ SceSblUsPowerControlMode

Enumerator
SCE_SBL_US_POWER_CONTROL_REBOOT 
SCE_SBL_US_POWER_CONTROL_SHUTDOWN 
SCE_SBL_US_POWER_CONTROL_LOCK 
SCE_SBL_US_POWER_CONTROL_UNLOCK 
SCE_SBL_US_POWER_CONTROL_LED_ON 
SCE_SBL_US_POWER_CONTROL_LED_OFF 
SCE_SBL_US_POWER_CONTROL_LED_INIT 
SCE_SBL_US_POWER_CONTROL_TICK 
SCE_SBL_US_POWER_CONTROL_CHECK_CP_ENABLED 

On tool/test units, check DIP switch 194; other units return success.

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/9]

VITASDK_BUILD_ASSERT_EQ ( 1  ,
SceUpdateMode   
)

◆ sceSblUsGetUpdateMode()

int sceSblUsGetUpdateMode ( SceUpdateMode *  mode)

Getting system update mode on boot.

Parameters
[out]mode- The pointer of SceUpdateMode variable
Returns
0 on success, < 0 on error.

◆ sceSblUsSetUpdateMode()

int sceSblUsSetUpdateMode ( SceUpdateMode  mode)

Setting system update mode on boot.

Parameters
[in]mode- The update mode
Returns
0 on success, < 0 on error.

◆ sceSblUsVerifyPup()

int sceSblUsVerifyPup ( const char *  path)

Verify PUP.

Parameters
[in]path- The PUP path
Returns
0 on success, < 0 on error.

note - If verify CEX PUP on Devkit system, got error.

◆ VITASDK_BUILD_ASSERT_EQ() [2/9]

VITASDK_BUILD_ASSERT_EQ ( 1  ,
SceSblUsSpackageType   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/9]

VITASDK_BUILD_ASSERT_EQ ( 1  ,
SceSblUsSpackageRequestType   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/9]

VITASDK_BUILD_ASSERT_EQ ( 1  ,
SceSblUsSpackageRequestState   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/9]

VITASDK_BUILD_ASSERT_EQ ( 1  ,
SceSblUsSpackageFlags   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/9]

VITASDK_BUILD_ASSERT_EQ ( 1  ,
SceSblUsPowerControlMode   
)

◆ VITASDK_BUILD_ASSERT_EQ() [7/9]

VITASDK_BUILD_ASSERT_EQ ( 0x2C  ,
SceKernelSpackageArgs   
)

◆ VITASDK_BUILD_ASSERT_EQ() [8/9]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceSblUsSpkgInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [9/9]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceSblUsApplicableVersionInfo   
)

◆ sceSblUsAllocateBuffer()

int sceSblUsAllocateBuffer ( SceSize  size,
void **  user_buffer 
)

Allocate a process-owned update buffer.

FW 3.60 rounds size up to a 4 KiB boundary and has four update-buffer slots shared by all processes.

Parameters
[in]size- Nonzero buffer size.
[out]user_buffer- Receives the user-space mapping.
Returns
0 on success, < 0 on error.

◆ sceSblUsCheckSystemIntegrity()

SceInt32 sceSblUsCheckSystemIntegrity ( void  )

Check system integrity.

FW 3.60 checks only that the caller is a system program. It performs no additional integrity scan.

Returns
0 on success, < 0 on error.

◆ sceSblUsExtractSpackage()

int sceSblUsExtractSpackage ( int  package_type,
const SceKernelSpackageArgs *  args,
int *  request_id 
)

Submit an asynchronous package-extraction request.

The operation validates and decrypts the package without installing it. The buffer must have been allocated by sceSblUsAllocateBuffer for the calling process.

Parameters
[in]package_type- One of SceSblUsSpackageType.
[in]args- Update buffer, size, and flags.
[out]request_id- Request identifier used by sceSblUsGetStatus and sceSblUsGetExtractSpackage.
Returns
0 if the request was submitted, < 0 on error.

◆ sceSblUsGetApplicableVersion()

int sceSblUsGetApplicableVersion ( int  package_type,
SceSblUsApplicableVersionInfo *  version_info 
)

Get an applicable package version.

For OS0 and SLB2, FW 3.60 selects a built-in applicable version and, on CEX systems, raises it to at least the installed version. Other package types return success with a zeroed result.

Parameters
[in]package_type- One of SceSblUsSpackageType.
[out]version_info- Receives the applicable-version information.
Returns
0 on success, < 0 on error.

◆ sceSblUsGetExtractSpackage()

int sceSblUsGetExtractSpackage ( int  request_type,
int  request_id,
SceKernelSpackageArgs *  args 
)

Return a request buffer's user-space mapping.

FW 3.60 accepts every valid request type and does not itself require the request to be completed. The request type and ID must identify the current request. Only SceKernelSpackageArgs::buffer is replaced; every other byte of the caller's structure is preserved.

Parameters
[in]request_type- One of SceSblUsSpackageRequestType.
[in]request_id- Request identifier.
[in,out]args- Receives the mapped user-space buffer.
Returns
0 on success, < 0 on error.

◆ sceSblUsGetSpkgInfo()

int sceSblUsGetSpkgInfo ( int  package_type,
SceSblUsSpkgInfo *  info 
)

Get information about an installed package.

The function writes the complete 0x10-byte output structure; its SceSblUsSpkgInfo::size member is not an input.

Parameters
[in]package_type- One of SceSblUsSpackageType.
[out]info- Package information.
Returns
0 on success, < 0 on error.

◆ sceSblUsGetStatus()

int sceSblUsGetStatus ( int  request_type,
int  request_id,
const SceKernelSpackageArgs *  args 
)

Get the state of an asynchronous package request.

All four output pointers in args must be non-NULL. A nonzero request ID must match the current request for request_type. Request ID zero selects the module's legacy fallback-result path.

Parameters
[in]request_type- One of SceSblUsSpackageRequestType.
[in]request_id- Request identifier.
[in]args- Contains the four user-space output pointers.
Returns
0 on success, < 0 on error.

◆ sceSblUsInformUpdateFinished()

int sceSblUsInformUpdateFinished ( SceUInt32  task,
const char *  message,
SceSize  message_length 
)

Inform the system that an update has finished.

FW 3.60 copies the message into a 64-byte local buffer and forwards all arguments unchanged to the registered system-root callback. If no callback is registered, the call succeeds after validating and copying the message.

Parameters
[in]task- Update task value.
[in]message- Message buffer.
[in]message_length- Number of bytes to copy, from 1 through 64.
Returns
0 on success, < 0 on error.

◆ sceSblUsInformUpdateOngoing()

int sceSblUsInformUpdateOngoing ( SceUInt32  task,
SceUInt32  percentage 
)

Inform the system that an update is ongoing.

Both arguments are forwarded unchanged to the registered system-root callback. If no callback is registered, the call succeeds without otherwise using the values.

Parameters
[in]task- Update task value.
[in]percentage- Update completion percentage.
Returns
0 on success, < 0 on error.

◆ sceSblUsInformUpdateStarted()

int sceSblUsInformUpdateStarted ( SceUInt32  task,
SceUInt32  value,
const char *  message,
SceSize  message_length 
)

Inform the system that an update has started.

FW 3.60 copies the message into a 64-byte local buffer and forwards all arguments unchanged to the registered system-root callback. If no callback is registered, the call succeeds after validating and copying the message.

Parameters
[in]task- Update task value.
[in]value- Callback value whose purpose is unknown.
[in]message- Message buffer.
[in]message_length- Number of bytes to copy, from 1 through 64.
Returns
0 on success, < 0 on error.

◆ sceSblUsInspectSpackage()

int sceSblUsInspectSpackage ( int  package_type,
const SceKernelSpackageArgs *  args,
int *  request_id 
)

Submit an asynchronous package-inspection request.

The operation performs the same package authentication, platform checks, and version checks as an update request, but does not install the package.

Parameters
[in]package_type- One of SceSblUsSpackageType.
[in]args- Update buffer, size, and flags.
[out]request_id- Request identifier used by sceSblUsGetStatus.
Returns
0 if the request was submitted, < 0 on error.

◆ sceSblUsPowerControl()

int sceSblUsPowerControl ( int  mode,
SceUInt32  flags 
)

Perform an update-related power-control operation.

For reboot and shutdown, observed flag values use bits 0 through 2; value 0x2 selects the CP path and value 0x5 selects the system/Ernie path. For lock and unlock, bit 0 requests the corresponding kernel power lock. LED and CP-check modes ignore flags. Power-tick mode passes flags directly as a SceKernelPowerTickType value.

Parameters
[in]mode- One of SceSblUsPowerControlMode.
[in]flags- Mode-dependent flags.
Returns
0 on success, < 0 on error.

◆ sceSblUsReleaseBuffer()

int sceSblUsReleaseBuffer ( void *  user_buffer)

Release an update buffer allocated by sceSblUsAllocateBuffer.

If an asynchronous request still owns the buffer, this call removes the caller's mapping. FW 3.60 frees the underlying memory only after the request stops using it.

Parameters
[in]user_buffer- User-space update buffer.
Returns
0 on success, < 0 on error.

◆ sceSblUsSetSwInfoBin()

int sceSblUsSetSwInfoBin ( const char *  name,
SceSize  name_length,
const void *  value,
SceSize  value_length 
)

Set a binary software-information value.

The input buffers are copied before the registered system-root callback is called. If no callback is registered, the call succeeds after validating and copying the inputs.

Parameters
[in]name- Name buffer.
[in]name_length- Number of name bytes to copy, from 1 through 31.
[in]value- Binary value buffer.
[in]value_length- Number of value bytes to copy, from 1 through 127.
Returns
0 on success, < 0 on error.

◆ sceSblUsSetSwInfoInt()

int sceSblUsSetSwInfoInt ( const char *  name,
SceSize  name_length,
SceUInt32  value 
)

Set an integer software-information value.

If no system-root callback is registered, the call succeeds after validating and copying the name.

Parameters
[in]name- Name buffer.
[in]name_length- Number of name bytes to copy, from 1 through 31.
[in]value- Integer value.
Returns
0 on success, < 0 on error.

◆ sceSblUsSetSwInfoStr()

int sceSblUsSetSwInfoStr ( const char *  name,
SceSize  name_length,
const char *  value,
SceSize  value_length 
)

Set a string software-information value.

The input buffers are copied before the registered system-root callback is called. If no callback is registered, the call succeeds after validating and copying the inputs.

Parameters
[in]name- Name buffer.
[in]name_length- Number of name bytes to copy, from 1 through 31.
[in]value- String value buffer.
[in]value_length- Number of value bytes to copy, from 1 through 127.
Returns
0 on success, < 0 on error.

◆ sceSblUsUpdateSpackage()

int sceSblUsUpdateSpackage ( int  package_type,
const SceKernelSpackageArgs *  args,
int *  request_id 
)

Submit an asynchronous package-update request.

The operation authenticates the package, checks target compatibility and version policy, and installs the package-specific payload.

Parameters
[in]package_type- One of SceSblUsSpackageType.
[in]args- Update buffer, size, and flags.
[out]request_id- Request identifier used by sceSblUsGetStatus.
Returns
0 if the request was submitted, < 0 on error.

◆ sceSblUsVerifyPupAdditionalSign()

int sceSblUsVerifyPupAdditionalSign ( const char *  path)

Verify an additional PUP signature.

Parameters
[in]path- NUL-terminated PUP path, at most 0x3FF characters.
Returns
0 on success, < 0 on error.

◆ sceSblUsVerifyPupHeader()

int sceSblUsVerifyPupHeader ( const char *  path)

Verify a PUP header.

Parameters
[in]path- NUL-terminated PUP path, at most 0x3FF characters.
Returns
0 on success, < 0 on error.

◆ sceSblUsVerifyPupSegment()

int sceSblUsVerifyPupSegment ( const char *  path,
SceUInt64  segment_index 
)

Verify a PUP segment by index.

Parameters
[in]path- NUL-terminated PUP path, at most 0x3FF characters.
[in]segment_index- 64-bit segment index.
Returns
0 on success, < 0 on error.

◆ sceSblUsVerifyPupSegmentById()

int sceSblUsVerifyPupSegmentById ( const char *  path,
SceUInt64  segment_id 
)

Verify a PUP segment by ID.

Parameters
[in]path- NUL-terminated PUP path, at most 0x3FF characters.
[in]segment_id- 64-bit segment ID.
Returns
0 on success, < 0 on error.

◆ sceSblUsVerifyPupWatermark()

int sceSblUsVerifyPupWatermark ( const char *  path)

Verify a PUP watermark.

Parameters
[in]path- NUL-terminated PUP path, at most 0x3FF characters.
Returns
0 on success, < 0 on error.

Variable Documentation

◆ size [1/2]

SceSize SceKernelSpackageArgs::size

Initialize to sizeof(SceKernelSpackageArgs); copied but not validated on FW 3.60.

◆ package_type

SceUInt32 SceKernelSpackageArgs::package_type

One of SceSblUsSpackageType; the function uses its package_type argument instead on FW 3.60.

◆ buffer

void* SceKernelSpackageArgs::buffer

Process-owned buffer returned by sceSblUsAllocateBuffer.

◆ buffer_size

SceSize SceKernelSpackageArgs::buffer_size

Must equal the size passed to sceSblUsAllocateBuffer for this buffer.

◆ flags

SceUInt32 SceKernelSpackageArgs::flags

◆ reserved [1/3]

SceUInt32 SceKernelSpackageArgs::reserved[2]

Preserved by sceSblUsGetExtractSpackage and ignored by SceSblUpdateMgr.

◆ sequence_number

SceUInt32* SceKernelSpackageArgs::sequence_number

Receives a counter incremented each time the request state changes.

◆ request_result

SceInt32* SceKernelSpackageArgs::request_result

Receives the operation result; valid when the request is completed.

◆ request_state

SceUInt32* SceKernelSpackageArgs::request_state

Receives one of SceSblUsSpackageRequestState.

◆ written_rate

SceUInt32* SceKernelSpackageArgs::written_rate

Receives the write-rate value; applicable update paths report 100 when finished.

◆ size [2/2]

SceSize SceSblUsSpkgInfo::size

Set to sizeof(SceSblUsSpkgInfo) on success.

◆ version [1/2]

SceUInt32 SceSblUsSpkgInfo::version

Installed package version.

◆ status

SceUInt8 SceSblUsSpkgInfo::status[4]

Package-specific status bytes; only elements 0 and 1 are used on FW 3.60.

◆ reserved [2/3]

SceInt32 SceSblUsSpkgInfo::reserved

Set to 0 on FW 3.60.

◆ version [2/2]

SceUInt32 SceSblUsApplicableVersionInfo::version

Applicable package version.

◆ handled

SceUInt32 SceSblUsApplicableVersionInfo::handled

Set to 1 for OS0 and SLB2, or 0 for an unsupported package type.

◆ reserved [3/3]

SceUInt32 SceSblUsApplicableVersionInfo::reserved[2]

Set to 0 on FW 3.60.