clean up debug
[AROS.git] / arch / arm-raspi / exec / platform_init.c
blob8e7036d47c2c4afe6ca1544c9eeb6705f9fa3831
1 /*
2 Copyright © 2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define DEBUG 1
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>
15 #include <asm/io.h>
16 #include <proto/exec.h>
17 #include <strings.h>
19 #include <asm/bcm2835.h>
21 /* Linked from kernel.resource,
22 * need to retrieve in a cleaner fashion .. */
23 extern IPTR stack[];
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",
41 TASKTAG_PRI , -127,
42 TASKTAG_PC , IdleTask,
43 TASKTAG_ARG1 , SysBase,
44 TAG_DONE);
46 sysIdleTask->tc_State = TS_WAIT;
48 D(bug("[Exec] PlatformInit: Idle Task @ 0x%p\n", sysIdleTask));
50 return TRUE;
53 ADD2INITLIB(PlatformInit, 0)