[IO] rework dprintf to take a debug level, defined in DEBUGLEVEL
printf at the moment just calls dprintf, but soon will become
a seperate I/O queue.
diff --git a/kernel/main.c b/kernel/main.c
index cfe39b2..7fa8d59 100644
--- a/kernel/main.c
+++ b/kernel/main.c
@@ -67,30 +67,30 @@
// do any super early target initialization
target_early_init();
- dprintf("welcome to lk\n\n");
+ dprintf(INFO, "welcome to lk\n\n");
// deal with any static constructors
- dprintf("calling constructors\n");
+ dprintf(SPEW, "calling constructors\n");
call_constructors();
// bring up the kernel heap
- dprintf("initializing heap\n");
+ dprintf(SPEW, "initializing heap\n");
heap_init();
// initialize the threading system
- dprintf("initializing threads\n");
+ dprintf(SPEW, "initializing threads\n");
thread_init();
// initialize the dpc system
- dprintf("initializing dpc\n");
+ dprintf(SPEW, "initializing dpc\n");
dpc_init();
// initialize kernel timers
- dprintf("initializing timers\n");
+ dprintf(SPEW, "initializing timers\n");
timer_init();
// create a thread to complete system initialization
- dprintf("creating bootstrap completion thread\n");
+ dprintf(SPEW, "creating bootstrap completion thread\n");
thread_resume(thread_create("bootstrap2", &bootstrap2, NULL, DEFAULT_PRIORITY, DEFAULT_STACK_SIZE));
// enable interrupts
@@ -104,19 +104,19 @@
static int bootstrap2(void *arg)
{
- dprintf("top of bootstrap2()\n");
+ dprintf(SPEW, "top of bootstrap2()\n");
arch_init();
// initialize the rest of the platform
- dprintf("initializing rest of platform\n");
+ dprintf(SPEW, "initializing platform\n");
platform_init();
-
- // initialize the rest of the target
- dprintf("initializing rest of target\n");
+
+ // initialize the target
+ dprintf(SPEW, "initializing target\n");
target_init();
- dprintf("calling project_init()\n");
+ dprintf(SPEW, "calling sys_init()\n");
project_init();
return 0;