[SeaBIOS] [PATCH 2/2] floppy: Clear the IRQ flag immediately before a floppy command or reset
Kevin O'Connor
kevin at koconnor.net
Mon Feb 26 00:33:37 CET 2018
On Sun, Feb 25, 2018 at 10:38:09PM +0200, Nikolay Nikolov wrote:
> This ensures that we safely receive the IRQ even if the floppy controller
> manages to be faster than our code and sends the IRQ before our code enters
> floppy_wait_irq(). Although unlikely, this is possible to happen on emulators
> (which emulate floppy operations extremely fast) as well as real hardware
> (during reset).
This doesn't look correct to me. The SeaBIOS C code always runs with
interrupts disabled. The FRS_IRQ flag is only set from the
handle_0e() hardware interrupt handler. So, I don't think there is a
race condition with the clearing and checking of that flag.
-Kevin
More information about the SeaBIOS
mailing list