2 Copyright © 2013, The AROS Development Team. All rights reserved.
8 #include <aros/debug.h>
9 #include <aros/kernel.h>
10 #include <aros/symbolsets.h>
11 #include <exec/memory.h>
12 #include <exec/tasks.h>
13 #include <exec/alerts.h>
14 #include <exec/execbase.h>
16 #include <proto/exec.h>
19 #include <asm/bcm2835.h>
21 /* Linked from kernel.resource,
22 * need to retrieve in a cleaner fashion .. */
25 extern void IdleTask(struct ExecBase
*);
27 struct Task
*sysIdleTask
= NULL
;
29 static int PlatformInit(struct ExecBase
*SysBase
)
31 D(bug("[Exec] PlatformInit()\n"));
33 struct Task
*BootTask
= SysBase
->ThisTask
;
34 D(bug("[Exec] PlatformInit: Boot Task @ 0x%p\n", BootTask
));
36 /* for our sanity we will tell exec about the correct stack for the boot task */
37 BootTask
->tc_SPLower
= stack
;
38 BootTask
->tc_SPUpper
= stack
+ STACK_SIZE
;
40 sysIdleTask
= NewCreateTask(TASKTAG_NAME
, "System Idle",
42 TASKTAG_PC
, IdleTask
,
43 TASKTAG_ARG1
, SysBase
,
46 sysIdleTask
->tc_State
= TS_WAIT
;
48 D(bug("[Exec] PlatformInit: Idle Task @ 0x%p\n", sysIdleTask
));
53 ADD2INITLIB(PlatformInit
, 0)