aboutsummaryrefslogtreecommitdiffstats
path: root/core/isolinux.asm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-06-29 13:27:03 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-06-29 13:28:28 -0700
commitf17aca467b77365022da12c9da2c115669eaf234 (patch)
tree3a30f6e285b8ad8c2727ff8093746312fc881759 /core/isolinux.asm
parentcc756fc73c8db591046adc38ed5e0e189f74864b (diff)
downloadsyslinux-f17aca467b77365022da12c9da2c115669eaf234.tar.gz
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@t-online.de> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'core/isolinux.asm')
-rw-r--r--core/isolinux.asm22
1 files changed, 12 insertions, 10 deletions
diff --git a/core/isolinux.asm b/core/isolinux.asm
index d9d630ee..656bbfbf 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