projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b015124
)
[x86 setup] Make sure AH=00h when setting a video mode
author
H. Peter Anvin
<hpa@zytor.com>
Thu, 23 Aug 2007 16:28:42 +0000
(09:28 -0700)
committer
H. Peter Anvin
<hpa@zytor.com>
Thu, 23 Aug 2007 20:03:25 +0000
(13:03 -0700)
Passing a u8 into a register doesn't mean gcc will zero-extend it.
Also, don't depend on thhe register not to change.
Per bug report from Saul Tamari.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/i386/boot/video-vga.c
patch
|
blob
|
history
diff --git
a/arch/i386/boot/video-vga.c
b/arch/i386/boot/video-vga.c
index d660e608cd5833b2d5fc76bf068a335aff4fa2c3..aef02f9ec0c130e50b139a30863373c0aed22395 100644
(file)
--- a/
arch/i386/boot/video-vga.c
+++ b/
arch/i386/boot/video-vga.c
@@
-73,9
+73,10
@@
static u8 vga_set_basic_mode(void)
mode = 3;
/* Set the mode */
+ ax = mode;
asm volatile(INT10
- :
: "a" (mode
)
- : "ebx", "ecx", "edx", "esi", "edi");
+ :
"+a" (ax
)
+ :
:
"ebx", "ecx", "edx", "esi", "edi");
do_restore = 1;
return mode;
}