Fix derp
This commit is contained in:
parent
5b4712644a
commit
fa13b8fbd0
@ -47,19 +47,17 @@ void installArm9Handlers(void)
|
|||||||
|
|
||||||
u32 installArm11Handlers(u32 *exceptionsPage, u32 stackAddress, u32 codeSetOffset)
|
u32 installArm11Handlers(u32 *exceptionsPage, u32 stackAddress, u32 codeSetOffset)
|
||||||
{
|
{
|
||||||
u32 ret = 0;
|
|
||||||
|
|
||||||
u32 *initFPU;
|
u32 *initFPU;
|
||||||
for(initFPU = exceptionsPage; initFPU < exceptionsPage + 0x400 && (initFPU[0] != 0xE59F0008 || initFPU[1] != 0xE5900000); initFPU++);
|
for(initFPU = exceptionsPage; initFPU < exceptionsPage + 0x400 && (initFPU[0] != 0xE59F0008 || initFPU[1] != 0xE5900000); initFPU++);
|
||||||
if(initFPU == exceptionsPage + 0x400) ret = 1;
|
|
||||||
|
|
||||||
u32 *freeSpace;
|
u32 *freeSpace;
|
||||||
for(freeSpace = initFPU; freeSpace < exceptionsPage + 0x400 && (freeSpace[0] != 0xFFFFFFFF || freeSpace[1] != 0xFFFFFFFF); freeSpace++);
|
for(freeSpace = initFPU; freeSpace < exceptionsPage + 0x400 && (freeSpace[0] != 0xFFFFFFFF || freeSpace[1] != 0xFFFFFFFF); freeSpace++);
|
||||||
if(initFPU == exceptionsPage + 0x400) ret = 1;
|
|
||||||
|
|
||||||
u32 *mcuReboot;
|
u32 *mcuReboot;
|
||||||
for(mcuReboot = exceptionsPage; mcuReboot < exceptionsPage + 0x400 && (mcuReboot[0] != 0xE59F4104 || mcuReboot[1] != 0xE3A0A0C2); mcuReboot++);
|
for(mcuReboot = exceptionsPage; mcuReboot < exceptionsPage + 0x400 && (mcuReboot[0] != 0xE59F4104 || mcuReboot[1] != 0xE3A0A0C2); mcuReboot++);
|
||||||
if(initFPU == exceptionsPage + 0x400) ret = 1;
|
|
||||||
|
u32 ret = (initFPU == exceptionsPage + 0x400 || freeSpace == exceptionsPage + 0x400 || mcuReboot == exceptionsPage + 0x400) ? 1 : 0;
|
||||||
|
|
||||||
mcuReboot--;
|
mcuReboot--;
|
||||||
|
|
||||||
memcpy(freeSpace, arm11_exceptions_bin + 32, arm11_exceptions_bin_size - 32);
|
memcpy(freeSpace, arm11_exceptions_bin + 32, arm11_exceptions_bin_size - 32);
|
||||||
|
Reference in New Issue
Block a user