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

Peter Stuge peter at stuge.se
Wed Jun 10 09:37:20 CEST 2009

Stefan Reinauer wrote:
> > 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.

Indeed I assumed that interrupts were enabled before. If they are
not, then no problem. But if they will be enabled at some point there
can be issues. The IDT is one thing, but also the mode switching can
cause trouble for the interrupts, or make interrupts cause trouble.

> It looks highly unlikely that this would happen for us.

There is plenty of switching back and forth between PM and RM, but
as long as interrupts are never enabled (also by option ROMs) then I
don't think this matters.


More information about the coreboot mailing list