mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 00:54:23 -04:00
fusee-cpp: add basic structural stubs
This commit is contained in:
parent
165c926135
commit
5f60bc7186
21 changed files with 1280 additions and 2 deletions
70
fusee_cpp/program/source/fusee_start.s
Normal file
70
fusee_cpp/program/source/fusee_start.s
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020 Atmosphère-NX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
.section .crt0._ZN3ams6nxboot5StartEv, "ax", %progbits
|
||||
.arm
|
||||
.align 5
|
||||
.global _ZN3ams6nxboot5StartEv
|
||||
.type _ZN3ams6nxboot5StartEv, %function
|
||||
_ZN3ams6nxboot5StartEv:
|
||||
/* Setup all registers as = 0. */
|
||||
msr cpsr_f, #0xC0
|
||||
mov r0, #0
|
||||
mov r1, #0
|
||||
mov r2, #0
|
||||
mov r3, #0
|
||||
mov r4, #0
|
||||
mov r5, #0
|
||||
mov r6, #0
|
||||
mov r7, #0
|
||||
mov r8, #0
|
||||
mov r9, #0
|
||||
mov r10, #0
|
||||
mov r11, #0
|
||||
mov r12, #0
|
||||
|
||||
/* Setup all modes as pointing to our exception handler. */
|
||||
msr cpsr_cf, #0xDF
|
||||
ldr sp, =0x40001000
|
||||
ldr lr, =_ZN3ams6nxboot16ExceptionHandlerEv
|
||||
|
||||
msr cpsr_cf, #0xD2
|
||||
ldr sp, =0x40001000
|
||||
ldr lr, =_ZN3ams6nxboot16ExceptionHandlerEv
|
||||
|
||||
msr cpsr_cf, #0xD1
|
||||
ldr sp, =0x40001000
|
||||
ldr lr, =_ZN3ams6nxboot16ExceptionHandlerEv
|
||||
|
||||
msr cpsr_cf, #0xD7
|
||||
ldr sp, =0x40001000
|
||||
ldr lr, =_ZN3ams6nxboot16ExceptionHandlerEv
|
||||
|
||||
msr cpsr_cf, #0xDB
|
||||
ldr sp, =0x40001000
|
||||
ldr lr, =_ZN3ams6nxboot16ExceptionHandlerEv
|
||||
|
||||
msr cpsr_cf, #0xD3
|
||||
ldr sp, =0x40001000
|
||||
ldr lr, =_ZN3ams6nxboot16ExceptionHandlerEv
|
||||
|
||||
/* Perform runtime initialization. */
|
||||
ldr r0, =__bss_start__
|
||||
ldr r1, =__bss_end__
|
||||
bl _ZN3ams6nxboot4crt010InitializeEjj
|
||||
|
||||
/* Perform nx boot procedure. */
|
||||
bl _ZN3ams6nxboot4MainEv
|
Loading…
Add table
Add a link
Reference in a new issue