Minor stuff

This commit is contained in:
Aurora 2016-10-10 17:30:53 +02:00
parent d4cf22d370
commit 9cf5b01633

View File

@ -326,8 +326,8 @@ void patchCode(u64 progId, u8 *code, u32 size)
{ {
static const u8 regionFreePattern[] = { static const u8 regionFreePattern[] = {
0x00, 0x00, 0x55, 0xE3, 0x01, 0x10, 0xA0 0x00, 0x00, 0x55, 0xE3, 0x01, 0x10, 0xA0
}; },
static const u8 regionFreePatch[] = { regionFreePatch[] = {
0x01, 0x00, 0xA0, 0xE3, 0x1E, 0xFF, 0x2F, 0xE1 0x01, 0x00, 0xA0, 0xE3, 0x1E, 0xFF, 0x2F, 0xE1
}; };
@ -349,8 +349,8 @@ void patchCode(u64 progId, u8 *code, u32 size)
{ {
static const u8 skipEshopUpdateCheckPattern[] = { static const u8 skipEshopUpdateCheckPattern[] = {
0x30, 0xB5, 0xF1, 0xB0 0x30, 0xB5, 0xF1, 0xB0
}; },
static const u8 skipEshopUpdateCheckPatch[] = { skipEshopUpdateCheckPatch[] = {
0x00, 0x20, 0x08, 0x60, 0x70, 0x47 0x00, 0x20, 0x08, 0x60, 0x70, 0x47
}; };
@ -395,8 +395,8 @@ void patchCode(u64 progId, u8 *code, u32 size)
{ {
static const u16 verPattern[] = u"Ver."; static const u16 verPattern[] = u"Ver.";
static u16 *verString; static u16 *verString;
u32 verStringSize = 0; u32 verStringSize = 0,
u32 currentNand = BOOTCFG_NAND; currentNand = BOOTCFG_NAND;
u16 customVerString[19]; u16 customVerString[19];
loadCustomVerString(customVerString, &verStringSize, currentNand); loadCustomVerString(customVerString, &verStringSize, currentNand);
@ -443,8 +443,8 @@ void patchCode(u64 progId, u8 *code, u32 size)
{ {
static const u8 stopCartUpdatesPattern[] = { static const u8 stopCartUpdatesPattern[] = {
0x0C, 0x18, 0xE1, 0xD8 0x0C, 0x18, 0xE1, 0xD8
}; },
static const u8 stopCartUpdatesPatch[] = { stopCartUpdatesPatch[] = {
0x0B, 0x18, 0x21, 0xC8 0x0B, 0x18, 0x21, 0xC8
}; };
@ -480,8 +480,8 @@ void patchCode(u64 progId, u8 *code, u32 size)
{ {
static const u8 secureinfoSigCheckPattern[] = { static const u8 secureinfoSigCheckPattern[] = {
0x06, 0x46, 0x10, 0x48 0x06, 0x46, 0x10, 0x48
}; },
static const u8 secureinfoSigCheckPatch[] = { secureinfoSigCheckPatch[] = {
0x00, 0x26 0x00, 0x26
}; };
@ -495,8 +495,8 @@ void patchCode(u64 progId, u8 *code, u32 size)
if(secureInfoExists()) if(secureInfoExists())
{ {
static const u16 secureinfoFilenamePattern[] = u"SecureInfo_"; static const u16 secureinfoFilenamePattern[] = u"SecureInfo_",
static const u16 secureinfoFilenamePatch[] = u"C"; secureinfoFilenamePatch[] = u"C";
//Use SecureInfo_C //Use SecureInfo_C
patchMemory(code, size, patchMemory(code, size,
@ -515,15 +515,14 @@ void patchCode(u64 progId, u8 *code, u32 size)
{ {
static const u8 sigCheckPattern[] = { static const u8 sigCheckPattern[] = {
0x30, 0x40, 0x2D, 0xE9, 0x02 0x30, 0x40, 0x2D, 0xE9, 0x02
}; },
static const u8 sha256ChecksPattern1[] = { sha256ChecksPattern1[] = {
0x30, 0x40, 0x2D, 0xE9, 0x24 0x30, 0x40, 0x2D, 0xE9, 0x24
}; },
static const u8 sha256ChecksPattern2[] = { sha256ChecksPattern2[] = {
0xF8, 0x4F, 0x2D, 0xE9, 0x01 0xF8, 0x4F, 0x2D, 0xE9, 0x01
}; },
stub[] = {
static const u8 stub[] = {
0x00, 0x00, 0xA0, 0xE3, 0x1E, 0xFF, 0x2F, 0xE1 // mov r0, #0; bx lr 0x00, 0x00, 0xA0, 0xE3, 0x1E, 0xFF, 0x2F, 0xE1 // mov r0, #0; bx lr
}; };
@ -559,13 +558,11 @@ void patchCode(u64 progId, u8 *code, u32 size)
{ {
static const u8 unitinfoCheckPattern1[] = { static const u8 unitinfoCheckPattern1[] = {
0x14, 0x00, 0xD0, 0xE5, 0xDB 0x14, 0x00, 0xD0, 0xE5, 0xDB
}; },
unitinfoCheckPattern2[] = {
static const u8 unitinfoCheckPattern2[] = {
0x14, 0x00, 0xD0, 0xE5, 0x01 0x14, 0x00, 0xD0, 0xE5, 0x01
} ; },
unitinfoCheckPatch[] = {
static const u8 unitinfoCheckPatch[] = {
0x00, 0x00, 0xA0, 0xE3 0x00, 0x00, 0xA0, 0xE3
} ; } ;