]> xenbits.xensource.com Git - seabios.git/commitdiff
debug: Unify the SeaBIOS debug version banner.
authorKevin O'Connor <kevin@koconnor.net>
Wed, 15 Jan 2014 18:52:14 +0000 (13:52 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 22 Jan 2014 22:30:30 +0000 (17:30 -0500)
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>
src/fw/coreboot.c
src/fw/xen.c
src/output.c
src/output.h
src/post.c

index 88ac5d9defc36966255cdbf2a6e048ab57a2892a..df8fca81ce35cb418591a8687e8777f2db6e49f0 100644 (file)
@@ -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);
     }
 
index d5f5ed3a23266e96ddde668c8db6949ec1d8a859..dd8e8afd431dbc6c0d13e67f5cf2cb935302f5f4 100644 (file)
@@ -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);
index 06d42a2727e1d63317b429df5059c4faa723ee04..994a1d6190c71465c67ea9f629aa907f3d511f6a 100644 (file)
@@ -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)
index 66010359a2bd7e1143505d1f3c566e5bcf72cd4e..42a76b842f5051c37bd91e4d095025d69c5d6123 100644 (file)
@@ -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, ...)
index ec3271e33a5017eaf522d4e4b54cd30b0e172107..b5cbdb82155c77be87ffc2829aca99ab87e2df7f 100644 (file)
@@ -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();