Skip to content

Commit

Permalink
Add extra patches
Browse files Browse the repository at this point in the history
  • Loading branch information
ethylamine authored May 10, 2020
1 parent 906a52a commit 20c6fa6
Showing 1 changed file with 79 additions and 1 deletion.
80 changes: 79 additions & 1 deletion src/Boot/Patches/Patches405.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,83 @@ void Patches::install_prerunPatches_405()
kmem[2] = 0xC0;
kmem[3] = 0x90;
kmem[4] = 0x90;

// sceSblACMgrIsAllowedSystemLevelDebugging
kmem = (uint8_t *)&gKernelBase[0x0035FE40];
kmem[0] = 0xB8;
kmem[1] = 0x01;
kmem[2] = 0x00;
kmem[3] = 0x00;
kmem[4] = 0x00;
kmem[5] = 0xC3;
kmem[6] = 0x90;
kmem[7] = 0x90;

kmem = (uint8_t *)&gKernelBase[0x00360570];
kmem[0] = 0xB8;
kmem[1] = 0x01;
kmem[2] = 0x00;
kmem[3] = 0x00;
kmem[4] = 0x00;
kmem[5] = 0xC3;
kmem[6] = 0x90;
kmem[7] = 0x90;

kmem = (uint8_t *)&gKernelBase[0x00360590];
kmem[0] = 0xB8;
kmem[1] = 0x01;
kmem[2] = 0x00;
kmem[3] = 0x00;
kmem[4] = 0x00;
kmem[5] = 0xC3;
kmem[6] = 0x90;
kmem[7] = 0x90;


// Patch to remove vm_fault: fault on nofault entry, addr %llx
kmem = (uint8_t*)&gKernelBase[0x000C6991];
kmem[0] = 0x90;
kmem[1] = 0x90;
kmem[2] = 0x90;
kmem[3] = 0x90;
kmem[4] = 0x90;
kmem[5] = 0x90;

// patch mprotect to allow RWX (mprotect) mapping 4.05
kmem = (uint8_t *)&gKernelBase[0x004423E9];
kmem[0] = 0x90;
kmem[1] = 0x90;
kmem[2] = 0x90;
kmem[3] = 0x90;
kmem[4] = 0x90;
kmem[5] = 0x90;


// flatz disable pfs signature check
kmem = (uint8_t *)&gKernelBase[0x0068E990];
kmem[0] = 0x31;
kmem[1] = 0xC0;
kmem[2] = 0xC3;
kmem[3] = 0x90;

// flatz enable debug RIFs
kmem = (uint8_t *)&gKernelBase[0x00620B20];
kmem[0] = 0xB0;
kmem[1] = 0x01;
kmem[2] = 0xC3;
kmem[3] = 0x90;

kmem = (uint8_t *)&gKernelBase[0x00620B40];
kmem[0] = 0xB0;
kmem[1] = 0x01;
kmem[2] = 0xC3;
kmem[3] = 0x90;

// patch suword_lwpid
// has a check to see if child_tid/parent_tid is in kernel memory, and it in so patch it
// Patch by: JOGolden
kmem = (uint8_t *)&gKernelBase[0x00287074];
kmem[0] = 0x90;
kmem[1] = 0x90
#endif
}
}

0 comments on commit 20c6fa6

Please sign in to comment.