rosalina: add hidden debug info menu

This commit is contained in:
TuxSH
2020-05-17 22:48:26 +01:00
parent 9097276a06
commit b02d0346fd
9 changed files with 159 additions and 68 deletions

View File

@@ -132,6 +132,7 @@ typedef struct CfwInfo
} CfwInfo;
extern CfwInfo cfwInfo;
extern u32 kextBasePa;
extern vu32 rosalinaState;
extern bool hasStartedRosalinaNetworkFuncsOnce;

View File

@@ -108,6 +108,7 @@ void (*mcuReboot)(void);
void (*coreBarrier)(void);
CfwInfo cfwInfo;
u32 kextBasePa;
vu32 rosalinaState;
bool hasStartedRosalinaNetworkFuncsOnce;

View File

@@ -271,6 +271,7 @@ void main(FcramLayout *layout, KCoreContext *ctxs)
memcpy(L1MMUTableAddrs, (const void *)p->L1MMUTableAddrs, 16);
exceptionStackTop = (u32 *)0xFFFF2000 + (1 << (32 - TTBCR - 20));
cfwInfo = p->cfwInfo;
kextBasePa = p->basePA;
memcpy(originalHandlers + 1, p->originalHandlers, 16);
void **arm11SvcTable = (void**)originalHandlers[2];

View File

@@ -79,7 +79,7 @@ Result GetSystemInfoHook(s64 *out, s32 type, s32 param)
break;
case 0x300: // K11Ext size
*out = (s64)(__end__ - __start__);
*out = (s64)(((u64)kextBasePa << 32) | (u64)(__end__ - __start__));
break;
default: