1 #define __KERNEL_NOLIBBASE__
3 #include <exec/execbase.h>
4 #include <exec/memory.h>
5 #include <exec/semaphores.h>
6 #include <aros/kernel.h>
8 /* Early declaration for ictl functions */
11 /* These two specify IRQ_COUNT and EXCEPTIONS_COUNT */
12 #include <kernel_arch.h>
13 #include <kernel_cpu.h>
15 /* Platform-specific stuff. Black box here. */
18 /* kernel.resource base. Nothing spectacular, really. */
22 struct MinList kb_Exceptions
[EXCEPTIONS_COUNT
];
23 struct List kb_Interrupts
[IRQ_COUNT
];
24 ULONG kb_ContextFlags
; /* Hints for KrnCreateContext() */
25 ULONG kb_ContextSize
; /* Total length of CPU context */
26 ULONG kb_PageSize
; /* Physical memory page size */
27 struct PlatformData
*kb_PlatformData
;
31 * Some useful global variables. They are global because:
32 * - BootMsg needs to be stored before KernelBase is allocated;
33 * - KernelBase is needed by interrupt handling code
35 extern struct TagItem
*BootMsg
;
36 extern struct KernelBase
*KernelBase
;
38 /* Allocation function */
39 struct KernelBase
*AllocKernelBase(struct ExecBase
*SysBase
);
41 /* Utility function to clear BSS segments. Call it before storing any globals!!! */
42 void __clear_bss(const struct KernelBSS
*bss
);
44 /* Memory header initialization functions */
45 void krnCreateMemHeader(CONST_STRPTR name
, BYTE pri
, APTR start
, IPTR size
, ULONG flags
);
46 struct MemHeader
*krnCreateROMHeader(CONST_STRPTR name
, APTR start
, APTR end
);