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

Sebastian Herbszt herbszt at gmx.de
Sun Jan 10 23:46:50 CET 2010


Kevin O'Connor wrote:
> On Sun, Jan 10, 2010 at 11:12:11PM +0100, Sebastian Herbszt wrote:
>> Kevin O'Connor wrote:
>> >On Sun, Jan 10, 2010 at 03:59:22PM +0100, Sebastian Herbszt wrote:
>> >>Kevin O'Connor wrote:
>> >>>and if I apply the following change, it fixes the problem on bochs:
>> >[...]
>> >>>-    asm volatile("sti ; hlt ; cli ; cld": : :"memory");
>> >>>+    asm volatile("sti ; rep ; nop ; cli ; cld": : :"memory");
>> >[...]
>> >>>However, I didn't think there was anything wrong with the original
>> >>>code.  Am I missing something?
>> >>
>> >>It should be ok. Your replacement uses PAUSE which can cause VM exits.
>> >
>> >Yes, but I'd rather not make the change as it causes more cpu load on
>> >the host.  Is there a reason why Bochs doesn't work with the original
>> >code?
>> 
>> I did some tracing and noticed the following:
> 
>>From your original mail:
> 
> 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.

- Sebastian




More information about the SeaBIOS mailing list