Fixed a build issue
This commit is contained in:
parent
ca07af2fe9
commit
d48f6b62ce
@ -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[] = {
|
static const u8 MMUConfigPattern[] = {
|
||||||
0xC4, 0xDD, 0xFA, 0x1F,
|
0xC4, 0xDD, 0xFA, 0x1F,
|
||||||
@ -302,6 +302,8 @@ static inline void patchKernelFCRAMAndVRAMMappingPermissions(u8* arm11Section1)
|
|||||||
0x00, 0x50, 0xFF, 0x1F
|
0x00, 0x50, 0xFF, 0x1F
|
||||||
};
|
};
|
||||||
|
|
||||||
|
u8 *arm11Section1 = (u8 *)firm + section[1].offset;
|
||||||
|
|
||||||
u32* off = (u32 *)memsearch(arm11Section1, MMUConfigPattern, section[1].size, sizeof(MMUConfigPattern));
|
u32* off = (u32 *)memsearch(arm11Section1, MMUConfigPattern, section[1].size, sizeof(MMUConfigPattern));
|
||||||
if(off != NULL) off[1] &= ~(1 << 4); //clear XN bit
|
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;
|
*unitInfoOffset = unitInfoPatch;
|
||||||
|
|
||||||
//Make FCRAM (and VRAM as a side effect) globally executable from arm11 kernel
|
//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
|
//Replace the FIRM loader with the injector while copying section0
|
||||||
copySection0AndInjectLoader();
|
copySection0AndInjectLoader();
|
||||||
|
@ -38,6 +38,7 @@ typedef struct patchData {
|
|||||||
} patchData;
|
} patchData;
|
||||||
|
|
||||||
static inline void loadFirm(u32 firmType, u32 externalFirm);
|
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 patchNativeFirm(u32 nandType, u32 emuHeader, u32 a9lhMode);
|
||||||
static inline void patchEmuNAND(u8 *arm9Section, u8 *process9Offset, u32 process9Size, u32 emuHeader);
|
static inline void patchEmuNAND(u8 *arm9Section, u8 *process9Offset, u32 process9Size, u32 emuHeader);
|
||||||
static inline void patchReboots(u8 *process9Offset, u32 process9Size, u32 process9MemAddr);
|
static inline void patchReboots(u8 *process9Offset, u32 process9Size, u32 process9MemAddr);
|
||||||
|
Reference in New Issue
Block a user