Fix patchSvcBreak11

This commit is contained in:
TuxSH 2017-04-15 23:11:53 +02:00
parent 2ff4fc3cdd
commit 07bbff7d11
3 changed files with 4 additions and 4 deletions

View File

@ -190,7 +190,7 @@ u32 patchNativeFirm(u32 firmVersion, FirmwareSource nandType, u32 emuHeader, boo
u32 codeSetOffset,
stackAddress = getInfoForArm11ExceptionHandlers(arm11Section1, firm->section[1].size, &codeSetOffset);
ret += installArm11Handlers(arm11ExceptionsPage, stackAddress, codeSetOffset, arm11DAbtHandler, baseK11VA + ((u8 *)arm11DAbtHandler - arm11Section1));
patchSvcBreak11(arm11Section1, arm11SvcTable);
patchSvcBreak11(arm11Section1, arm11SvcTable, baseK11VA);
ret += patchKernel11Panic(arm11Section1, firm->section[1].size);
//ARM9 exception handlers

View File

@ -404,10 +404,10 @@ u32 patchSvcBreak9(u8 *pos, u32 size, u32 kernel9Address)
return 0;
}
void patchSvcBreak11(u8 *pos, u32 *arm11SvcTable)
void patchSvcBreak11(u8 *pos, u32 *arm11SvcTable, u32 baseK11VA)
{
//Same as above, for NATIVE_FIRM ARM11
u32 *addr = (u32 *)(pos + arm11SvcTable[0x3C] - 0xFFF00000);
u32 *addr = (u32 *)(pos + arm11SvcTable[0x3C] - baseK11VA);
*addr = 0xE12FFF7F;
}

View File

@ -53,7 +53,7 @@ u32 implementSvcGetCFWInfo(u8 *pos, u32 *arm11SvcTable, u32 baseK11VA, u8 **free
u32 patchArm9ExceptionHandlersInstall(u8 *pos, u32 size);
u32 getInfoForArm11ExceptionHandlers(u8 *pos, u32 size, u32 *codeSetOffset);
u32 patchSvcBreak9(u8 *pos, u32 size, u32 kernel9Address);
void patchSvcBreak11(u8 *pos, u32 *arm11SvcTable);
void patchSvcBreak11(u8 *pos, u32 *arm11SvcTable, u32 baseK11VA);
u32 patchKernel9Panic(u8 *pos, u32 size);
u32 patchKernel11Panic(u8 *pos, u32 size);
u32 patchP9AccessChecks(u8 *pos, u32 size);