Minor stuff

This commit is contained in:
Aurora Wright 2017-04-26 18:04:02 +02:00
parent b5eba765a5
commit c5369a5cad
2 changed files with 6 additions and 5 deletions

View File

@ -278,7 +278,7 @@ static inline void patchCfgGetRegion(u8 *code, u32 size, u8 regionId, u32 CFGUHa
} }
} }
static u32 findFunctionStart(u8* code, u32 pos) static u32 findFunctionStart(u8 *code, u32 pos)
{ {
while(pos >= 4) while(pos >= 4)
{ {
@ -289,7 +289,7 @@ static u32 findFunctionStart(u8* code, u32 pos)
return 0xFFFFFFFF; return 0xFFFFFFFF;
} }
static inline bool findLayeredFsSymbols(u8* code, u32 size, u32 *fsMountArchive, u32 *fsRegisterArchive, u32 *fsTryOpenFile, u32 *fsOpenFileDirectly) static inline bool findLayeredFsSymbols(u8 *code, u32 size, u32 *fsMountArchive, u32 *fsRegisterArchive, u32 *fsTryOpenFile, u32 *fsOpenFileDirectly)
{ {
for(u32 addr = 0; addr <= size - 4; addr += 4) for(u32 addr = 0; addr <= size - 4; addr += 4)
{ {
@ -324,7 +324,7 @@ static inline bool findLayeredFsSymbols(u8* code, u32 size, u32 *fsMountArchive,
return false; return false;
} }
static inline bool findLayeredFsPayloadOffset(u8* code, u32 size, u32 *payloadOffset) static inline bool findLayeredFsPayloadOffset(u8 *code, u32 size, u32 *payloadOffset)
{ {
//First check for sufficient padding at the end of the .text segment //First check for sufficient padding at the end of the .text segment
if(((size + 4095) & 0xFFFFF000) - size >= romfsredir_bin_size) if(((size + 4095) & 0xFFFFF000) - size >= romfsredir_bin_size)
@ -510,7 +510,7 @@ exit:
return ret; return ret;
} }
static inline bool patchLayeredFs(u64 progId, u8* code, u32 size) static inline bool patchLayeredFs(u64 progId, u8 *code, u32 size)
{ {
/* Here we look for "/luma/titles/[u64 titleID in hex, uppercase]/romfs" /* Here we look for "/luma/titles/[u64 titleID in hex, uppercase]/romfs"
If it exists it should be a folder containing ROMFS files */ If it exists it should be a folder containing ROMFS files */

View File

@ -240,7 +240,8 @@ boot:
bool loadFromStorage = CONFIG(LOADEXTFIRMSANDMODULES); bool loadFromStorage = CONFIG(LOADEXTFIRMSANDMODULES);
u32 firmVersion = loadFirm(&firmType, firmSource, loadFromStorage, isSafeMode); u32 firmVersion = loadFirm(&firmType, firmSource, loadFromStorage, isSafeMode);
bool doUnitinfoPatch = CONFIG(PATCHUNITINFO), enableExceptionHandlers = CONFIG(ENABLEEXCEPTIONHANDLERS); bool doUnitinfoPatch = CONFIG(PATCHUNITINFO),
enableExceptionHandlers = CONFIG(ENABLEEXCEPTIONHANDLERS);
u32 res; u32 res;
switch(firmType) switch(firmType)
{ {