Permalink
Browse files

revert peek and poke

  • Loading branch information...
Reisyukaku committed Dec 19, 2018
1 parent 46ef4da commit 1e70ffffaab5deed5edf09f70205cc0b0d846c1c
Showing with 1 addition and 19 deletions.
  1. +1 −9 src/firmware.c
  2. +0 −10 src/package.h
@@ -253,7 +253,7 @@ void patchKernel(pkg2_hdr_t *pkg2){
if(!customKern) {
u32 crc = crc32c(pkg2->data, pkg2->sec_size[PKG2_SEC_KERNEL]);
uPtr kern = (uPtr)&pkg2->data;
uPtr sendOff, recvOff, codeRcvOff, codeSndOff, svcVerifOff, svcDebugOff, ver, peek, poke;
uPtr sendOff, recvOff, codeRcvOff, codeSndOff, svcVerifOff, svcDebugOff, ver;
switch(crc){
case 0x427f2647:{ //1.0.0
svcVerifOff = 0x3764C;
@@ -312,8 +312,6 @@ void patchKernel(pkg2_hdr_t *pkg2){
recvOff = 0x28DAC;
codeSndOff = 8;
codeRcvOff = 8;
peek = 0x42D3C;
poke = 0x42E00;
ver = 5;
break;
}
@@ -324,8 +322,6 @@ void patchKernel(pkg2_hdr_t *pkg2){
recvOff = 0x29B6C;
codeSndOff = 0x10;
codeRcvOff = 0x10;
peek = 0x44E84;
poke = 0x44F48;
ver = 6;
break;
}
@@ -356,10 +352,6 @@ void patchKernel(pkg2_hdr_t *pkg2){
fclose();
*(vu32*)(kern + svcDebugOff) = _MOVZX(8, 1, 0);
}
if(peek && poke) {
memcpy((void*)(kern + peek), peekPayload, sizeof(peekPayload));
memcpy((void*)(kern + poke), pokePayload, sizeof(pokePayload));
}

end:;
}
@@ -128,16 +128,6 @@ typedef struct kippatchset_s {
kippatch_t *patches; // set of patches for this version of the kip
} kippatchset_t;

//SVCs
static u8 peekPayload[] = {
0xFD, 0x7B, 0xBF, 0xA9, 0xFD, 0x03, 0x00, 0x91, 0x00, 0x00, 0x40, 0xB9,
0xFD, 0x7B, 0xC1, 0xA8, 0xC0, 0x03, 0x5F, 0xD6
};
static u8 pokePayload[] = {
0xFD, 0x7B, 0xBF, 0xA9, 0xFD, 0x03, 0x00, 0x91, 0x01, 0x00, 0x00, 0xB9,
0xFD, 0x7B, 0xC1, 0xA8, 0xC0, 0x03, 0x5F, 0xD6
};

//FS_MITM
static u32 PRC_ID_SND_100[] =
{

0 comments on commit 1e70fff

Please sign in to comment.