2 Copyright C 2003, The AROS Development Team. All rights reserved.
5 Desc: kernel.resource startup file
9 #include <exec/types.h>
10 #include <exec/resident.h>
11 #include <exec/execbase.h>
12 #include <exec/memory.h>
14 #include <asm/macros.h>
15 #include <aros/libcall.h>
16 #include <aros/asmcall.h>
18 #include <proto/exec.h>
19 #include <proto/kernel.h>
24 static const char Kernel_VersionID
[] = VERSION_STRING
;
25 static const char Kernel_Name
[] = NAME_STRING
;
27 struct KernelBase
* Kernel_init();
30 static LONG
__no_exec()
36 struct Resident Kernel_Resident SECTION_CODE
= {
53 AROS_UFH3(struct KernelBase
*, Kernel_init
,
54 AROS_UFHA(ULONG
, dummy
, D0
),
55 AROS_UFHA(ULONG
, slist
, A0
),
56 AROS_UFHA(struct ExecBase
*, SysBase
, A6
))
60 struct KernelBase
*KernelBase
= NULL
;
61 UWORD neg
= AROS_ALIGN(LIB_VECTSIZE
* VECTOR_COUNT
);
63 KernelBase
= (struct KernelBase
*)
64 ((ULONG
)AllocMem(neg
+ sizeof(struct KernelBase
),
65 MEMF_CLEAR
| MEMF_PUBLIC
) + neg
);
69 KernelBase
->sysBase
= SysBase
;
70 KernelBase
->node
.ln_Pri
= Kernel_Resident
.rt_Pri
;
71 KernelBase
->node
.ln_Name
= Kernel_Resident
.rt_Name
;
72 KernelBase
->node
.ln_Type
= NT_RESOURCE
;
74 MakeFunctions(KernelBase
, (APTR
)LIBFUNCTABLE
, NULL
);
75 AddResource(KernelBase
);