SceSblFwLoader

From Vita Development Wiki
Jump to navigation Jump to search

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.