Remove assumptions
This commit is contained in:
parent
248ea82f76
commit
973640f023
@ -177,7 +177,7 @@ u32 patchEmuNand(u8 *arm9Section, u32 arm9SectionSize, u8 *process9Offset, u32 p
|
||||
|
||||
//Copy EmuNAND code
|
||||
u8 *freeK9Space;
|
||||
ret += getFreeK9Space(arm9Section + 0x13500, arm9SectionSize - 0x13500, &freeK9Space);
|
||||
ret += getFreeK9Space(arm9Section, arm9SectionSize, &freeK9Space);
|
||||
if(!ret)
|
||||
{
|
||||
memcpy(freeK9Space, emunand_bin, emunand_bin_size);
|
||||
@ -198,7 +198,7 @@ u32 patchEmuNand(u8 *arm9Section, u32 arm9SectionSize, u8 *process9Offset, u32 p
|
||||
ret += patchNandRw(process9Offset, process9Size, (u32)(freeK9Space - arm9Section + kernel9Address));
|
||||
|
||||
//Set MPU
|
||||
ret += patchMpu(arm9Section + 0x13500, arm9SectionSize - 0x13500);
|
||||
ret += patchMpu(arm9Section, arm9SectionSize);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -127,7 +127,7 @@ u32 patchNativeFirm(u32 firmVersion, FirmwareSource nandType, u32 emuHeader, u32
|
||||
//Find the Process9 .code location, size and memory address
|
||||
u32 process9Size,
|
||||
process9MemAddr;
|
||||
u8 *process9Offset = getProcess9Info(arm9Section + 0x15000, firm->section[2].size - 0x15000, &process9Size, &process9MemAddr);
|
||||
u8 *process9Offset = getProcess9Info(arm9Section, firm->section[2].size, &process9Size, &process9MemAddr);
|
||||
|
||||
//Find the Kernel11 SVC table and handler, exceptions page and free space locations
|
||||
u32 baseK11VA;
|
||||
|
Reference in New Issue
Block a user