From 63bb1e0c1de5ee70ca6afb031c51757810445769 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Thu, 11 Jun 2015 16:11:30 +0200 Subject: [PATCH] apm88xxxx: cpu driver: add serial init and printf. Signed-off-by: Simon Gerber --- kernel/arch/apm88xxxx/init.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/kernel/arch/apm88xxxx/init.c b/kernel/arch/apm88xxxx/init.c index 14bed81..f35e58b 100644 --- a/kernel/arch/apm88xxxx/init.c +++ b/kernel/arch/apm88xxxx/init.c @@ -1,4 +1,5 @@ #include +#include /** * \brief Kernel stack. @@ -7,7 +8,20 @@ */ uintptr_t kernel_stack[KERNEL_STACK_SIZE / sizeof(uintptr_t)] __attribute__ ((aligned(16))); +__attribute__((noreturn)) void arch_init(void *arg); void arch_init(void *arg) { + // set console port: XXX which? + serial_console_port = 0; + + // init serial console, skip hwinit for now + serial_console_init(false); + + // print something + printf("Barrelfish APM88xxxx CPU driver starting at addr 0x%" + PRIxLVADDR" on core %"PRIuCOREID"\n", + local_phys_to_mem((lpaddr_t)&kernel_first_byte), my_core_id); + + while(1); } -- 1.7.2.5