Don't make any assumption regarding version when loading an external firmware file.
This commit is contained in:
parent
389a169443
commit
18b5cdcddf
@ -273,8 +273,8 @@ static inline u32 loadFirm(FirmwareType firmType)
|
||||
if(!fileRead(firm, "/luma/firmware.bin") || (((u32)section[2].address >> 8) & 0xFF) != 0x68)
|
||||
error("An old unsupported FIRM has been detected.\nCopy firmware.bin in /luma to boot");
|
||||
|
||||
//9.6 O3DS FIRM
|
||||
firmVersion = 0x49;
|
||||
//No assumption regarding FIRM version
|
||||
firmVersion = 0xffffffff;
|
||||
}
|
||||
else decryptExeFs((u8 *)firm);
|
||||
|
||||
|
@ -119,6 +119,8 @@ void reimplementSvcBackdoor(u8 *pos, u32 size)
|
||||
u32 *svcTable = (u32 *)(pos + *(u32 *)(pos + 0xFFFF0008 - svcOffset - 0xFFF00000 + 8) - 0xFFF00000); //SVC handler address
|
||||
while(*svcTable) svcTable++; //Look for SVC0 (NULL)
|
||||
|
||||
if(svcTable[0x7B] == 0)
|
||||
{
|
||||
u32 *freeSpace;
|
||||
for(freeSpace = exceptionsPage; *freeSpace != 0xFFFFFFFF; freeSpace++);
|
||||
|
||||
@ -126,6 +128,7 @@ void reimplementSvcBackdoor(u8 *pos, u32 size)
|
||||
|
||||
svcTable[0x7B] = 0xFFFF0000 + ((u8 *)freeSpace - (u8 *)exceptionsPage);
|
||||
}
|
||||
}
|
||||
|
||||
void patchTitleInstallMinVersionCheck(u8 *pos, u32 size)
|
||||
{
|
||||
@ -133,7 +136,7 @@ void patchTitleInstallMinVersionCheck(u8 *pos, u32 size)
|
||||
|
||||
u8 *off = memsearch(pos, pattern, size, 4);
|
||||
|
||||
off[4] = 0xE0;
|
||||
if(off != NULL) off[4] = 0xE0;
|
||||
}
|
||||
|
||||
void applyLegacyFirmPatches(u8 *pos, FirmwareType firmType)
|
||||
|
Reference in New Issue
Block a user