diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2014-01-15 13:52:14 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-01-22 17:30:30 -0500 |
commit | bb1fcb4507095d47f504fab344e589f67e87854b (patch) | |
tree | 83b9901751179bb33721b991616ff2d68adb5ae6 | |
parent | 940fc1fc58b4f2a1c3baa8a5bb907f7b22ba0a31 (diff) | |
download | seabios-bb1fcb4507095d47f504fab344e589f67e87854b.tar.gz |
debug: Unify the SeaBIOS debug version banner.
Introduce debug_banner() and use it in all the places SeaBIOS version
is displayed for debugging purposes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/fw/coreboot.c | 2 | ||||
-rw-r--r-- | src/fw/xen.c | 4 | ||||
-rw-r--r-- | src/output.c | 6 | ||||
-rw-r--r-- | src/output.h | 1 | ||||
-rw-r--r-- | src/post.c | 2 |
5 files changed, 11 insertions, 4 deletions
diff --git a/src/fw/coreboot.c b/src/fw/coreboot.c index 88ac5d9d..df8fca81 100644 --- a/src/fw/coreboot.c +++ b/src/fw/coreboot.c @@ -182,7 +182,7 @@ coreboot_preinit(void) struct cb_cbmem_ref *cbref = find_cb_subtable(cbh, CB_TAG_CBMEM_CONSOLE); if (cbref) { cbcon = (void*)(u32)cbref->cbmem_addr; - dprintf(1, "----- [ SeaBIOS %s ] -----\n", VERSION); + debug_banner(); dprintf(1, "Found coreboot cbmem console @ %llx\n", cbref->cbmem_addr); } diff --git a/src/fw/xen.c b/src/fw/xen.c index d5f5ed3a..dd8e8afd 100644 --- a/src/fw/xen.c +++ b/src/fw/xen.c @@ -71,8 +71,8 @@ void xen_preinit(void) if (strcmp(signature, "XenVMMXenVMM") == 0) { /* Set debug_io_port first, so the following messages work. */ DebugOutputPort = 0xe9; - dprintf(1, "SeaBIOS (version %s)\n\n", VERSION); - dprintf(1, "Found Xen hypervisor signature at %x\n", base); + debug_banner(); + dprintf(1, "\nFound Xen hypervisor signature at %x\n", base); if ((eax - base) < 2) panic("Insufficient Xen cpuid leaves. eax=%x at base %x\n", eax, base); diff --git a/src/output.c b/src/output.c index 06d42a27..994a1d61 100644 --- a/src/output.c +++ b/src/output.c @@ -26,6 +26,12 @@ struct putcinfo { * Debug output ****************************************************************/ +void +debug_banner(void) +{ + dprintf(1, "SeaBIOS (version %s)\n", VERSION); +} + // Write a character to debug port(s). static void debug_putc(struct putcinfo *action, char c) diff --git a/src/output.h b/src/output.h index 66010359..42a76b84 100644 --- a/src/output.h +++ b/src/output.h @@ -4,6 +4,7 @@ #include "types.h" // u32 // output.c +void debug_banner(void); void panic(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))) __noreturn; void printf(const char *fmt, ...) @@ -319,7 +319,7 @@ handle_post(void) return; serial_debug_preinit(); - dprintf(1, "Start bios (version %s)\n", VERSION); + debug_banner(); // Check if we are running under Xen. xen_preinit(); |