aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-09-05 18:02:17 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-09-05 18:02:17 -0700
commitd9321cea89ddf163ca8e2661474714a73b541acd (patch)
tree5456b1ff52e4883f38418c5e16736849a5d064d4 /core
parentc4410d5977e8cb2cfe468faeed6e60e72b58ccac (diff)
downloadsyslinux-elf-d9321cea89ddf163ca8e2661474714a73b541acd.tar.gz
syslinux-elf-d9321cea89ddf163ca8e2661474714a73b541acd.tar.xz
syslinux-elf-d9321cea89ddf163ca8e2661474714a73b541acd.zip
isolinux: display BIOS type
Display the BIOS type for isolinux in the same way we do for ldlinux/extlinux. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core')
-rw-r--r--core/isolinux.asm36
1 files changed, 28 insertions, 8 deletions
diff --git a/core/isolinux.asm b/core/isolinux.asm
index cb581e98..6ea2ef3b 100644
--- a/core/isolinux.asm
+++ b/core/isolinux.asm
@@ -118,7 +118,11 @@ ImageDwords resd 1 ; isolinux.bin size, dwords
InitStack resd 1 ; Initial stack pointer (SS:SP)
DiskSys resw 1 ; Last INT 13h call
ImageSectors resw 1 ; isolinux.bin size, sectors
+; These following two are accessed as a single dword...
GetlinsecPtr resw 1 ; The sector-read pointer
+BIOSName resw 1 ; Display string for BIOS type
+%define HAVE_BIOSNAME 1
+BIOSType resw 1
DiskError resb 1 ; Error code for disk I/O
DriveNumber resb 1 ; CD-ROM BIOS drive number
ISOFlags resb 1 ; Flags for ISO directory search
@@ -246,11 +250,11 @@ _hybrid_signature:
_start_hybrid:
pop ax
- mov si,getlinsec_ebios
+ mov si,bios_cbios
and ax,ax
- jnz .ebios
- mov si,getlinsec_cbios
-.ebios:
+ jz .cbios
+ mov si,bios_ebios
+.cbios:
pop word [cs:bsSecPerTrack]
pop word [cs:bsHeads]
@@ -261,7 +265,7 @@ _start_hybrid:
%endif
_start1:
- mov si,getlinsec_cdrom
+ mov si,bios_cdrom
_start_common:
mov [cs:InitStack],sp ; Save initial stack pointer
mov [cs:InitStack+2],ss
@@ -277,15 +281,19 @@ _start_common:
sti
cld
- mov [GetlinsecPtr],si
+ mov [BIOSType],si
+ mov eax,[si]
+ mov [GetlinsecPtr],eax
; Show signs of life
mov si,syslinux_banner
call writestr_early
%ifdef DEBUG_MESSAGES
mov si,copyright_str
- call writestr_early
+%else
+ mov si,[BIOSName]
%endif
+ call writestr_early
;
; Before modifying any memory, get the checksum of bytes
@@ -325,7 +333,7 @@ initial_csum: xor edi,edi
inc word [dsp_sectors]
; Are we just pretending to be a CD-ROM?
- cmp word [GetlinsecPtr],getlinsec_cdrom
+ cmp word [BIOSType],bios_cdrom
jne found_drive ; If so, no spec packet...
; Now figure out what we're actually doing
@@ -1049,7 +1057,19 @@ bailmsg equ err_bootfailed
crlf_msg db CR, LF
null_msg db 0
+bios_cdrom_str db 'ETCD', 0
+%ifndef DEBUG_MESSAGES
+bios_cbios_str db 'CHDD', 0
+bios_ebios_str db 'EHDD' ,0
+%endif
+
alignb 4, db 0
+bios_cdrom: dw getlinsec_cdrom, bios_cdrom_str
+%ifndef DEBUG_MESSAGES
+bios_cbios: dw getlinsec_cbios, bios_cbios_str
+bios_ebios: dw getlinsec_ebios, bios_ebios_str
+%endif
+
MaxTransfer dw 32 ; Max sectors per transfer
rl_checkpt equ $ ; Must be <= 800h