2015-03-09 15:00:58 +01:00
|
|
|
/**
|
|
|
|
* \brief Startup code for core on ARM
|
2012-05-30 20:13:09 +02:00
|
|
|
* \author Stefan Kalkowski
|
2015-03-09 15:00:58 +01:00
|
|
|
* \date 2015-03-06
|
2012-05-30 20:13:09 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2015-03-09 15:00:58 +01:00
|
|
|
* Copyright (C) 2015 Genode Labs GmbH
|
2012-05-30 20:13:09 +02:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
2013-12-18 17:07:35 +01:00
|
|
|
|
2015-03-09 15:00:58 +01:00
|
|
|
/**************************
|
|
|
|
** .text (program code) **
|
|
|
|
**************************/
|
2013-12-17 18:10:02 +01:00
|
|
|
|
2015-03-09 15:00:58 +01:00
|
|
|
.section ".text"
|
2012-10-23 17:12:09 +02:00
|
|
|
|
2015-03-09 15:00:58 +01:00
|
|
|
/* program entry-point */
|
|
|
|
.global _core_start
|
|
|
|
_core_start:
|
2012-05-30 20:13:09 +02:00
|
|
|
|
2015-03-09 15:00:58 +01:00
|
|
|
/* create proper environment for main thread */
|
|
|
|
bl init_main_thread
|
2012-05-30 20:13:09 +02:00
|
|
|
|
2015-03-09 15:00:58 +01:00
|
|
|
/* apply environment that was created by init_main_thread */
|
|
|
|
ldr sp, =init_main_thread_result
|
|
|
|
ldr sp, [sp]
|
2013-12-17 18:10:02 +01:00
|
|
|
|
2015-03-09 15:00:58 +01:00
|
|
|
/* jump into init C code instead of calling it as it should never return */
|
|
|
|
b _main
|