diff --git a/source/screen.c b/source/screen.c index 13bd373..fb8693e 100644 --- a/source/screen.c +++ b/source/screen.c @@ -46,9 +46,6 @@ static const u32 brightness[4] = {0x5F, 0x4C, 0x39, 0x26}; void __attribute__((naked)) arm11Stub(void) { - //Disable interrupts - __asm(".word 0xF10C01C0"); - //Wait for the entry to be set while(*arm11Entry == ARM11_STUB_ADDRESS); @@ -62,7 +59,6 @@ static void invokeArm11Function(void (*func)()) if(!hasCopiedStub) { memcpy((void *)ARM11_STUB_ADDRESS, arm11Stub, 0x30); - flushDCacheRange((void *)ARM11_STUB_ADDRESS, 0x30); hasCopiedStub = true; } diff --git a/source/screen.h b/source/screen.h index af0f6ad..a774d29 100644 --- a/source/screen.h +++ b/source/screen.h @@ -31,7 +31,7 @@ #define PDN_GPU_CNT (*(vu8 *)0x10141200) -#define ARM11_STUB_ADDRESS (0x25000000 - 0x30) //It's currently only 0x28 bytes large. We're putting 0x30 just to be sure here +#define ARM11_STUB_ADDRESS 0x1FFFFFC8 #define WAIT_FOR_ARM9() *arm11Entry = 0; while(!*arm11Entry); ((void (*)())*arm11Entry)(); #define SCREEN_TOP_WIDTH 400 diff --git a/source/start.s b/source/start.s index b18a7bc..d51774a 100644 --- a/source/start.s +++ b/source/start.s @@ -31,14 +31,14 @@ launchedFirmTidLow: .hword 0, 0, 0, 0, 0, 0, 0, 0 start: - @ Change the stack pointer - mov sp, #0x27000000 - @ Disable interrupts mrs r0, cpsr orr r0, #0x1C0 msr cpsr_cx, r0 + @ Change the stack pointer + mov sp, #0x27000000 + @ Disable caches / MPU mrc p15, 0, r0, c1, c0, 0 @ read control register bic r0, #(1<<12) @ - instruction cache disable