[syslinux:master] isolinux: make sure Hidden is zero in native El Torito mode

syslinux-bot for H. Peter Anvin hpa at linux.intel.com
Tue Jun 29 13:30:14 PDT 2010


Commit-ID:  f17aca467b77365022da12c9da2c115669eaf234
Gitweb:     http://syslinux.zytor.com/commit/f17aca467b77365022da12c9da2c115669eaf234
Author:     H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Tue, 29 Jun 2010 13:27:03 -0700
Committer:  H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Tue, 29 Jun 2010 13:28:28 -0700

isolinux: make sure Hidden is zero in native El Torito mode

In native El Torito mode, there is no such thing as a partition
offset.  Make sure that we set Hidden to zero -- we don't use Hidden
(yet, although the ebios and cdrom code should be merged!) but we pass
it to the PM code, which will produce *really* wrong results...

Reported-by: Helmut Hullen <Hullen at t-online.de>
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>


---
 core/isolinux.asm |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/core/isolinux.asm b/core/isolinux.asm
index d9d630e..656bbfb 100644
--- a/core/isolinux.asm
+++ b/core/isolinux.asm
@@ -101,7 +101,7 @@ ISOFlags	resb 1			; Flags for ISO directory search
 RetryCount      resb 1			; Used for disk access retries
 
 		alignb 8
-Hidden	resq 1			; Used in hybrid mode
+Hidden		resq 1			; Used in hybrid mode
 bsSecPerTrack	resw 1			; Used in hybrid mode
 bsHeads		resw 1			; Used in hybrid mode
 
@@ -242,9 +242,6 @@ _start_hybrid:
 		pop eax
 		pop ebx
 .nooffset:
-		mov [cs:Hidden],eax
-		mov [cs:Hidden+4],ebx
-
 		mov si,bios_cbios
 		jcxz _start_common
 		mov si,bios_ebios
@@ -253,21 +250,26 @@ _start_hybrid:
 
 _start1:
 		mov si,bios_cdrom
+		xor eax,eax
+		xor ebx,ebx
 _start_common:
 		mov [cs:InitStack],sp	; Save initial stack pointer
 		mov [cs:InitStack+2],ss
-		xor ax,ax
-		mov ss,ax
+		xor dx,dx
+		mov ss,dx
 		mov sp,StackBuf		; Set up stack
 		push es			; Save initial ES:DI -> $PnP pointer
 		push di
-		mov ds,ax
-		mov es,ax
-		mov fs,ax
-		mov gs,ax
+		mov ds,dx
+		mov es,dx
+		mov fs,dx
+		mov gs,dx
 		sti
 		cld
 
+		mov [Hidden],eax
+		mov [Hidden+4],ebx
+
 		mov [BIOSType],si
 		mov eax,[si]
 		mov [GetlinsecPtr],eax



More information about the Syslinux-commits mailing list