Merge pull request #1461 from Pixel-Pop/master
Patch DLP client region check
This commit is contained in:
commit
b15becb37a
@ -817,6 +817,16 @@ void patchCode(u64 progId, u16 progVer, u8 *code, u32 size, u32 textSize, u32 ro
|
|||||||
0x00, 0x00, 0x00, 0x00
|
0x00, 0x00, 0x00, 0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const u8 pattern2[] = {
|
||||||
|
0x20, 0x82, 0xa8, 0x7e, 0x00, 0x28, 0x00, 0xd0, 0x01, 0x20, 0xa0, 0x77
|
||||||
|
},
|
||||||
|
pattern3[] = {
|
||||||
|
0x42
|
||||||
|
},
|
||||||
|
patch2[] = {
|
||||||
|
0xC0, 0x46 // mov r8, r8
|
||||||
|
};
|
||||||
|
|
||||||
//Patch DLP region check
|
//Patch DLP region check
|
||||||
if(!patchMemory(code, textSize,
|
if(!patchMemory(code, textSize,
|
||||||
pattern,
|
pattern,
|
||||||
@ -824,6 +834,16 @@ void patchCode(u64 progId, u16 progVer, u8 *code, u32 size, u32 textSize, u32 ro
|
|||||||
patch,
|
patch,
|
||||||
sizeof(patch), 1
|
sizeof(patch), 1
|
||||||
)) goto error;
|
)) goto error;
|
||||||
|
|
||||||
|
// Patch DLP client region check
|
||||||
|
u8 *found = memsearch(code, pattern2, textSize, sizeof(pattern2));
|
||||||
|
|
||||||
|
if (!patchMemory(found, textSize,
|
||||||
|
pattern3,
|
||||||
|
sizeof(pattern3), 1,
|
||||||
|
patch2,
|
||||||
|
sizeof(patch2), 1
|
||||||
|
)) goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if((progId & ~0xF0000001ULL) == 0x0004013000001A02LL) //DSP, SAFE_FIRM DSP
|
else if((progId & ~0xF0000001ULL) == 0x0004013000001A02LL) //DSP, SAFE_FIRM DSP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user