syslinux-3.81-pre9
idle: handle PXE stacks which improperly disable interrupts

At least Etherboot (and all-but-super-recent versions of gPXE) PXE
ROMs improperly disable interrupts when calling an intercepted version
of INT 15h and 1Ah; this is due to the old trick of using "ret 2" to
return... this avoids resetting the flags for status, but it also
doesn't restore the value of the interrupt flag.  Needless to say,
this causes serious issues.

Work around it by adding explicit pushf/popf or STI in places known to
have issues, but also add an STI in reset_idle, and add an error alert
in do_idle if we ever get called with interrupts disabled.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
5 files changed