[SeaBIOS] [coreboot] Manually patched SeaBIOS rel-1.7.3-97-g6233543

Kevin O'Connor kevin at koconnor.net
Thu Dec 5 02:46:32 CET 2013


On Wed, Dec 04, 2013 at 10:39:43PM +0100, Gelip wrote:
> I make manually patch floppy.c and seriallog-20131204_232400.log readserial.py /dev/ttyS0 115200
> 
> ======= Wed Dec  4 23:24:06 2013 (adjust=86.8us)
[...]
> 08.149: Booting from Floppy...
> 08.149: check_recal_drive 0
> 08.149: floppy_drive_recal 0
> 08.149: floppy_select_drive 0
> 08.149: floppy_enable_controller
> 10.126: floppy_disable_controller

The SeaBIOS code was expecting an irq and did not receive one.  It
looks like the seabios code may be incorrectly reading from a write
only register (the "dor" register).  To confirm if this is the case,
can you add the following additional debugging and re-run?

-Kevin


--- floppy.c	2013-12-04 20:36:20.090459019 -0500
+++ src/hw/floppy.c	2013-12-04 20:39:44.426820240 -0500
@@ -278,8 +278,9 @@
 static int
 floppy_enable_controller(void)
 {
-    dprintf(1, "floppy_enable_controller\n");
+    dprintf(1, "floppy_enable_controller dor=%x\n", inb(PORT_FD_DOR));
     outb(inb(PORT_FD_DOR) | 0x04, PORT_FD_DOR);
+    dprintf(1, "now dor=%x\n", inb(PORT_FD_DOR));
     int ret = floppy_wait_irq();
     if (ret)
         return ret;
@@ -301,6 +302,7 @@
 
     // Enable controller if it isn't running.
     u8 dor = inb(PORT_FD_DOR);
+    dprintf(1, "dor=%x\n", dor);
     if (!(dor & 0x04)) {
         int ret = floppy_enable_controller();
         if (ret)
@@ -670,7 +672,7 @@
 {
     if (! CONFIG_FLOPPY)
         return;
-    debug_isr(DEBUG_ISR_0e);
+    debug_isr(1);
 
     // diskette interrupt has occurred
     u8 frs = GET_BDA(floppy_recalibration_status);



More information about the SeaBIOS mailing list