Fixed a build issue

This commit is contained in:
TuxSH 2016-05-12 18:12:10 +02:00
parent ca07af2fe9
commit d48f6b62ce
2 changed files with 5 additions and 2 deletions

View File

@ -293,7 +293,7 @@ static inline void loadFirm(u32 firmType, u32 externalFirm)
}
}
static inline void patchKernelFCRAMAndVRAMMappingPermissions(u8* arm11Section1)
static inline void patchKernelFCRAMAndVRAMMappingPermissions(void)
{
static const u8 MMUConfigPattern[] = {
0xC4, 0xDD, 0xFA, 0x1F,
@ -302,6 +302,8 @@ static inline void patchKernelFCRAMAndVRAMMappingPermissions(u8* arm11Section1)
0x00, 0x50, 0xFF, 0x1F
};
u8 *arm11Section1 = (u8 *)firm + section[1].offset;
u32* off = (u32 *)memsearch(arm11Section1, MMUConfigPattern, section[1].size, sizeof(MMUConfigPattern));
if(off != NULL) off[1] &= ~(1 << 4); //clear XN bit
}
@ -373,7 +375,7 @@ static inline void patchNativeFirm(u32 nandType, u32 emuHeader, u32 a9lhMode)
*unitInfoOffset = unitInfoPatch;
//Make FCRAM (and VRAM as a side effect) globally executable from arm11 kernel
patchKernelFCRAMAndVRAMMappingPermissions(arm11Section1);
patchKernelFCRAMAndVRAMMappingPermissions();
}
//Replace the FIRM loader with the injector while copying section0
copySection0AndInjectLoader();

View File

@ -38,6 +38,7 @@ typedef struct patchData {
} patchData;
static inline void loadFirm(u32 firmType, u32 externalFirm);
static inline void patchKernelFCRAMAndVRAMMappingPermissions(void);
static inline void patchNativeFirm(u32 nandType, u32 emuHeader, u32 a9lhMode);
static inline void patchEmuNAND(u8 *arm9Section, u8 *process9Offset, u32 process9Size, u32 emuHeader);
static inline void patchReboots(u8 *process9Offset, u32 process9Size, u32 process9MemAddr);