genode/repos/base-hw/src/core/spec/riscv/crt0.s
Sebastian Sumpf c246a0d194 base-hw: initial RISC-V support
using the spike instruction emulator

issue #1880
2016-02-26 11:36:51 +01:00

28 lines
556 B
ArmAsm

/**
* \brief Startup code for the core's userland part
* \author Sebastian Sumpf
* \date 2015-09-12
*/
/*
* Copyright (C) 2015-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
.section ".text"
.global _core_start
_core_start:
/* create environment for main thread */
jal init_main_thread
/* load stack pointer from init_main_thread_result */
la sp, init_main_thread_result
ld sp, (sp)
/* jump into init C-code */
j _main