Index: kernel/generic/src/main/main.c
===================================================================
--- kernel/generic/src/main/main.c	(revision e2650d358e06533dcf2c3cf90e673dffacd29dd3)
+++ kernel/generic/src/main/main.c	(revision 9dae191e774f517d5430fc726e4aef5787b1fcd0)
@@ -104,5 +104,5 @@
 
 /** Lowest safe stack virtual address. */
-uintptr_t stack_safe = 0;
+uintptr_t stack_safe = 0;		
 
 /*
@@ -113,10 +113,9 @@
  */
 static void main_bsp_separated_stack(void);
-
 #ifdef CONFIG_SMP
 static void main_ap_separated_stack(void);
 #endif
 
-#define CONFIG_STACK_SIZE  ((1 << STACK_FRAMES) * STACK_SIZE)
+#define CONFIG_STACK_SIZE	((1 << STACK_FRAMES) * STACK_SIZE)
 
 /** Main kernel routine for bootstrap CPU.
@@ -131,5 +130,5 @@
  *
  */
-NO_TRACE void main_bsp(void)
+void main_bsp(void)
 {
 	config.cpu_count = 1;
@@ -147,13 +146,13 @@
 	size_t i;
 	for (i = 0; i < init.cnt; i++) {
-		if (PA_OVERLAPS(config.stack_base, config.stack_size,
+		if (PA_overlaps(config.stack_base, config.stack_size,
 		    init.tasks[i].addr, init.tasks[i].size))
 			config.stack_base = ALIGN_UP(init.tasks[i].addr +
 			    init.tasks[i].size, config.stack_size);
 	}
-	
+
 	/* Avoid placing stack on top of boot allocations. */
 	if (ballocs.size) {
-		if (PA_OVERLAPS(config.stack_base, config.stack_size,
+		if (PA_overlaps(config.stack_base, config.stack_size,
 		    ballocs.base, ballocs.size))
 			config.stack_base = ALIGN_UP(ballocs.base +
@@ -171,4 +170,5 @@
 }
 
+
 /** Main kernel routine for bootstrap CPU using new stack.
  *
@@ -176,5 +176,5 @@
  *
  */
-void main_bsp_separated_stack(void)
+void main_bsp_separated_stack(void) 
 {
 	/* Keep this the first thing. */
@@ -183,6 +183,6 @@
 	version_print();
 	
-	LOG("\nconfig.base=%p config.kernel_size=%" PRIs
-	    "\nconfig.stack_base=%p config.stack_size=%" PRIs,
+	LOG("\nconfig.base=%#" PRIp " config.kernel_size=%" PRIs
+	    "\nconfig.stack_base=%#" PRIp " config.stack_size=%" PRIs,
 	    config.base, config.kernel_size, config.stack_base,
 	    config.stack_size);
@@ -194,5 +194,5 @@
 	 * commands.
 	 */
-	kconsole_init();
+	LOG_EXEC(kconsole_init());
 #endif
 	
@@ -201,54 +201,54 @@
 	 * starts adding its own handlers
 	 */
-	exc_init();
+	LOG_EXEC(exc_init());
 	
 	/*
 	 * Memory management subsystems initialization.
 	 */
-	arch_pre_mm_init();
-	frame_init();
+	LOG_EXEC(arch_pre_mm_init());
+	LOG_EXEC(frame_init());
 	
 	/* Initialize at least 1 memory segment big enough for slab to work. */
-	slab_cache_init();
-	sysinfo_init();
-	btree_init();
-	as_init();
-	page_init();
-	tlb_init();
-	ddi_init();
-	tasklet_init();
-	arch_post_mm_init();
-	arch_pre_smp_init();
-	smp_init();
+	LOG_EXEC(slab_cache_init());
+	LOG_EXEC(sysinfo_init());
+	LOG_EXEC(btree_init());
+	LOG_EXEC(as_init());
+	LOG_EXEC(page_init());
+	LOG_EXEC(tlb_init());
+	LOG_EXEC(ddi_init());
+	LOG_EXEC(tasklet_init());
+	LOG_EXEC(arch_post_mm_init());
+	LOG_EXEC(arch_pre_smp_init());
+	LOG_EXEC(smp_init());
 	
 	/* Slab must be initialized after we know the number of processors. */
-	slab_enable_cpucache();
+	LOG_EXEC(slab_enable_cpucache());
 	
 	printf("Detected %" PRIs " CPU(s), %" PRIu64" MiB free memory\n",
 	    config.cpu_count, SIZE2MB(zones_total_size()));
-	
-	cpu_init();
-	
-	calibrate_delay_loop();
-	clock_counter_init();
-	timeout_init();
-	scheduler_init();
-	task_init();
-	thread_init();
-	futex_init();
+
+	LOG_EXEC(cpu_init());
+	
+	LOG_EXEC(calibrate_delay_loop());
+	LOG_EXEC(clock_counter_init());
+	LOG_EXEC(timeout_init());
+	LOG_EXEC(scheduler_init());
+	LOG_EXEC(task_init());
+	LOG_EXEC(thread_init());
+	LOG_EXEC(futex_init());
 	
 	if (init.cnt > 0) {
 		size_t i;
 		for (i = 0; i < init.cnt; i++)
-			LOG("init[%" PRIs "].addr=%p, init[%" PRIs
-			    "].size=%" PRIs, i, init.tasks[i].addr, i,
+			LOG("init[%" PRIs "].addr=%#" PRIp ", init[%" PRIs
+			    "].size=%#" PRIs, i, init.tasks[i].addr, i,
 			    init.tasks[i].size);
 	} else
 		printf("No init binaries found.\n");
 	
-	ipc_init();
-	event_init();
-	klog_init();
-	stats_init();
+	LOG_EXEC(ipc_init());
+	LOG_EXEC(event_init());
+	LOG_EXEC(klog_init());
+	LOG_EXEC(stats_init());
 	
 	/*
@@ -266,5 +266,5 @@
 	if (!kinit_thread)
 		panic("Cannot create kinit thread.");
-	thread_ready(kinit_thread);
+	LOG_EXEC(thread_ready(kinit_thread));
 	
 	/*
@@ -276,6 +276,6 @@
 }
 
+
 #ifdef CONFIG_SMP
-
 /** Main kernel routine for application CPUs.
  *
@@ -296,5 +296,5 @@
 	 */
 	config.cpu_active++;
-	
+
 	/*
 	 * The THE structure is well defined because ctx.sp is used as stack.
@@ -311,7 +311,7 @@
 	calibrate_delay_loop();
 	arch_post_cpu_init();
-	
+
 	the_copy(THE, (the_t *) CPU->stack);
-	
+
 	/*
 	 * If we woke kmp up before we left the kernel stack, we could
@@ -326,4 +326,5 @@
 }
 
+
 /** Main kernel routine for application CPUs using new stack.
  *
@@ -337,10 +338,9 @@
 	 */
 	timeout_init();
-	
+
 	waitq_wakeup(&ap_completion_wq, WAKEUP_FIRST);
 	scheduler();
 	/* not reached */
 }
-
 #endif /* CONFIG_SMP */
 
