Made bitmap view and path AppMessage targets. Picture files can now be
[AROS.git] / arch / arm-efika / kernel / kernel_startup.c
blobc244cb4d87296d4770871e496281b5894985572e
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
9 #include <utility/tagitem.h>
10 #include <proto/arossupport.h>
11 #include <strings.h>
12 #include <inttypes.h>
14 #include <kernel_base.h>
15 #include <kernel_debug.h>
17 asm(".section .aros.init,\"ax\"\n\t"
18 ".globl start\n\t"
19 ".type start,%function\n"
20 "start: ldr r12, 3f \n" // Load address of top of stack pointer
21 " ldr sp, [r12] \n" // Load temporary stack pointer
22 " mov r4, r0 \n"
23 " bl clear_bss \n" // clear bss regions
24 " mov r0, r4 \n" // restore boot msg parameter
25 " ldr r12, 4f \n" // load supervisor stack
26 " ldr sp, [r12] \n"
27 " ldr pc, 2f \n" // jump to the kernel
28 "1: b 1b \n" // we never return from here
29 "2: .word startup \n"
30 "3: .word tmp_stack_end \n"
31 "4: .word ssp_stack_end \n"
35 * Temporary stack for very early init. It's used only during clearing of
36 * .bss sections in all modules. Rest of this space is occupied by TagItem
37 * boot message. prepared by the bootstrap.
39 union {
40 uint32_t stack[128];
41 struct TagItem tags[64]
42 } temporary __attribute__((aligned(32),used,section(".data")));
44 static uint32_t ssp_stack[4096];
45 static const uint32_t *ssp_stack_end __used = &ssp_stack[4096];
46 static const uint32_t *tmp_stack_end __used = &temporary.stack[128];
48 struct TagItem *BootMsg;
50 static void __used clear_bss(struct TagItem *msg)
52 struct TagItem *tag = LibFindTagItem(KRN_KernelBss, msg);
54 if (tag)
56 struct KernelBSS *bss = (struct KernelbSS *)tag->ti_Data;
58 if (bss)
60 __clear_bss(bss);
65 void startup(struct TagItem *tags)
67 bug("\n[KRN] AROS for EfikaMX built on %s starting...\n", __DATE__);
68 bug("[KRN] BootMsg @ %08x\n", tags);
70 while(1);