2 Copyright © 2013, The AROS Development Team. All rights reserved.
8 #include <aros/debug.h>
10 #include <aros/kernel.h>
11 #include <aros/symbolsets.h>
12 #include <exec/memory.h>
13 #include <exec/tasks.h>
14 #include <exec/alerts.h>
15 #include <exec/execbase.h>
17 #include <proto/exec.h>
18 #include <proto/kernel.h>
21 #include "exec_intern.h"
23 /* Linked from kernel.resource,
24 * need to retrieve in a cleaner fashion .. */
27 extern void IdleTask(struct ExecBase
*);
29 int Exec_ARMCPUInit(struct ExecBase
*SysBase
)
31 struct Task
*BootTask
, *CPUIdleTask
;
32 int cpunum
= KrnGetCPUNumber();
34 D(bug("[Exec] Exec_ARMCPUInit(%02d)\n", cpunum
));
36 BootTask
= GET_THIS_TASK
;
38 D(bug("[Exec] Exec_ARMCPUInit[%02d]: %s @ 0x%p\n", cpunum
, BootTask
->tc_Node
.ln_Name
, BootTask
));
42 /* for our sanity we will tell exec about the correct stack for the boot task */
43 BootTask
->tc_SPLower
= stack
;
44 BootTask
->tc_SPUpper
= stack
+ AROS_STACKSIZE
;
47 CPUIdleTask
= NewCreateTask(TASKTAG_NAME
, "System Idle",
48 #if defined(__AROSEXEC_SMP__)
49 TASKTAG_AFFINITY
, KrnGetCPUMask(cpunum
),
52 TASKTAG_PC
, IdleTask
,
53 TASKTAG_ARG1
, SysBase
,
58 CPUIdleTask
->tc_State
= TS_WAIT
;
59 TLS_SET(IdleTask
, CPUIdleTask
);
60 D(bug("[Exec] Exec_ARMCPUInit[%02d]: %s Task @ 0x%p\n", cpunum
, CPUIdleTask
->tc_Node
.ln_Name
, CPUIdleTask
));
66 ADD2INITLIB(Exec_ARMCPUInit
, 0)