Difference between revisions of "SceSblFwLoader"

From Vita Development Wiki
Jump to navigation Jump to search
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
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 ==
 
== Module ==
  
=== Known NIDs ===
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Version !! Name !! World !! Privilege !! NID
+
! Version !! World !! Privilege
 
|-
 
|-
| 1.69 || SceSblFwLoader || Non-secure || Kernel || 0x589D2964
+
| 0.990.000-1.692.000 || Non-secure || Kernel
 
|}
 
|}
  
Line 17: Line 20:
 
! Version !! Name !! World !! Visibility !! NID
 
! Version !! Name !! World !! Visibility !! NID
 
|-
 
|-
| 1.69 || [[SceSblFwLoader#SceSblFwLoaderForDriver|SceSblFwLoaderForDriver]] || Non-secure || Kernel || 0x6FE424E4
+
| 0.990.000-1.692.000 || [[SceSblFwLoader#SceSblFwLoaderForDriver|SceSblFwLoaderForDriver]] || Non-secure || Kernel || 0x6FE424E4
 +
|-
 +
| 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]] since System Software version 1.800.071.
  
 
=== sceSblFwLoaderLoadForDriver ===
 
=== sceSblFwLoaderLoadForDriver ===
Line 27: 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 __fastcall SceSblFwLoaderForDriver_91C73A54(int unk, void *dst, int dst_size, int *loaded_size);</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 39: Line 58:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 0.990-3.60 || 0xA6278D27
+
| 0.990-3.740.011 || 0xA6278D27
 
|}
 
|}
  
Debug logs tells it does "sceSblFwLoaderSetPath".
+
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">int sceSblFwLoaderLockForDriver(char *path);</source>
+
<source lang="c">SceInt32 sceSblFwLoaderLockForDriver(const char *path, int unk_zero);</source>
  
 
=== sceSblFwLoaderUnlockForDriver ===
 
=== sceSblFwLoaderUnlockForDriver ===
Line 53: Line 72:
 
! Version !! NID
 
! Version !! NID
 
|-
 
|-
| 0.990-3.60 || 0xBB59FC7A
+
| 0.990-3.740.011 || 0xBB59FC7A
 
|}
 
|}
  
 +
<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.