From f17aca467b77365022da12c9da2c115669eaf234 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 29 Jun 2010 13:27:03 -0700 Subject: [PATCH] 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 Signed-off-by: H. Peter Anvin --- core/isolinux.asm | 22 ++++++++++++---------- 1 file 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 -- 2.7.4