summaryrefslogtreecommitdiffstats
path: root/arch/i386/boot/video.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-18 12:13:02 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-18 12:13:02 -0700
commit97405fe26b2a4df7090884b086ee8224ace2a6d1 (patch)
tree528f9f1f3f8cf0ce933a366f137faaf55ab89079 /arch/i386/boot/video.h
parenta10d9a71bafd3a283da240d2868e71346d2aef6f (diff)
parent3fbc54165d7217abf62b871c0dd074e76ce0eb31 (diff)
downloadlinux-97405fe26b2a4df7090884b086ee8224ace2a6d1.tar.gz
linux-97405fe26b2a4df7090884b086ee8224ace2a6d1.tar.bz2
linux-97405fe26b2a4df7090884b086ee8224ace2a6d1.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup: [PATCH] x86: do not recompile boot for each build [x86 setup] Save/restore DS around invocations of INT 10h [x86 setup] VGA: Clear the Protect bit before setting the vertical height [x86 setup] Fix assembly constraints [x86 setup] build/tools.c: fix comment [x86 setup] MAINTAINERS: document x86 setup code git tree
Diffstat (limited to 'arch/i386/boot/video.h')
-rw-r--r--arch/i386/boot/video.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/i386/boot/video.h b/arch/i386/boot/video.h
index 29eca1710b2c..b92447d51213 100644
--- a/arch/i386/boot/video.h
+++ b/arch/i386/boot/video.h
@@ -117,8 +117,15 @@ extern int graphic_mode; /* Graphics mode with linear frame buffer */
* int $0x10 is notorious for touching registers it shouldn't.
* gcc doesn't like %ebp being clobbered, so define it as a push/pop
* sequence here.
+ *
+ * A number of systems, including the original PC can clobber %bp in
+ * certain circumstances, like when scrolling. There exists at least
+ * one Trident video card which could clobber DS under a set of
+ * circumstances that we are unlikely to encounter (scrolling when
+ * using an extended graphics mode of more than 800x600 pixels), but
+ * it's cheap insurance to deal with that here.
*/
-#define INT10 "pushl %%ebp; int $0x10; popl %%ebp"
+#define INT10 "pushl %%ebp; pushw %%ds; int $0x10; popw %%ds; popl %%ebp"
/* Accessing VGA indexed registers */
static inline u8 in_idx(u16 port, u8 index)