Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61392
b: refs/heads/master
c: 8c027ae
h: refs/heads/master
v: v3
  • Loading branch information
H. Peter Anvin committed Jul 18, 2007
1 parent 3e4b315 commit 5a14f03
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ad37df02c529525c4ad19035359af89d2d2a5bd
refs/heads/master: 8c027ae2dcfa7b9130941a2a743c735c1fee04ee
2 changes: 1 addition & 1 deletion trunk/arch/i386/boot/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void __attribute__((section(".inittext"))) putchar(int ch)

/* int $0x10 is known to have bugs involving touching registers
it shouldn't. Be extra conservative... */
asm volatile("pushal; int $0x10; popal"
asm volatile("pushal; pushw %%ds; int $0x10; popw %%ds; popal"
: : "b" (0x0007), "c" (0x0001), "a" (0x0e00|ch));
}

Expand Down
9 changes: 8 additions & 1 deletion trunk/arch/i386/boot/video.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5a14f03

Please sign in to comment.