summaryrefslogtreecommitdiff
path: root/arch/x86/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-04-17 16:13:34 +0000
committerSimon Glass <sjg@chromium.org>2013-05-13 13:33:20 -0700
commitc78a62acdfbc0a1cc75ee934f7897b9e99bd3e8d (patch)
tree16420e7fc6498f05676977beeca8dab55d656e73 /arch/x86/cpu
parent7282d834cd47cabc481a5cbe6e686ef40751436f (diff)
downloadu-boot-imx-c78a62acdfbc0a1cc75ee934f7897b9e99bd3e8d.zip
u-boot-imx-c78a62acdfbc0a1cc75ee934f7897b9e99bd3e8d.tar.gz
u-boot-imx-c78a62acdfbc0a1cc75ee934f7897b9e99bd3e8d.tar.bz2
x86: Implement panic output for coreboot
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>
Diffstat (limited to 'arch/x86/cpu')
-rw-r--r--arch/x86/cpu/coreboot/coreboot.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
index f8e28f0..4a7dae49 100644
--- a/arch/x86/cpu/coreboot/coreboot.c
+++ b/arch/x86/cpu/coreboot/coreboot.c
@@ -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++);
+}