From: Simon Gerber Date: Thu, 11 Jun 2015 14:11:30 +0000 (+0200) Subject: apm88xxxx: cpu driver: add serial init and printf. X-Git-Tag: release2015-08-13~1^2~9 X-Git-Url: http://git.barrelfish.org/?p=barrelfish;a=commitdiff_plain;h=63bb1e0c1de5ee70ca6afb031c51757810445769 apm88xxxx: cpu driver: add serial init and printf. Signed-off-by: Simon Gerber --- 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); }