[SeaBIOS] [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform
kevin at koconnor.net
Wed Dec 23 22:07:34 CET 2015
On Wed, Dec 23, 2015 at 09:27:25PM +0100, Peter Stuge wrote:
> Kevin O'Connor wrote:
> > SeaBIOS is careful to always disable IRQs while running C code to
> > prevent this issue, but disabling normal IRQs does not disable NMIs.
> > So, I believe this issue is specific to the nature of NMIs.
> Would a dedicated NMI handler stack be a good solution?
I don't think it's possible to prevent the NMI from using the current
stack when in 16bit mode. (There are no task gates or things like
that for 16bit interrupts, so the return address is always put on the
We could switch onto a dedicated stack, but the current nmi handler
doesn't really do anything so I think using the current stack is okay.
(My analysis using scripts/checkstack.py indicates entry_02 would use
34 bytes of stack space.)
More information about the SeaBIOS