[pcbios] Don't use "lret $2" to return from an interrupt
authorH. Peter Anvin <hpa@zytor.com>
Sun, 12 Apr 2009 01:30:22 +0000 (18:30 -0700)
committerMichael Brown <mcb30@etherboot.org>
Wed, 15 Apr 2009 14:45:27 +0000 (15:45 +0100)
commitf44205b9ea928c3cdefb6848e7f20fe11d112522
tree53605cfae5199d510bb5d047cb7cb2c9c71e8d7a
parentdc387547a3cc37a2c5b5a3568405c961cf1edf84
[pcbios] Don't use "lret $2" to return from an interrupt

Using "lret $2" to return from an interrupt causes interrupts to be
disabled in the calling program, since the INT instruction will have
disabled interrupts.  Instead, patch CF on the stack and use iret to
return.

Interestingly, the original PC BIOS had this bug in at least one
place.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
src/arch/i386/firmware/pcbios/e820mangler.S
src/arch/i386/firmware/pcbios/fakee820.c
src/arch/i386/interface/pxe/pxe_entry.S