path: root/core/conio.inc
diff options
authorH. Peter Anvin <hpa@zytor.com>2009-05-21 10:25:43 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-21 10:25:43 -0700
commit652070309f5d283efacaa8c5102368da20a92c4a (patch)
treefbd14207e9c3c4b92c19a177a9f52993a60c5603 /core/conio.inc
parent55092109e53ae43ceefb5f7c6314aff103931c9a (diff)
idle: handle PXE stacks which improperly disable interruptssyslinux-3.81-pre9
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>
Diffstat (limited to 'core/conio.inc')
1 files changed, 1 insertions, 1 deletions
diff --git a/core/conio.inc b/core/conio.inc
index 2d8c61ad..4488c94a 100644
--- a/core/conio.inc
+++ b/core/conio.inc
@@ -286,8 +286,8 @@ write_serial_str:
; pollchar: check if we have an input character pending (ZF = 0)
- pushad
call do_idle
+ pushad
mov ah,11h ; Poll keyboard
int 16h
jnz .done ; Keyboard response