diff --git a/patches/svcConnectToPortInitHook.s b/patches/svcConnectToPortInitHook.s index 03a02b0..258794c 100644 --- a/patches/svcConnectToPortInitHook.s +++ b/patches/svcConnectToPortInitHook.s @@ -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 diff --git a/source/patches.c b/source/patches.c index 21524a6..4abca77 100644 --- a/source/patches.c +++ b/source/patches.c @@ -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; } diff --git a/sysmodules/rosalina/kernel_extension/source/fatalExceptionHandlersMain.c b/sysmodules/rosalina/kernel_extension/source/fatalExceptionHandlersMain.c index 9d7bd74..6353675 100644 --- a/sysmodules/rosalina/kernel_extension/source/fatalExceptionHandlersMain.c +++ b/sysmodules/rosalina/kernel_extension/source/fatalExceptionHandlersMain.c @@ -35,8 +35,8 @@ bool isExceptionFatal(u32 spsr, u32 *regs, u32 index) { - if (CONFIG(DISABLEVECTORS)) return false; - + //if(CONFIG(DISABLEVECTORS)) return false; + if((spsr & 0x1f) != 0x10) return true; KThread *thread = currentCoreContext->objectContext.currentThread; diff --git a/sysmodules/rosalina/kernel_extension/source/svc/ConnectToPort.c b/sysmodules/rosalina/kernel_extension/source/svc/ConnectToPort.c index 21de9e5..9575cf6 100644 --- a/sysmodules/rosalina/kernel_extension/source/svc/ConnectToPort.c +++ b/sysmodules/rosalina/kernel_extension/source/svc/ConnectToPort.c @@ -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);