]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Implement panic output for coreboot
authorSimon Glass <sjg@chromium.org>
Wed, 17 Apr 2013 16:13:34 +0000 (16:13 +0000)
committerSimon Glass <sjg@chromium.org>
Mon, 13 May 2013 20:33:20 +0000 (13:33 -0700)
panic_puts() can be called in early boot to display a message. It might
help with early debugging.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
arch/x86/cpu/coreboot/coreboot.c
arch/x86/include/asm/u-boot-x86.h

index f8e28f0c829de8665963328dd3e2208f38193b68..4a7dae4936524e4109d01f41346a123cfce31cc2 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/u-boot-x86.h>
 #include <flash.h>
 #include <netdev.h>
+#include <ns16550.h>
 #include <asm/msr.h>
 #include <asm/cache.h>
 #include <asm/io.h>
@@ -135,3 +136,12 @@ int board_final_cleanup(void)
 
        return 0;
 }
+
+void panic_puts(const char *str)
+{
+       NS16550_t port = (NS16550_t)0x3f8;
+
+       NS16550_init(port, 1);
+       while (*str)
+               NS16550_putc(port, *str++);
+}
index ae0c3883e413ab2cfaa71243143d941fe1324f24..5a59db61bfdf050dc43f9e1e8c3603e67d9b99f6 100644 (file)
@@ -33,6 +33,7 @@ void init_gd(gd_t *id, u64 *gdt_addr);
 void setup_gdt(gd_t *id, u64 *gdt_addr);
 int init_cache(void);
 int cleanup_before_linux(void);
+void panic_puts(const char *str);
 
 /* cpu/.../timer.c */
 void timer_isr(void *);