2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
9 #include <utility/tagitem.h>
10 #include <proto/arossupport.h>
14 #include <kernel_base.h>
15 #include <kernel_debug.h>
17 asm(".section .aros.init,\"ax\"\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
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
27 " ldr pc, 2f \n" // jump to the kernel
28 "1: b 1b \n" // we never return from here
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.
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
);
56 struct KernelBSS
*bss
= (struct KernelbSS
*)tag
->ti_Data
;
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
);