diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-05-18 13:42:19 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-18 13:44:35 -0700 |
commit | 4826c90afd85d3bc8ee963de0bf1438340db865a (patch) | |
tree | 5975a83deef10ec240c35bcdafed5a168c49be55 /core/conio.inc | |
parent | 208721a5fa25e5a12d31e7a51488bf5ea7e2a680 (diff) | |
download | syslinux-4826c90afd85d3bc8ee963de0bf1438340db865a.tar.gz |
Try to HLT the processor during idlesyslinux-3.81-pre4
Try to HLT the processor during idle. All the events we care about
should have interrupts associated with them, except possibly the
serial console. Try to deal with the serial console by waiting some
time before going into HLT, and giving the user the option of enabling
the serial console interrupt, on the assumption that the BIOS will
simply IRET.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/conio.inc')
-rw-r--r-- | core/conio.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/conio.inc b/core/conio.inc index 8f5a2922..d1b92f54 100644 --- a/core/conio.inc +++ b/core/conio.inc @@ -286,7 +286,7 @@ write_serial_str: ; pollchar: pushad - DO_IDLE + call do_idle mov ah,11h ; Poll keyboard int 16h jnz .done ; Keyboard response @@ -312,7 +312,7 @@ pollchar: ; getchar: .again: - DO_IDLE + call do_idle mov ah,11h ; Poll keyboard int 16h jnz .kbd ; Keyboard input? @@ -330,8 +330,10 @@ getchar: cmp al,ah jne .again .serial: xor ah,ah ; Avoid confusion - xchg dx,bx ; Data port + mov dx,bx ; Data port in al,dx + lea dx,[bx+2] ; DX -> IIR + in al,dx ; Read IIR to discard any IRQ bits ret .kbd: mov ah,10h ; Get keyboard input int 16h @@ -344,7 +346,7 @@ getchar: mov bx,KbdMap ; Convert character sets xlatb .func_key: - RESET_IDLE ; Character received + call reset_idle ; Character received ret %ifdef DEBUG_TRACERS @@ -392,6 +394,7 @@ FlowControl equ $ FlowOutput resb 1 ; Outputs to assert for serial flow FlowInput resb 1 ; Input bits for serial flow FlowIgnore resb 1 ; Ignore input unless these bits set +FlowDummy resb 1 ; Unused TextAttribute resb 1 ; Text attribute for message file DisplayMask resb 1 ; Display modes mask |