summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbie Robinson <Herbie.Robinson@stratus.com>2017-03-10 10:54:55 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2017-04-27 10:25:45 +0200
commitcbaee52287e5f32373181cff50a00b6c4ac9015a (patch)
tree0a3890d316389e6508e7dc728a34959e3e192dd8
parent23d474943dcd55d0550a3d20b3d30e9040a4f15b (diff)
downloadqemu-sgabios-cbaee52287e5f32373181cff50a00b6c4ac9015a.tar.gz
SGABIOS: fix wrong video attrs for int 10h, ah==13h
Fix Bug #1670509: wrong video attrs for int 10h, ah==13h The subroutine set_cursor_position is trashing %bx. Unfortunately, %bl contains the video attribute for write_string. The fix saves %bx in the function prolog and restores it in the epilog. Signed-off-by: Herbie Robinson <Herbie.Robinson@stratus.com> Message-Id: <1489161295-23864-1-git-send-email-Herbie.Robinson@stratus.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--sgabios.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/sgabios.S b/sgabios.S
index 275d063..96c4e23 100644
--- a/sgabios.S
+++ b/sgabios.S
@@ -1728,6 +1728,7 @@ write_string_tail:
set_cursor_position:
pushw %ax
+ pushw %bx
pushw %ds
pushw $BDA_SEG
popw %ds /* ds = 0x40 */
@@ -1738,6 +1739,7 @@ set_cursor_position:
movw %ax, %bx /* bx = cursor save offset */
movw %dx, (%bx) /* save new cursor value */
popw %ds
+ popw %bx
popw %ax
ret