Merge branch 'master' of https://github.com/AuroraWright/Luma3DS
This commit is contained in:
commit
bea73c51ae
@ -6,7 +6,6 @@
|
||||
vars:
|
||||
orig: .word 0
|
||||
SleepThread: .word 0
|
||||
UnmapProcessMemory: .word 0
|
||||
skip_vars:
|
||||
push {r0-r4, lr}
|
||||
ldr r4, =0x1ff81108
|
||||
@ -17,18 +16,12 @@ skip_vars:
|
||||
bne loop_end
|
||||
|
||||
ldr r12, [SleepThread]
|
||||
ldr r0, =(50 * 1000 * 1000)
|
||||
ldr r0, =(10 * 1000 * 1000)
|
||||
mov r1, #0
|
||||
blx r12
|
||||
b loop
|
||||
|
||||
loop_end:
|
||||
; Attempt flushing caches
|
||||
mov r0, #0
|
||||
mov r1, #0
|
||||
mov r2, #0
|
||||
ldr r12, [UnmapProcessMemory]
|
||||
blx r12
|
||||
pop {r0-r4, lr}
|
||||
mov r12, #0x40000000
|
||||
add r12, #4
|
||||
|
@ -181,7 +181,7 @@ void installK11MainHook(u8 *pos, u32 size, bool isSafeMode, u32 baseK11VA, u32 *
|
||||
void installSvcConnectToPortInitHook(u32 *arm11SvcTable, u32 *arm11ExceptionsPage, u8 **freeK11Space)
|
||||
{
|
||||
u32 addr = 0xFFFF0000 + (u32)*freeK11Space - (u32)arm11ExceptionsPage;
|
||||
u32 svcSleepThreadAddr = arm11SvcTable[0x0A], svcConnectToPortAddr = arm11SvcTable[0x2D], svcUnmapProcessMemoryAddr = arm11SvcTable[0x72];
|
||||
u32 svcSleepThreadAddr = arm11SvcTable[0x0A], svcConnectToPortAddr = arm11SvcTable[0x2D];
|
||||
|
||||
arm11SvcTable[0x2D] = addr;
|
||||
memcpy(*freeK11Space, svcConnectToPortInitHook_bin, svcConnectToPortInitHook_bin_size);
|
||||
@ -189,7 +189,6 @@ void installSvcConnectToPortInitHook(u32 *arm11SvcTable, u32 *arm11ExceptionsPag
|
||||
u32 *off = (u32 *)(*freeK11Space);
|
||||
off[1] = svcConnectToPortAddr;
|
||||
off[2] = svcSleepThreadAddr;
|
||||
off[3] = svcUnmapProcessMemoryAddr;
|
||||
|
||||
(*freeK11Space) += svcConnectToPortInitHook_bin_size;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
bool isExceptionFatal(u32 spsr, u32 *regs, u32 index)
|
||||
{
|
||||
if (CONFIG(DISABLEVECTORS)) return false;
|
||||
//if(CONFIG(DISABLEVECTORS)) return false;
|
||||
|
||||
if((spsr & 0x1f) != 0x10) return true;
|
||||
|
||||
|
@ -32,7 +32,6 @@ Result ConnectToPortHook(Handle *out, const char *name)
|
||||
{
|
||||
char portName[12] = {0};
|
||||
Result res = 0;
|
||||
|
||||
if(name != NULL)
|
||||
{
|
||||
s32 nb = usrToKernelStrncpy(portName, name, 12);
|
||||
|
Reference in New Issue
Block a user