aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2002-06-06 02:00:50 +0000
committerhpa <hpa>2002-06-06 02:00:50 +0000
commit702f0b85d3a26cfaab412ec3663f9b0ca50c48b4 (patch)
treeba4f4f478e356d21546c7b141344ff9b628d90e1
parentff925de6d538f8f95c375cba28f8616d19aee179 (diff)
downloadsyslinux-702f0b85d3a26cfaab412ec3663f9b0ca50c48b4.tar.gz
syslinux-702f0b85d3a26cfaab412ec3663f9b0ca50c48b4.tar.xz
syslinux-702f0b85d3a26cfaab412ec3663f9b0ca50c48b4.zip
Fix COMBOOT return; support DOS system calls 00 and 4C (both are EXIT.)syslinux-1.75-pre3
-rw-r--r--NEWS6
-rw-r--r--comboot.inc51
-rw-r--r--isolinux.asm3
-rw-r--r--ldlinux.asm3
-rw-r--r--pxelinux.asm3
5 files changed, 45 insertions, 21 deletions
diff --git a/NEWS b/NEWS
index 7675b954..7edf945f 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,12 @@ Changes in 1.75:
* ISOLINUX: Add a few more workarounds for various broken El
Torito BIOSes.
* Make sure .depend files aren't accidentally packed...
+ * ALL: Fix bugs in the extension-detect code; this caused
+ files like COMBOOT images and CD boot sectors to be
+ mis-identified as Linux kernels and rejected.
+ * ALL: Fix the return from COMBOOT.
+ * ALL: Do some of the early groundwork for supporting DOS
+ system calls in COMBOOT.
Changes in 1.74:
* SYSLINUX: fix bug that would cause valid kernel images to be
diff --git a/comboot.inc b/comboot.inc
index fbda0973..5d7019ed 100644
--- a/comboot.inc
+++ b/comboot.inc
@@ -37,12 +37,15 @@ is_comboot_image:
;
; Set up the DOS vectors in the IVT (INT 20h-3fh)
;
- mov dword [4*0x20],comboot_return ; INT 20h vector
- mov eax,comboot_bogus
- mov di,4*0x21
- mov cx,31 ; All remaining DOS vectors
+ mov di,4*0x20 ; DOS interrupt vectors
+ mov eax,comboot_return
+ stosd
+ mov ax,comboot_int21
+ stosd
+ mov ax,comboot_bogus
+ mov cx,30 ; All remaining DOS vectors
rep stosd
-
+
mov cx,comboot_seg
mov es,cx
@@ -79,8 +82,7 @@ comboot_end_cmd: mov al,0Dh ; CR after last character
mov [es:80h], al ; Store command line length
mov [SavedSSSP],sp
- mov ax,ss ; Save away SS:SP
- mov [SavedSSSP+2],ax
+ mov [SavedSSSP+2],ss ; Save away SS:SP
call vgaclearmode ; Reset video
@@ -94,23 +96,36 @@ comboot_end_cmd: mov al,0Dh ; CR after last character
; Proper return vector
comboot_return: cli ; Don't trust anyone
- lss sp,[cs:SavedSSSP]
- mov ds,ax
- mov es,ax
- sti
- cld
- jmp cb_enter
+ xor ax,ax
+ jmp comboot_exit
+
+; INT 21h: generic DOS system call
+comboot_int21: and ah,ah ; 00 = return
+ je comboot_return
+ cmp ah,4Ch ; 4C = return with status
+ je comboot_return
-; Attempted to execute DOS system call
+ ; Otherwise fall through to comboot_bogus
+
+; Attempted to execute non-21h DOS system call
comboot_bogus: cli ; Don't trust anyone
+ mov ax,err_notdos
+
+;
+; Generic COMBOOT return to command line code
+;
+comboot_exit:
lss sp,[cs:SavedSSSP]
- mov ds,ax
- mov es,ax
+ xor dx,dx
+ mov ds,dx
+ mov es,dx
sti
cld
+ and ax,ax
+ je .nomsg
mov si,KernelCName
call cwritestr
- mov si,err_notdos
+ xchg si,ax
call cwritestr
- jmp cb_enter
+.nomsg: jmp cb_enter
diff --git a/isolinux.asm b/isolinux.asm
index bfa6b915..3373f596 100644
--- a/isolinux.asm
+++ b/isolinux.asm
@@ -646,7 +646,8 @@ checkerr_msg: db 'Image checksum error, sorry...', CR, LF, 0
err_bootfailed db CR, LF, 'Boot failed: press a key to retry...'
bailmsg equ err_bootfailed
-crlf_msg db CR, LF, 0
+crlf_msg db CR, LF
+null_msg db 0
;
; El Torito spec packet
diff --git a/ldlinux.asm b/ldlinux.asm
index 008a82f8..955665a3 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -1685,7 +1685,8 @@ loading_msg db 'Loading ', 0
dotdot_msg db '.'
dot_msg db '.', 0
aborted_msg db ' aborted.' ; Fall through to crlf_msg!
-crlf_msg db CR, LF, 0
+crlf_msg db CR, LF
+null_msg db 0
crff_msg db CR, FF, 0
syslinux_cfg db 'SYSLINUXCFG'
;
diff --git a/pxelinux.asm b/pxelinux.asm
index a5494323..9615b45a 100644
--- a/pxelinux.asm
+++ b/pxelinux.asm
@@ -2297,7 +2297,8 @@ dotdot_msg db '.'
dot_msg db '.', 0
fourbs_msg db BS, BS, BS, BS, 0
aborted_msg db ' aborted.' ; Fall through to crlf_msg!
-crlf_msg db CR, LF, 0
+crlf_msg db CR, LF
+null_msg db 0
crff_msg db CR, FF, 0
default_str db 'default', 0
default_len equ ($-default_str)