NSKBL: Difference between revisions
Line 110: | Line 110: | ||
<source lang="C">int sceKblPrintfForKernel(const char *fmt, ...);</source> | <source lang="C">int sceKblPrintfForKernel(const char *fmt, ...);</source> | ||
=== | === sceKblPrintfLevelForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x752E7EEC | ||
|} | |} | ||
similar to sceKernelPrintfLevelForDriver. | |||
In 3.60 this function is at | In 3.60 this function is at 0x51013841. | ||
=== sceKblGetMinimumLogLevelForKernel === | |||
== | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0xC011935A | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x51013921. | ||
<source lang="C">int | <source lang="C">int sceKblGetMinimumLogLevelForKernel(void);</source> | ||
=== | === sceKblGetPutcharHandlerForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x9B868276 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x51013765. | ||
<source lang="C"> | <source lang="C">void *sceKblGetPutcharHandlerForKernel(void);</source> | ||
=== | === sceKblSysrootProcessmgrStart2ForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x161D6FCC | ||
|} | |} | ||
In 3.60 this function is at | Similar to SceKblForKernel_0x1DB28F02 | ||
In 3.60 this function is at 0x510123DD | |||
<source lang="C"> | <source lang="C">int sceKblSysrootProcessmgrStart2ForKernel(void);</source> | ||
=== | === sceKblSysrootThreadMgrStartAfterProcessForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x1DB28F02 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x510123A1. | ||
<source lang="C">int | <source lang="C">int sceKblSysrootThreadMgrStartAfterProcessForKernel(void);</source> | ||
=== | === sceKblSysrootIofilemgrStartForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0xC7B77991 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x5101297D. | ||
<source lang="C">int | <source lang="C">int sceKblSysrootIofilemgrStartForKernel(void);</source> | ||
=== | === sceKblSysrootCpuCoreSyncAllForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x314AA770 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x510124FD. | ||
<source lang="C"> | <source lang="C">void sceKblSysrootCpuCoreSyncAllForKernel(void);</source> | ||
=== | === sceKblSysrootCpuCoreSyncWaitForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x807B4437 | ||
|} | |} | ||
In 3.60 this function is at | same to SceSysrootForKernel_8E4B61F1 | ||
In 3.60 this function is at 0x510124E5. | |||
<source lang="C">int | <source lang="C">void sceKblSysrootCpuCoreSyncWaitForKernel(int core);</source> | ||
=== | === sceKblCpuSwitchInterruptsForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0xDDB3A1A8 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x51003554. | ||
<source lang="C"> | <source lang="C">void sceKblCpuSwitchInterruptsForKernel(void);</source> | ||
=== | === sceKblIsCEXForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x8A416887 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x510171B5. | ||
<source lang="C"> | <source lang="C">int sceKblIsCEXForKernel(void);</source> | ||
=== sceKblIsCEXJpFatForKernel === | |||
=== | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0xC3DDDE15 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x51017175. | ||
<source lang="C">int | <source lang="C">int sceKblIsCEXJpFatForKernel(void);</source> | ||
=== | === sceKblIsDEXForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x5945F065 | ||
|} | |} | ||
In 3.60 this function is at 0x51017159. | |||
<source lang="C">int sceKblIsDEXForKernel(void);</source> | |||
=== | === sceKblIsToolForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0xB6C9ACF1 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x51017139. | ||
<source lang="C">int | <source lang="C">int sceKblIsToolForKernel(void);</source> | ||
=== | === sceKblIsTestForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x943E7537 | ||
|} | |} | ||
In 3.60 this function is at 0x5101711D. | |||
<source lang="C">int sceKblIsTestForKernel(void);</source> | |||
<source lang="C">void | |||
=== sceKblIsVITAForKernel === | === sceKblIsVITAForKernel === | ||
Line 324: | Line 318: | ||
<source lang="C">int sceKblIsGenuineDolceForKernel(void);</source> | <source lang="C">int sceKblIsGenuineDolceForKernel(void);</source> | ||
=== | === sceKblLoadModuleForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x6D7A1F18 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x51001551. | ||
<source lang="C"> | |||
typedef struct SceModuleLoadList { | |||
const char *filename; | |||
} __attribute__((packed)) SceModuleLoadList; | |||
int sceKblLoadModuleForKernel(const SceModuleLoadList *list, SceUID *uid, int count, int some_flag); | |||
</source> | |||
=== | === sceKblStartModuleForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x9A92436E | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x51001571 | ||
<source lang="C">int | <source lang="C">int sceKblStartModuleForKernel(SceUID *uid_list, int count, SceSize args, void *argp);</source> | ||
=== | === sceKblAuthMgrCloseForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x79241ACF | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x51001345. | ||
<source lang="C">int | <source lang="C">int sceKblAuthMgrCloseForKernel(void);</source> | ||
=== | === sceKblSetNonSyncModuleStartForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x9F4F3F98 | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x51001561. | ||
<source lang="C">int | <source lang="C">int sceKblSetNonSyncModuleStartForKernel(void);</source> | ||
=== | === sceKblGetCpuIdForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0xB506A10E | ||
|} | |} | ||
In 3.60 this function is at | In 3.60 this function is at 0x510147C9. | ||
<source lang="C">int | <source lang="C">int sceKblGetCpuIdForKernel(void);</source> | ||
=== sceKblCheckDipswForKernel === | === sceKblCheckDipswForKernel === | ||
Line 430: | Line 430: | ||
</source> | </source> | ||
=== | === sceKblInitDeviceForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0xF7AF8690 | ||
|} | |} | ||
In 3.60 this function is at | some device init function | ||
In 3.60 this function is at 0x5100124D. | |||
<source lang="C"> | <source lang="C">int sceKblInitDeviceForKernel(void);</source> | ||
=== | === sceKblFreeFileSystemCtxForKernel === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x261F2747 | ||
|} | |} | ||
In 3.60 this function is at 0x51001321. | |||
In 3.60 this function is at | |||
<source lang="C">int | <source lang="C">int sceKblFreeFileSystemCtxForKernel(void);</source> | ||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category:Kernel]] | [[Category:Kernel]] |
Revision as of 18:29, 4 September 2020
NSKBL is a program that performs emmc setup, base kernel module loading, etc. during PSVita boot.
Module
The non-secure kernel bootloader contains an embedded and likely stripped version of SceSysmem, SceKernelModulemgr, SceSblSmschedProxy, SceExcpmgr, SceKernelIntrMgr, SceSblAuthMgr, SceProcessmgr (maybe), SceSdif, SceIofilemgr (Simple version?), and some other core drivers.
How to debug NSKBL
NSKBL supports sd0: for debugging.
sysroot->boot_type_indicator_1:0x40000 is required.
types
/* Many ptrs are NSKBL heap relationships */ typedef struct SceNskblSysrootInfo { SceUID unk_0x00; // ex:0x10089 int unk_0x04; void *unk_0x08; void *unk_0x0C; void *unk_0x10; void *unk_0x14; void *unk_0x18; void *unk_0x1C; void *unk_0x20; void *unk_0x24; void *unk_0x28; void *unk_0x2C; SceUID unk_0x30; // ex:0x1000B const void *unk_0x34; // mapped paddr in vaddr const void *unk_0x38; // mapped paddr in vaddr void *unk_0x3C; int unk_0x40; // ex:0x80000000 int unk_0x44; // ex:0x20000000 void *unk_0x48; void *unk_0x4C; void *unk_0x50; void *unk_0x54; void *unk_0x58; void *unk_0x5C; void *unk_0x60; void *unk_0x64; void *unk_0x68; void *unk_0x6C; void *unk_0x70; void *unk_0x74; void *unk_0x78; void *unk_0x7C; void *unk_0x80; void *unk_0x84; void *unk_0x88; void *unk_0x8C; void *unk_0x90; void *unk_0x94; void *unk_0x98; uint32_t magic; // 0x19442EA8 int unk_0xA0; // ex:0x1000 int unk_0xA4; // ex:0x1000 int unk_0xA8; // ex:0x40000 int unk_0xAC; // ex:0x200000 int unk_0xB0; // ex:7 int unk_0xB4; int unk_0xB8; // ex:0x80 sysbase360_t *sysbase; void *unk_0xC0; void *unk_0xC4; // more...? } SceNskblSysrootInfo; // 3.60 SceNskblSysrootInfo *nskbl_sysroot_info = (SceNskblSysrootInfo *)(0x51000000 + 0x138980); // 3.60
Libraries
Known NIDs
Version | Name | World | Visibility | NID |
---|---|---|---|---|
3.60 | SceKblForKernel | Non-secure | Kernel | 0xD0FC2991 |
SceKblForKernel
sceKblPutcharForKernel
Version | NID |
---|---|
3.60 | 0x08E9FAEB |
In 3.60 this function is at 0x510172BD
int sceKblPutcharForKernel(void *args, char c);
sceKblPrintfForKernel
Version | NID |
---|---|
3.60 | 0x13A5ABEF |
In 3.60 this function is at 0x510137A9
int sceKblPrintfForKernel(const char *fmt, ...);
sceKblPrintfLevelForKernel
Version | NID |
---|---|
3.60 | 0x752E7EEC |
similar to sceKernelPrintfLevelForDriver.
In 3.60 this function is at 0x51013841.
sceKblGetMinimumLogLevelForKernel
Version | NID |
---|---|
3.60 | 0xC011935A |
In 3.60 this function is at 0x51013921.
int sceKblGetMinimumLogLevelForKernel(void);
sceKblGetPutcharHandlerForKernel
Version | NID |
---|---|
3.60 | 0x9B868276 |
In 3.60 this function is at 0x51013765.
void *sceKblGetPutcharHandlerForKernel(void);
sceKblSysrootProcessmgrStart2ForKernel
Version | NID |
---|---|
3.60 | 0x161D6FCC |
Similar to SceKblForKernel_0x1DB28F02
In 3.60 this function is at 0x510123DD
int sceKblSysrootProcessmgrStart2ForKernel(void);
sceKblSysrootThreadMgrStartAfterProcessForKernel
Version | NID |
---|---|
3.60 | 0x1DB28F02 |
In 3.60 this function is at 0x510123A1.
int sceKblSysrootThreadMgrStartAfterProcessForKernel(void);
sceKblSysrootIofilemgrStartForKernel
Version | NID |
---|---|
3.60 | 0xC7B77991 |
In 3.60 this function is at 0x5101297D.
int sceKblSysrootIofilemgrStartForKernel(void);
sceKblSysrootCpuCoreSyncAllForKernel
Version | NID |
---|---|
3.60 | 0x314AA770 |
In 3.60 this function is at 0x510124FD.
void sceKblSysrootCpuCoreSyncAllForKernel(void);
sceKblSysrootCpuCoreSyncWaitForKernel
Version | NID |
---|---|
3.60 | 0x807B4437 |
same to SceSysrootForKernel_8E4B61F1
In 3.60 this function is at 0x510124E5.
void sceKblSysrootCpuCoreSyncWaitForKernel(int core);
sceKblCpuSwitchInterruptsForKernel
Version | NID |
---|---|
3.60 | 0xDDB3A1A8 |
In 3.60 this function is at 0x51003554.
void sceKblCpuSwitchInterruptsForKernel(void);
sceKblIsCEXForKernel
Version | NID |
---|---|
3.60 | 0x8A416887 |
In 3.60 this function is at 0x510171B5.
int sceKblIsCEXForKernel(void);
sceKblIsCEXJpFatForKernel
Version | NID |
---|---|
3.60 | 0xC3DDDE15 |
In 3.60 this function is at 0x51017175.
int sceKblIsCEXJpFatForKernel(void);
sceKblIsDEXForKernel
Version | NID |
---|---|
3.60 | 0x5945F065 |
In 3.60 this function is at 0x51017159.
int sceKblIsDEXForKernel(void);
sceKblIsToolForKernel
Version | NID |
---|---|
3.60 | 0xB6C9ACF1 |
In 3.60 this function is at 0x51017139.
int sceKblIsToolForKernel(void);
sceKblIsTestForKernel
Version | NID |
---|---|
3.60 | 0x943E7537 |
In 3.60 this function is at 0x5101711D.
int sceKblIsTestForKernel(void);
sceKblIsVITAForKernel
Version | NID |
---|---|
3.60 | 0x838466E9 |
In 3.60 this function is at 0x51017299.
int sceKblIsVITAForKernel(void);
sceKblIsDolceForKernel
Version | NID |
---|---|
3.60 | 0xA7BD4417 |
In 3.60 this function is at 0x510172A1.
int sceKblIsDolceForKernel(void);
sceKblIsGenuineDolceForKernel
Version | NID |
---|---|
3.60 | 0xB6D00D6D |
In 3.60 this function is at 0x510171E5.
int sceKblIsGenuineDolceForKernel(void);
sceKblLoadModuleForKernel
Version | NID |
---|---|
3.60 | 0x6D7A1F18 |
In 3.60 this function is at 0x51001551.
typedef struct SceModuleLoadList { const char *filename; } __attribute__((packed)) SceModuleLoadList; int sceKblLoadModuleForKernel(const SceModuleLoadList *list, SceUID *uid, int count, int some_flag);
sceKblStartModuleForKernel
Version | NID |
---|---|
3.60 | 0x9A92436E |
In 3.60 this function is at 0x51001571
int sceKblStartModuleForKernel(SceUID *uid_list, int count, SceSize args, void *argp);
sceKblAuthMgrCloseForKernel
Version | NID |
---|---|
3.60 | 0x79241ACF |
In 3.60 this function is at 0x51001345.
int sceKblAuthMgrCloseForKernel(void);
sceKblSetNonSyncModuleStartForKernel
Version | NID |
---|---|
3.60 | 0x9F4F3F98 |
In 3.60 this function is at 0x51001561.
int sceKblSetNonSyncModuleStartForKernel(void);
sceKblGetCpuIdForKernel
Version | NID |
---|---|
3.60 | 0xB506A10E |
In 3.60 this function is at 0x510147C9.
int sceKblGetCpuIdForKernel(void);
sceKblCheckDipswForKernel
Version | NID |
---|---|
3.60 | 0xC8F4DE71 |
In 3.60 this function is at 0x51015851.
int sceKblCheckDipswForKernel(int bit);
sceKblIsAllowKernelDebugForKernel
Version | NID |
---|---|
3.60 | 0xCE94F329 |
same to sceQafMgrIsAllowKernelDebugForDriver
In 3.60 this function is at 0x51016FD1
int sceKblIsAllowKernelDebugForKernel(void);
sceKblGetHardwareFlagsForKernel
Version | NID |
---|---|
3.60 | 0xD3A516D5 |
get some device flags function
In 3.60 this function is at 0x510128AD
typedef struct SceSysrootHardwareFlags { uint32_t data[4]; } __attribute__((packed)) SceSysrootHardwareFlags; int sceKblGetHardwareFlagsForKernel(SceSysrootHardwareFlags *data);
sceKblInitDeviceForKernel
Version | NID |
---|---|
3.60 | 0xF7AF8690 |
some device init function
In 3.60 this function is at 0x5100124D.
int sceKblInitDeviceForKernel(void);
sceKblFreeFileSystemCtxForKernel
Version | NID |
---|---|
3.60 | 0x261F2747 |
In 3.60 this function is at 0x51001321.
int sceKblFreeFileSystemCtxForKernel(void);