SceSblFwLoader: Difference between revisions

From Vita Development Wiki
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This module has been moved removed and its content moved to [[SceSblPostSsMgr]] on FW ?1.80? (somewhere between 0.990 and 3.60).
SceSblFwLoader is a PS Vita kernel module in charge of loading specific firmware images such as PSPEmu Initial Program Loader contained in [[SceSblPcbcBin]] (PSP Compatibility Boot Code), PSPEmu Flash memory files contained in [[SceSblPcffBin]] (PSP Compatibility Flash Files) as well as Wireless LAN and Bluetooth ([[Robin]]) driver image contained in [[SceWlanBtRobinImageAx]].


This module is mainly used to obtain FwImage (such as PSPEmu IPL and flash image).
This module has been removed and its content moved to [[SceSblPostSsMgr]] since System Software version 1.800.071.


== Module ==
== Module ==
Line 9: Line 9:
! Version !! World !! Privilege
! Version !! World !! Privilege
|-
|-
| 1.69 || Non-secure || Kernel
| 0.990.000-1.692.000 || Non-secure || Kernel
|}
|}


Line 20: Line 20:
! Version !! Name !! World !! Visibility !! NID
! Version !! Name !! World !! Visibility !! NID
|-
|-
| 0.990 || [[SceSblFwLoader#SceSblFwLoaderForDriver|SceSblFwLoaderForDriver]] || Non-secure || Kernel || 0x6FE424E4
| 0.990.000-1.692.000 || [[SceSblFwLoader#SceSblFwLoaderForDriver|SceSblFwLoaderForDriver]] || Non-secure || Kernel || 0x6FE424E4
|-
|-
| 3.60 || [[SceSblFwLoader#SceSblFwLoaderForDriver|SceSblFwLoaderForDriver]] || Non-secure || Kernel || not present. Moved to [[SceSblPostSsMgr#SceSblFwLoaderForDriver]].
| 1.800.071-3.740.011 || [[SceSblFwLoader#SceSblFwLoaderForDriver|SceSblFwLoaderForDriver]] || Non-secure || Kernel || not present. Moved to [[SceSblPostSsMgr#SceSblFwLoaderForDriver]].
|}
|}


== SceSblFwLoaderForDriver ==
== SceSblFwLoaderForDriver ==


This library was moved to [[SceSblPostSsMgr#SceSblFwLoaderForDriver]] on a FW between 0.990 and 3.60, probably 1.80.
This library was moved to [[SceSblPostSsMgr#SceSblFwLoaderForDriver]] since System Software version 1.800.071.


=== sceSblFwLoaderLoadForDriver ===
=== sceSblFwLoaderLoadForDriver ===
Line 34: Line 34:
! Version !! NID
! Version !! NID
|-
|-
| 0.990-3.60 || 0x91C73A54
| 0.990-3.740.011 || 0x91C73A54
|}
|}


Loads firmware into buffer "dst". Real loaded size is returned in "loaded_size" variable.
Loads firmware into the buffer at virtual address "pVA". Actual loaded size is returned in "puiLoadedSize".


<source lang="c">int sceSblFwLoaderLoadForDriver(int unk_one, void *pVA, SceSize maxSize, SceSize *loadedSize);</source>
<source lang="c">
/**
* Loads firmware in the provided buffer.
*
* @param[in]  unk_on        - unknown. Maybe a boolean. Example: 1.
* @param[out] pVA          - destination buffer address
* @param[in]  maxSize      - destnation buffer size
* @param[out] puiLoadedSize - read byte
*
* @return 0 on success, < 0 on error
*/
int sceSblFwLoaderLoadForDriver(int unk_one, void *pVA, SceSize maxSize, SceSize *puiLoadedSize);
</source>


=== sceSblFwLoaderLockForDriver ===
=== sceSblFwLoaderLockForDriver ===
Line 46: Line 58:
! Version !! NID
! Version !! NID
|-
|-
| 0.990-3.60 || 0xA6278D27
| 0.990-3.740.011 || 0xA6278D27
|}
|}


Inline calls <code>sceSblFwLoaderSetPath</code>.
Inline calls <code>sceSblFwLoaderSetPath</code>.


Locks fw loader and sets path to firmware file to work with.
Locks the firmware loader and sets path to firmware file to work with.


<source lang="c">SceInt32 sceSblFwLoaderLockForDriver(const char *path, int unk_zero);</source>
<source lang="c">SceInt32 sceSblFwLoaderLockForDriver(const char *path, int unk_zero);</source>
Line 60: Line 72:
! Version !! NID
! Version !! NID
|-
|-
| 0.990-3.60 || 0xBB59FC7A
| 0.990-3.740.011 || 0xBB59FC7A
|}
|}


<source lang="c">int sceSblFwLoaderUnlockForDriver(void);</source>
<source lang="c">int sceSblFwLoaderUnlockForDriver(void);</source>


== Usage ==


=== Loading Robin firmware image ===
The following code is used in [[SceWlanBt]] on System Software version 0.996.090.
<source lang="C">
        ret = sceSblFwLoaderLockForDriver("os0:kd/wlanbt_robin_img_ax.skprx");
        if (ret < 0) goto fail;
        ret = sceSblFwLoaderLoadForDriver(1, 0, 0x80000, &g_fwLoadedSize);
        if (ret < 0) {
          sceSblFwLoaderUnlockForDriver();
          goto fail;
        }
        ret = sceSblFwLoaderUnlockForDriver();
        if (ret < 0) goto fail;
        g_isWlanbtRobinImgAxLoaded = 1;
</source>
=== Loading PSPEmu firmware images ===
See [[SceCompat#sceCompatPrepareLoad]], [[SceCompat#sceCompatInit]] and [[SceCompat#sceCompatInitEx]] for PCBC and PCFF loading.
[[Category:ARM]]
[[Category:Kernel]]
[[Category:Modules]]
[[Category:Modules]]
[[Category:Kernel]]
[[Category:Library]]

Latest revision as of 22:18, 17 January 2024

SceSblFwLoader is a PS Vita kernel module in charge of loading specific firmware images such as PSPEmu Initial Program Loader contained in SceSblPcbcBin (PSP Compatibility Boot Code), PSPEmu Flash memory files contained in SceSblPcffBin (PSP Compatibility Flash Files) as well as Wireless LAN and Bluetooth (Robin) driver image contained in SceWlanBtRobinImageAx.

This module has been removed and its content moved to SceSblPostSsMgr since System Software version 1.800.071.

Module

Version World Privilege
0.990.000-1.692.000 Non-secure Kernel

Libraries

Known NIDs

Version Name World Visibility NID
0.990.000-1.692.000 SceSblFwLoaderForDriver Non-secure Kernel 0x6FE424E4
1.800.071-3.740.011 SceSblFwLoaderForDriver Non-secure Kernel not present. Moved to SceSblPostSsMgr#SceSblFwLoaderForDriver.

SceSblFwLoaderForDriver

This library was moved to SceSblPostSsMgr#SceSblFwLoaderForDriver since System Software version 1.800.071.

sceSblFwLoaderLoadForDriver

Version NID
0.990-3.740.011 0x91C73A54

Loads firmware into the buffer at virtual address "pVA". Actual loaded size is returned in "puiLoadedSize".

/**
 * Loads firmware in the provided buffer.
 *
 * @param[in]  unk_on        - unknown. Maybe a boolean. Example: 1.
 * @param[out] pVA           - destination buffer address
 * @param[in]  maxSize       - destnation buffer size
 * @param[out] puiLoadedSize - read byte
 *
 * @return 0 on success, < 0 on error
 */
int sceSblFwLoaderLoadForDriver(int unk_one, void *pVA, SceSize maxSize, SceSize *puiLoadedSize);

sceSblFwLoaderLockForDriver

Version NID
0.990-3.740.011 0xA6278D27

Inline calls sceSblFwLoaderSetPath.

Locks the firmware loader and sets path to firmware file to work with.

SceInt32 sceSblFwLoaderLockForDriver(const char *path, int unk_zero);

sceSblFwLoaderUnlockForDriver

Version NID
0.990-3.740.011 0xBB59FC7A
int sceSblFwLoaderUnlockForDriver(void);

Usage

Loading Robin firmware image

The following code is used in SceWlanBt on System Software version 0.996.090.

        ret = sceSblFwLoaderLockForDriver("os0:kd/wlanbt_robin_img_ax.skprx");
        if (ret < 0) goto fail;
        ret = sceSblFwLoaderLoadForDriver(1, 0, 0x80000, &g_fwLoadedSize);
        if (ret < 0) {
          sceSblFwLoaderUnlockForDriver();
          goto fail;
        }
        ret = sceSblFwLoaderUnlockForDriver();
        if (ret < 0) goto fail;
        g_isWlanbtRobinImgAxLoaded = 1;

Loading PSPEmu firmware images

See SceCompat#sceCompatPrepareLoad, SceCompat#sceCompatInit and SceCompat#sceCompatInitEx for PCBC and PCFF loading.