summaryrefslogtreecommitdiff
path: root/core/adv.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-14 16:33:37 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-14 16:33:37 -0700
commit0046660e3849bef9d922ba69d07c5bc639d1d133 (patch)
tree0d60efb691e622912682b7bab367a51ce8ead76e /core/adv.inc
parent1c7146a2eeaaf0021cc15e682e12609a652ed870 (diff)
downloadsyslinux-0046660e3849bef9d922ba69d07c5bc639d1d133.tar.gz
core: handle more than 32K of code for disk-based derivatives
Handle more than 32K worth of code for disk-based derivatives. We do this by allowing the sector pointers to overflow past sector 1; this is OK because we limit a run to be based on only the pointers that we have read so far. XXX: This is implemented for EXTLINUX, but breaks SYSLINUX. Need to update (and unify!) the SYSLINUX installers to cope. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/adv.inc')
-rw-r--r--core/adv.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/core/adv.inc b/core/adv.inc
index c1a2628e..cfb39bdc 100644
--- a/core/adv.inc
+++ b/core/adv.inc
@@ -67,24 +67,26 @@ adv_init:
cmp byte [ADVDrive],-1
jne adv_read
-;%if IS_SYSLINUX || IS_MDSLINUX || IS_EXTLINUX
-%if IS_EXTLINUX ; Not yet implemented for the other derivatives
+%if IS_SYSLINUX || IS_EXTLINUX
+ cmp word [ADVSectors],2 ; Not present?
+ jb adv_verify
+
;
; Update pointers to default ADVs...
;
- mov bx,[LDLSectors]
+ mov bx,[DataSectors]
shl bx,2
mov ecx,[bsHidden]
- mov eax,[bx+SectorPtrs-8]
- mov edx,[bx+SectorPtrs-4]
+ mov eax,[bx+SectorPtrs] ; First ADV sector
+ mov edx,[bx+SectorPtrs+4] ; Second ADV sector
add eax,ecx
add edx,ecx
mov [ADVSec0],eax
mov [ADVSec1],edx
mov al,[DriveNumber]
mov [ADVDrive],al
+ jmp adv_read
%endif
- ; ** fall through to adv_verify **
;
; Initialize the ADV data structure in memory