mirror of
https://github.com/wiiu-env/PayloadLoaderPayload.git
synced 2024-11-14 14:05:05 +01:00
Remove unused code
This commit is contained in:
parent
8f46eb434b
commit
bf60cd9707
@ -30,26 +30,6 @@ 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);
|
||||
|
@ -29,8 +29,6 @@ extern "C" {
|
||||
|
||||
void doKernelSetup();
|
||||
|
||||
void doKernelSetup2();
|
||||
|
||||
void revertKernelHook();
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -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
|
@ -27,7 +27,6 @@
|
||||
#include <coreinit/filesystem.h>
|
||||
#include <whb/sdcard.h>
|
||||
#include <sys/stat.h>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <vpad/input.h>
|
||||
#include <vector>
|
||||
|
Loading…
Reference in New Issue
Block a user