-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Arm9LoaderHax support, cleaned Makefile
- Loading branch information
1 parent
e34ca44
commit 6c25ed4
Showing
7 changed files
with
75 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.section .text.start | ||
.align 4 | ||
.global _start | ||
_start: | ||
@ Change the stack pointer | ||
mov sp, #0x27000000 | ||
|
||
@ Give read/write access to all the memory regions | ||
ldr r5, =0x33333333 | ||
mcr p15, 0, r5, c5, c0, 2 @ write data access | ||
mcr p15, 0, r5, c5, c0, 3 @ write instruction access | ||
|
||
@ Enable caches | ||
mrc p15, 0, r4, c1, c0, 0 @ read control register | ||
orr r4, r4, #(1<<12) @ - instruction cache enable | ||
orr r4, r4, #(1<<2) @ - data cache enable | ||
orr r4, r4, #(1<<0) @ - mpu enable | ||
mcr p15, 0, r4, c1, c0, 0 @ write control register | ||
|
||
@ Flush caches | ||
mov r5, #0 | ||
mcr p15, 0, r5, c7, c5, 0 @ flush I-cache | ||
mcr p15, 0, r5, c7, c6, 0 @ flush D-cache | ||
mcr p15, 0, r5, c7, c10, 4 @ drain write buffer | ||
|
||
@ Fixes mounting of SDMC | ||
ldr r0, =0x10000020 | ||
mov r1, #0x340 | ||
str r1, [r0] | ||
|
||
bl main | ||
|
||
.die: | ||
b .die |