summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2001-07-20 05:00:17 +0000
committerhpa <hpa>2001-07-20 05:00:17 +0000
commitbd25633152b1a9887b418851eb10ca9b204b86a6 (patch)
treee40b3ab5d17fad24330ab526985b34cc0a440101
parentbd22b333ed9d4682ab605f5b34830c30445fe14b (diff)
downloadsyslinux-bd25633152b1a9887b418851eb10ca9b204b86a6.tar.gz
Try to avoid font problems when returning to text mode.
-rw-r--r--NEWS1
-rw-r--r--isolinux.asm23
-rw-r--r--ldlinux.asm24
-rw-r--r--pxelinux.asm24
4 files changed, 19 insertions, 53 deletions
diff --git a/NEWS b/NEWS
index 5cce5ab1..85fa7291 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Changes in 1.63:
exists.
* SYSLINUX: Fix stack-smash bug identified by Steffen
Winterfeldt.
+ * Hopefully fix return-to-text-mode on some graphics cards.
Changes in 1.62:
* PXELINUX: Allow the DHCP server to override the
diff --git a/isolinux.asm b/isolinux.asm
index f3f926b4..663b0d13 100644
--- a/isolinux.asm
+++ b/isolinux.asm
@@ -874,23 +874,6 @@ all_read:
;
; Initialize screen (if we're using one)
;
- ; Get ROM 8x16 font in case we switch to graphics mode
- xor cx,cx
- mov ax,1130h
- mov bh,6 ; Get ROM 8x16 font
- int 10h
- push es
- pop fs
- push ds
- pop es
- cmp cx,16
- jne not_vga ; If not VGA we don't care
- mov si,bp
- mov di,vgafontbuf
- mov cx,(16*256) >> 2
- fs rep movsd
-not_vga:
-
; Now set up screen parameters
call adjust_screen
@@ -3027,6 +3010,8 @@ loadfont:
mov cx,(32*256) >> 2 ; Maximum size
rep movsd
+ mov [UserFont], byte 1 ; Set font flag
+
; Fall through to use_font
;
@@ -3035,6 +3020,9 @@ loadfont:
; vgafontbuf, and updates the adjust_screen data.
;
use_font:
+ test [UserFont], byte 1 ; Are we using a user-specified font?
+ jz adjust_screen ; If not, just do the normal stuff
+
mov bp,vgafontbuf
mov bh,[VGAFontSize]
@@ -4320,6 +4308,7 @@ A20List dw a20_dunno, a20_none, a20_bios, a20_kbc, a20_fast
A20DList dw a20d_dunno, a20d_none, a20d_bios, a20d_kbc, a20d_fast
A20Type dw A20_DUNNO ; A20 type unknown
VGAFontSize dw 16 ; Defaults to 16 byte font
+UserFont db 0 ; Using a user-specified font
ScrollAttribute db 07h ; White on black (for text mode)
;
diff --git a/ldlinux.asm b/ldlinux.asm
index c4647141..3ffdc235 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -1150,24 +1150,6 @@ is_486:
; Initialization that does not need to go into the any of the pre-load
; areas
;
-
- ; Get ROM 8x16 font in case we switch to graphics mode
- xor cx,cx
- mov ax,1130h
- mov bh,6 ; Get ROM 8x16 font
- int 10h
- push es
- pop fs
- push ds
- pop es
- cmp cx,16
- jne not_vga ; If not VGA we don't care
- mov si,bp
- mov di,vgafontbuf
- mov cx,(16*256) >> 2
- fs rep movsd
-not_vga:
-
; Now set up screen parameters
call adjust_screen
;
@@ -2974,6 +2956,8 @@ loadfont:
mov cx,(32*256) >> 2 ; Maximum size
rep movsd
+ mov [UserFont], byte 1 ; Set font flag
+
; Fall through to use_font
;
@@ -2982,6 +2966,9 @@ loadfont:
; vgafontbuf, and updates the adjust_screen data.
;
use_font:
+ test [UserFont], byte 1 ; Are we using a user-specified font?
+ jz adjust_screen ; If not, just do the normal stuff
+
mov bp,vgafontbuf
mov bh,[VGAFontSize]
@@ -4291,6 +4278,7 @@ A20List dw a20_dunno, a20_none, a20_bios, a20_kbc, a20_fast
A20DList dw a20d_dunno, a20d_none, a20d_bios, a20d_kbc, a20d_fast
A20Type dw A20_DUNNO ; A20 type unknown
VGAFontSize dw 16 ; Defaults to 16 byte font
+UserFont db 0 ; Using a user-specified font
ScrollAttribute db 07h ; White on black (for text mode)
;
; Stuff for the command line; we do some trickery here with equ to avoid
diff --git a/pxelinux.asm b/pxelinux.asm
index f1d6158f..5a2d5a48 100644
--- a/pxelinux.asm
+++ b/pxelinux.asm
@@ -436,24 +436,6 @@ _start1:
;
; Initialize screen (if we're using one)
;
-
- ; Get ROM 8x16 font in case we switch to graphics mode
- xor cx,cx
- mov ax,1130h
- mov bh,6 ; Get ROM 8x16 font
- int 10h
- push es
- pop fs
- push ds
- pop es
- cmp cx,16
- jne not_vga ; If not VGA we don't care
- mov si,bp
- mov di,vgafontbuf
- mov cx,(16*256) >> 2
- fs rep movsd
-not_vga:
-
; Now set up screen parameters
call adjust_screen
;
@@ -3041,6 +3023,8 @@ loadfont:
mov cx,(32*256) >> 2 ; Maximum size
rep movsd
+ mov [UserFont], byte 1 ; Set font flag
+
; Fall through to use_font
;
@@ -3049,6 +3033,9 @@ loadfont:
; vgafontbuf, and updates the adjust_screen data.
;
use_font:
+ test [UserFont], byte 1 ; Are we using a user-specified font?
+ jz adjust_screen ; If not, just do the normal stuff
+
mov bp,vgafontbuf
mov bh,[VGAFontSize]
@@ -4864,6 +4851,7 @@ A20List dw a20_dunno, a20_none, a20_bios, a20_kbc, a20_fast
A20DList dw a20d_dunno, a20d_none, a20d_bios, a20d_kbc, a20d_fast
A20Type dw A20_DUNNO ; A20 type unknown
VGAFontSize dw 16 ; Defaults to 16 byte font
+UserFont db 0 ; Using a user-specified font
ScrollAttribute db 07h ; White on black (for text mode)
;