Minor stuff
This commit is contained in:
parent
014ac1cf72
commit
1704fbcd62
@ -46,9 +46,6 @@ static const u32 brightness[4] = {0x5F, 0x4C, 0x39, 0x26};
|
|||||||
|
|
||||||
void __attribute__((naked)) arm11Stub(void)
|
void __attribute__((naked)) arm11Stub(void)
|
||||||
{
|
{
|
||||||
//Disable interrupts
|
|
||||||
__asm(".word 0xF10C01C0");
|
|
||||||
|
|
||||||
//Wait for the entry to be set
|
//Wait for the entry to be set
|
||||||
while(*arm11Entry == ARM11_STUB_ADDRESS);
|
while(*arm11Entry == ARM11_STUB_ADDRESS);
|
||||||
|
|
||||||
@ -62,7 +59,6 @@ static void invokeArm11Function(void (*func)())
|
|||||||
if(!hasCopiedStub)
|
if(!hasCopiedStub)
|
||||||
{
|
{
|
||||||
memcpy((void *)ARM11_STUB_ADDRESS, arm11Stub, 0x30);
|
memcpy((void *)ARM11_STUB_ADDRESS, arm11Stub, 0x30);
|
||||||
flushDCacheRange((void *)ARM11_STUB_ADDRESS, 0x30);
|
|
||||||
hasCopiedStub = true;
|
hasCopiedStub = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#define PDN_GPU_CNT (*(vu8 *)0x10141200)
|
#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 WAIT_FOR_ARM9() *arm11Entry = 0; while(!*arm11Entry); ((void (*)())*arm11Entry)();
|
||||||
|
|
||||||
#define SCREEN_TOP_WIDTH 400
|
#define SCREEN_TOP_WIDTH 400
|
||||||
|
@ -31,14 +31,14 @@ launchedFirmTidLow:
|
|||||||
.hword 0, 0, 0, 0, 0, 0, 0, 0
|
.hword 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
|
||||||
start:
|
start:
|
||||||
@ Change the stack pointer
|
|
||||||
mov sp, #0x27000000
|
|
||||||
|
|
||||||
@ Disable interrupts
|
@ Disable interrupts
|
||||||
mrs r0, cpsr
|
mrs r0, cpsr
|
||||||
orr r0, #0x1C0
|
orr r0, #0x1C0
|
||||||
msr cpsr_cx, r0
|
msr cpsr_cx, r0
|
||||||
|
|
||||||
|
@ Change the stack pointer
|
||||||
|
mov sp, #0x27000000
|
||||||
|
|
||||||
@ Disable caches / MPU
|
@ Disable caches / MPU
|
||||||
mrc p15, 0, r0, c1, c0, 0 @ read control register
|
mrc p15, 0, r0, c1, c0, 0 @ read control register
|
||||||
bic r0, #(1<<12) @ - instruction cache disable
|
bic r0, #(1<<12) @ - instruction cache disable
|
||||||
|
Reference in New Issue
Block a user