Attempt to fix the boot issue
This commit is contained in:
parent
61ecd9a617
commit
6c5f6ac475
@ -49,17 +49,17 @@ void __attribute__((naked)) arm11Stub(void)
|
||||
{
|
||||
//Disable interrupts
|
||||
__asm(".word 0xF10C01C0");
|
||||
|
||||
|
||||
WAIT_FOR_ARM9();
|
||||
}
|
||||
|
||||
|
||||
static void invokeArm11Function(void (*func)())
|
||||
{
|
||||
static bool hasCopiedStub = false;
|
||||
|
||||
if(!hasCopiedStub)
|
||||
{
|
||||
memcpy((void *)ARM11_STUB_ADDRESS, arm11Stub, 0x30);
|
||||
memcpy((void *)ARM11_STUB_ADDRESS, arm11Stub, 0x2C);
|
||||
hasCopiedStub = true;
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ void deinitScreens(void)
|
||||
WAIT_FOR_ARM9();
|
||||
}
|
||||
|
||||
if(ARESCREENSINITED) invokeArm11Function(ARM11);
|
||||
if(ARESCREENSINITIALIZED) invokeArm11Function(ARM11);
|
||||
}
|
||||
|
||||
void updateBrightness(u32 brightnessIndex)
|
||||
@ -277,7 +277,7 @@ void initScreens(void)
|
||||
|
||||
if(needToSetup)
|
||||
{
|
||||
if(!ARESCREENSINITED)
|
||||
if(!ARESCREENSINITIALIZED)
|
||||
{
|
||||
flushDCacheRange(&configData, sizeof(CfgData));
|
||||
invokeArm11Function(initSequence);
|
||||
|
@ -31,9 +31,9 @@
|
||||
|
||||
#define PDN_GPU_CNT (*(vu8 *)0x10141200)
|
||||
|
||||
#define ARESCREENSINITED (PDN_GPU_CNT != 1)
|
||||
#define ARESCREENSINITIALIZED (PDN_GPU_CNT != 1)
|
||||
|
||||
#define ARM11_STUB_ADDRESS 0x1FFFFFC8
|
||||
#define ARM11_STUB_ADDRESS 0x1FFFFC00
|
||||
#define WAIT_FOR_ARM9() *arm11Entry = 0; while(!*arm11Entry); ((void (*)())*arm11Entry)();
|
||||
|
||||
#define SCREEN_TOP_WIDTH 400
|
||||
@ -54,4 +54,4 @@ void deinitScreens(void);
|
||||
void swapFramebuffers(bool isAlternate);
|
||||
void updateBrightness(u32 brightnessIndex);
|
||||
void clearScreens(bool isAlternate);
|
||||
void initScreens(void);
|
||||
void initScreens(void);
|
||||
|
@ -89,7 +89,7 @@ u32 waitInput(bool isMenu)
|
||||
|
||||
void mcuPowerOff(void)
|
||||
{
|
||||
if(!ISFIRMLAUNCH && ARESCREENSINITED) clearScreens(false);
|
||||
if(!ISFIRMLAUNCH && ARESCREENSINITIALIZED) clearScreens(false);
|
||||
|
||||
//Ensure that all memory transfers have completed and that the data cache has been flushed
|
||||
flushEntireDCache();
|
||||
@ -118,4 +118,4 @@ void error(const char *message)
|
||||
}
|
||||
|
||||
mcuPowerOff();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user