]> xenbits.xensource.com Git - seabios.git/commitdiff
debug: Only call serial_debug_preinit() at startup.
authorKevin O'Connor <kevin@koconnor.net>
Wed, 15 Jan 2014 18:42:50 +0000 (13:42 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 22 Jan 2014 22:30:30 +0000 (17:30 -0500)
The serial_debug_preinit() function disables serial interrupts so that
the OS doesn't get confused by "transmit buffer empty" interrupts
caused when seabios writes to the serial port.  It's unnecessary
paranoia to keep rechecking that interrupts are disabled.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/boot.c
src/optionroms.c
src/output.c
src/output.h
src/post.c
src/resume.c
vgasrc/vgainit.c

index ad799f94ca23c4e940344e99a69e0c3cc2a8563d..183f4f37216f1197aeaf12b0bff2738cd323c280 100644 (file)
@@ -743,7 +743,6 @@ int BootSequence VARLOW = -1;
 void VISIBLE32FLAT
 handle_18(void)
 {
-    debug_preinit();
     debug_enter(NULL, DEBUG_HDL_18);
     int seq = BootSequence + 1;
     BootSequence = seq;
@@ -754,7 +753,6 @@ handle_18(void)
 void VISIBLE32FLAT
 handle_19(void)
 {
-    debug_preinit();
     debug_enter(NULL, DEBUG_HDL_19);
     BootSequence = 0;
     do_boot(0);
index 1ff73c46073a9f2f2eb8a58ac3f5d927ea8090f5..93d9d2fe6507482b3ba0b6782a13887fb8a0fdf7 100644 (file)
@@ -44,8 +44,6 @@ __callrom(struct rom_header *rom, u16 offset, u16 bdf)
     start_preempt();
     farcall16big(&br);
     finish_preempt();
-
-    debug_preinit();
 }
 
 // Execute a given option rom at the standard entry vector.
index 1d882fa6844ded4a9372ec261c10e3d0289ee453..06d42a2727e1d63317b429df5059c4faa723ee04 100644 (file)
@@ -26,13 +26,6 @@ struct putcinfo {
  * Debug output
  ****************************************************************/
 
-// Setup debugging port(s).
-void
-debug_preinit(void)
-{
-    serial_debug_preinit();
-}
-
 // Write a character to debug port(s).
 static void
 debug_putc(struct putcinfo *action, char c)
index a13d55b72ea57eb19b5bcf0d095a3426b50b1659..66010359a2bd7e1143505d1f3c566e5bcf72cd4e 100644 (file)
@@ -4,7 +4,6 @@
 #include "types.h" // u32
 
 // output.c
-void debug_preinit(void);
 void panic(const char *fmt, ...)
     __attribute__ ((format (printf, 1, 2))) __noreturn;
 void printf(const char *fmt, ...)
index ace6f4cc9adf8ce72f8518ae7e26a80035825ed8..ec3271e33a5017eaf522d4e4b54cd30b0e172107 100644 (file)
@@ -19,6 +19,7 @@
 #include "hw/pic.h" // pic_setup
 #include "hw/ps2port.h" // ps2port_setup
 #include "hw/rtc.h" // rtc_write
+#include "hw/serialio.h" // serial_debug_preinit
 #include "hw/usb.h" // usb_setup
 #include "hw/virtio-blk.h" // virtio_blk_setup
 #include "hw/virtio-scsi.h" // virtio_scsi_setup
@@ -317,7 +318,7 @@ handle_post(void)
     if (!CONFIG_QEMU && !CONFIG_COREBOOT)
         return;
 
-    debug_preinit();
+    serial_debug_preinit();
     dprintf(1, "Start bios (version %s)\n", VERSION);
 
     // Check if we are running under Xen.
index 9ad2e4fee22264d3d1740c8e7d96b4ae60f121e4..e2ceef14741ff582ec399ec13a60bd0e743101f7 100644 (file)
@@ -25,7 +25,6 @@ void VISIBLE16
 handle_resume(void)
 {
     ASSERT16();
-    debug_preinit();
     int status = rtc_read(CMOS_RESET_CODE);
     rtc_write(CMOS_RESET_CODE, 0);
     dprintf(1, "In resume (status=%d)\n", status);
index 7b01e03cdf7af56b01744bfa68e81920c8fb3bef..13221fddfbb599504920076fe26fd0d40eab8483 100644 (file)
@@ -9,6 +9,7 @@
 #include "bregs.h" // struct bregs
 #include "hw/pci.h" // pci_config_readw
 #include "hw/pci_regs.h" // PCI_VENDOR_ID
+#include "hw/serialio.h" // serial_debug_preinit
 #include "output.h" // dprintf
 #include "std/optionrom.h" // struct pci_data
 #include "std/pmm.h" // struct pmmheader
@@ -126,7 +127,7 @@ int HaveRunInit VAR16;
 void VISIBLE16
 vga_post(struct bregs *regs)
 {
-    debug_preinit();
+    serial_debug_preinit();
     dprintf(1, "Start SeaVGABIOS (version %s)\n", VERSION);
     debug_enter(regs, DEBUG_VGA_POST);