From 6b8895351773d71cffbbdf60a24f59f5654fadd4 Mon Sep 17 00:00:00 2001 From: Aurora Date: Sun, 20 Mar 2016 22:03:43 +0100 Subject: [PATCH] Moved D9 launching fix to the loader --- loader/source/start.s | 3 +++ source/main.c | 3 --- source/start.s | 11 +++-------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/loader/source/start.s b/loader/source/start.s index 9552958..4cd3d0a 100644 --- a/loader/source/start.s +++ b/loader/source/start.s @@ -2,6 +2,9 @@ .align 4 .global _start _start: + @ Fix payloads like Decrypt9 + mov r0, #0x5 + mcr p15, 0, r0, c3, c0, 0 @ data bufferable @ Flush caches mov r0, #0 diff --git a/source/main.c b/source/main.c index e071a50..46cc840 100644 --- a/source/main.c +++ b/source/main.c @@ -13,9 +13,6 @@ void main(void){ mountSD(); setupCFW(); -} - -void startCFW(void){ if(!loadFirm()) return; if(!patchFirm()) return; launchFirm(); diff --git a/source/start.s b/source/start.s index 1ef54f0..7d2b461 100644 --- a/source/start.s +++ b/source/start.s @@ -27,10 +27,9 @@ _start: mcr p15, 0, r5, c6, c5, 0 mcr p15, 0, r6, c6, c6, 0 mcr p15, 0, r7, c6, c7, 0 - mov r4, #0x25 - mov r0, #0x5 - mcr p15, 0, r4, c2, c0, 0 @ data cacheable - mcr p15, 0, r4, c2, c0, 1 @ instruction cacheable + mov r0, #0x25 + mcr p15, 0, r0, c2, c0, 0 @ data cacheable + mcr p15, 0, r0, c2, c0, 1 @ instruction cacheable mcr p15, 0, r0, c3, c0, 0 @ data bufferable @ Enable caches @@ -53,10 +52,6 @@ _start: bl main - mcr p15, 0, r4, c3, c0, 0 @ data bufferable - - bl startCFW - bl shutdown .die: