aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-18 14:57:37 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-18 14:57:37 -0700
commit3f00d3393230752919ba1f850d0e79901a67e64c (patch)
tree2ae06dc557c78c0918a54322890c6be9b5524998
parent8771b74ac9914ca32faa3d7f06a0bcfd8fa9bbd4 (diff)
downloadsyslinux-3f00d3393230752919ba1f850d0e79901a67e64c.tar.gz
syslinux-3f00d3393230752919ba1f850d0e79901a67e64c.tar.xz
syslinux-3f00d3393230752919ba1f850d0e79901a67e64c.zip
core/conio.inc: when reading the serial port, drop read of IIRsyslinux-3.81-pre5
Drop the read of the IIR when reading the serial port. First of all, we weren't protecting AL so we clobbered the actual data; second of all, this isn't actually necessary as reading RDR will clear the interrupt condition per the UART spec. It's worth noting that enabling interrupts here will do bad things if the interrupts aren't edge-triggered (since we don't actually have an interrupt routine to clear the interrupt condition); this also means bad things will happen if the interrupt line is shared. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/conio.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/conio.inc b/core/conio.inc
index d1b92f54..2d8c61ad 100644
--- a/core/conio.inc
+++ b/core/conio.inc
@@ -1,6 +1,7 @@
;; -----------------------------------------------------------------------
;;
;; Copyright 1994-2008 H. Peter Anvin - All Rights Reserved
+;; Copyright 2009 Intel Corporation; author: H. Peter Anvin
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -331,9 +332,7 @@ getchar:
jne .again
.serial: xor ah,ah ; Avoid confusion
mov dx,bx ; Data port
- in al,dx
- lea dx,[bx+2] ; DX -> IIR
- in al,dx ; Read IIR to discard any IRQ bits
+ in al,dx ; Read data
ret
.kbd: mov ah,10h ; Get keyboard input
int 16h