[coreboot] [v3] r1170 - coreboot-v3/util/x86emu

Stefan Reinauer stepan at coresystems.de
Tue Jun 9 08:29:04 CEST 2009

On 09.06.2009 0:52 Uhr, ron minnich wrote:
> Fix attached for qemu.
Awesome! Thanks for spotting this!

> It would be nice to know if this causes trouble for real hardware,
> but it should not.
> ron
> ------------------------------------------------------------------------
> There are some problems with the way these interrrupts were managed. First, the CLI erases
> any knowledge of whether interrupts were enabled or disabled. Second, the STI
> works badly on qemu; we get an immediate INT #0 as soon as the STI happens.

Is this a Qemu bug?

> This doesn't happen on real hardware but, that said, I don't think
> this code should be doing cli and sti.

Peter Stuge brought this up, and I think I remembered seeing somewhere
that loading the IDT and some other stuff should be guarded by  cli+sti
because otherwise an interrupt could happen during the switch?!? Not
sure. It looks highly unlikely that this would happen for us.

Peter? Alex? Do you guys have more insight?

> This change fixes the observed qemu failures.
> Signed-off-by: Ronald G. Minnich <rminnich at gmail.com>

I hope we find out why this is a problem, because a combination of
cli+sti should never cause an interrupt that would not exist without
cli+sti. If we can't I suggest we commit this in a few days (Acked-by:
Stefan Reinauer <stepan at coresystems.de>) since it fixes the problem.

coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090609/ef12665e/attachment.html>

More information about the coreboot mailing list