mirror of
https://github.com/wiiu-env/fw_img_payload.git
synced 2024-11-16 17:59:19 +01:00
Remove unused code
This commit is contained in:
parent
5df4429561
commit
1f8b1a3bee
@ -25,32 +25,10 @@
|
||||
|
||||
/* assembly functions */
|
||||
extern "C" void Syscall_0x36(void);
|
||||
extern "C" void KernelPatchesRevertHook(void);
|
||||
extern "C" void KernelPatches(void);
|
||||
|
||||
void __attribute__ ((noinline)) kern_write(void *addr, uint32_t value);
|
||||
|
||||
extern "C" void SC_0x25_KernelCopyData(unsigned int addr, unsigned int src, unsigned int len);
|
||||
|
||||
extern "C" void SCKernelCopyData(unsigned int addr, unsigned int src, unsigned int len);
|
||||
|
||||
void KernelWriteU32(uint32_t addr, uint32_t value) {
|
||||
ICInvalidateRange(&value, 4);
|
||||
DCFlushRange(&value, 4);
|
||||
|
||||
auto dst = (uint32_t) OSEffectiveToPhysical(addr);
|
||||
auto src = (uint32_t) OSEffectiveToPhysical((uint32_t) &value);
|
||||
|
||||
SC_0x25_KernelCopyData(dst, src, 4);
|
||||
|
||||
DCFlushRange((void *) addr, 4);
|
||||
ICInvalidateRange((void *) addr, 4);
|
||||
}
|
||||
|
||||
void revertMainHook() {
|
||||
KernelWriteU32(0x0101c56c, 0x4E800421);
|
||||
}
|
||||
|
||||
void doKernelSetup() {
|
||||
kern_write((void *) (KERN_SYSCALL_TBL_1 + (0x36 * 4)), (unsigned int) KernelPatches);
|
||||
kern_write((void *) (KERN_SYSCALL_TBL_2 + (0x36 * 4)), (unsigned int) KernelPatches);
|
||||
|
@ -1,27 +0,0 @@
|
||||
.global SCKernelCopyData
|
||||
SCKernelCopyData:
|
||||
// Disable data address translation
|
||||
mfmsr %r6
|
||||
li %r7, 0x10
|
||||
andc %r6, %r6, %r7
|
||||
mtmsr %r6
|
||||
|
||||
// Copy data
|
||||
addi %r3, %r3, -1
|
||||
addi %r4, %r4, -1
|
||||
mtctr %r5
|
||||
SCKernelCopyData_loop:
|
||||
lbzu %r5, 1(%r4)
|
||||
stbu %r5, 1(%r3)
|
||||
bdnz SCKernelCopyData_loop
|
||||
|
||||
// Enable data address translation
|
||||
ori %r6, %r6, 0x10
|
||||
mtmsr %r6
|
||||
blr
|
||||
|
||||
.global SC_0x25_KernelCopyData
|
||||
SC_0x25_KernelCopyData:
|
||||
li %r0, 0x2500
|
||||
sc
|
||||
blr
|
@ -26,8 +26,6 @@ extern "C" uint32_t _start(int argc, char **argv) {
|
||||
DEBUG_FUNCTION_LINE("Hello from cfw_booter");
|
||||
|
||||
ExecuteIOSExploit();
|
||||
|
||||
revertMainHook();
|
||||
|
||||
OSForceFullRelaunch();
|
||||
SYSLaunchMenu();
|
||||
|
Loading…
Reference in New Issue
Block a user