mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
parent
1e7c0c2066
commit
e83849cf99
@ -1,11 +1,8 @@
|
||||
/*
|
||||
* \brief Startup code for core on ARM
|
||||
* \brief Startup code for core
|
||||
* \author Martin Stein
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2011-10-01
|
||||
*
|
||||
* The code in this file is compliant to the general ARM instruction- and
|
||||
* register-set but the semantics are tested only on ARMv6 and ARMv7 by now.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -15,25 +12,23 @@
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Do no operation for 'count' cycles
|
||||
*/
|
||||
.macro _nop count
|
||||
.rept \count
|
||||
mov r8, r8
|
||||
.endr
|
||||
.endm
|
||||
|
||||
.section ".text.crt0"
|
||||
|
||||
/* ELF entry symbol */
|
||||
/* program entry-point */
|
||||
.global _start
|
||||
_start:
|
||||
|
||||
/* idle a little initially because 'u-boot' likes it this way */
|
||||
_nop 8
|
||||
/* idle a little initially because U-Boot likes it this way */
|
||||
mov r8, r8
|
||||
mov r8, r8
|
||||
mov r8, r8
|
||||
mov r8, r8
|
||||
mov r8, r8
|
||||
mov r8, r8
|
||||
mov r8, r8
|
||||
mov r8, r8
|
||||
|
||||
/* zero-fill BSS segment, BSS boundaries must be aligned to 4 */
|
||||
/* zero-fill BSS segment */
|
||||
ldr r0, =_bss_start
|
||||
ldr r1, =_bss_end
|
||||
mov r2, #0
|
||||
@ -53,7 +48,7 @@
|
||||
ldr sp, =_kernel_stack_high
|
||||
bl kernel
|
||||
|
||||
/* catch erroneous return */
|
||||
/* catch erroneous return of the kernel main-routine */
|
||||
3: b 3b
|
||||
|
||||
.section .bss
|
||||
@ -64,8 +59,3 @@
|
||||
.global _kernel_stack_high
|
||||
_kernel_stack_high:
|
||||
|
||||
/* main-thread UTCB-pointer for the Genode thread-API */
|
||||
.align 2
|
||||
.global _main_thread_utcb
|
||||
_main_thread_utcb: .long 0
|
||||
|
||||
|
@ -39,12 +39,12 @@
|
||||
|
||||
using namespace Kernel;
|
||||
|
||||
/* get core configuration */
|
||||
extern Genode::Native_utcb * _main_thread_utcb;
|
||||
extern Genode::Native_thread_id _main_thread_id;
|
||||
extern int _kernel_stack_high;
|
||||
extern "C" void CORE_MAIN();
|
||||
|
||||
Genode::Native_utcb * _main_thread_utcb;
|
||||
|
||||
namespace Kernel
|
||||
{
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user