[SeaBIOS] Bochs cvs + SeaBIOS git master + FreeDOS = slow load + invalid opcode

Kevin O'Connor kevin at koconnor.net
Mon Jan 11 00:41:43 CET 2010


On Sun, Jan 10, 2010 at 11:46:50PM +0100, Sebastian Herbszt wrote:
> Kevin O'Connor wrote:
> >05264161428i[FDD  ] controller reset in software
> >05445136148i[FDD  ] controller reset in software
> >05625186768i[FDD  ] controller reset in software
> >05803824012i[FDD  ] controller reset in software
> >05985259728i[FDD  ] controller reset in software
> >
> >SeaBIOS makes a call to wait_irq() in the wait_floppy_irq() function
> >in src/floppy.c.  My guess is that the floppy irq was lost, and
> >SeaBIOS went into recovery mode.  It's just a guess, but maybe
> >0x00020f41 isn't populated because the floppy read failed (because of
> >lost irq?).
> 
> It is indeed related to floppy. Booting FreeDOS from cd works.

Yeah - this patch also fixes the problem:

--- a/src/floppy.c
+++ b/src/floppy.c
@@ -182,7 +182,8 @@ wait_floppy_irq(void)
         v = GET_BDA(floppy_recalibration_status);
         if (v & FRS_TIMEOUT)
             break;
-        wait_irq();
+        //wait_irq();
+        yield();
     }
 
     v &= ~FRS_TIMEOUT;

I still don't think it should be necessary though.  Maybe Bochs is
dropping floppy irqs when halted?

-Kevin



More information about the SeaBIOS mailing list