2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 ExecBase initialization, no-MMU version.
8 #include <aros/asmcall.h>
9 #include <exec/execbase.h>
10 #include <exec/memory.h>
11 #include <exec/resident.h>
12 #include <proto/exec.h>
14 #include <kernel_base.h>
15 #include <kernel_debug.h>
16 #include <kernel_romtags.h>
18 struct ExecBase
*krnPrepareExecBase(UWORD
*ranges
[], struct MemHeader
*mh
, struct TagItem
*bootMsg
)
20 struct Resident
*exec
;
21 struct ExecBase
*sysBase
;
22 struct Resident
**resList
= krnRomTagScanner(mh
, ranges
);
26 krnPanic(NULL
, "Failed to create initial resident list\n"
27 "Not enough memory space provided");
31 exec
= krnFindResident(resList
, "exec.library");
34 krnPanic(NULL
, "Failed to create ExecBase\n"
35 "exec.library is not found");
39 /* Magic. Described in rom/exec/exec_init.c. */
40 sysBase
= krnInitExecBase(exec
, mh
, bootMsg
);
44 krnPanic(NULL
, "Failed to create ExecBase\n"
46 "MemHeader 0x%p, First chunk 0x%p, %u bytes free",
47 mh
, mh
->mh_First
, mh
->mh_Free
);
52 sysBase
->ResModules
= resList
;
54 #ifndef NO_RUNTIME_DEBUG
55 /* Print out modules list if requested by the user */
56 if (SysBase
->ex_DebugFlags
& EXECDEBUGF_INITCODE
)
60 nbug("Resident modules (addr: pri flags version name):\n");
62 for (i
= 0; resList
[i
]; i
++)
64 nbug("+ %p: %4d %02x %3d \"%s\"\n", resList
[i
], resList
[i
]->rt_Pri
,
65 resList
[i
]->rt_Flags
, resList
[i
]->rt_Version
, resList
[i
]->rt_Name
);