aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-01-07 15:13:59 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-01-07 15:13:59 -0800
commitf87662aa975e26d876920846244b202fb3a165e5 (patch)
tree4f36275dfd55949edc933bf5b959b7be973fbd34
parent35215851f501118fabbc408338e3149e5fcfb146 (diff)
downloadsyslinux-elf-f87662aa975e26d876920846244b202fb3a165e5.tar.gz
syslinux-elf-f87662aa975e26d876920846244b202fb3a165e5.tar.xz
syslinux-elf-f87662aa975e26d876920846244b202fb3a165e5.zip
Unconditionally reset the ADV if we don't have one loaded from a mediumsyslinux-3.60-pre8
For non-extlinux derivatives, unconditionally initialize the in-memory ADV to blank.
-rw-r--r--adv.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/adv.inc b/adv.inc
index 989b4e0b..e1f65270 100644
--- a/adv.inc
+++ b/adv.inc
@@ -90,6 +90,9 @@ adv_init:
; Initialize the ADV data structure in memory
;
adv_verify:
+ cmp byte [ADVDrive],-1 ; No ADV configured, still?
+ je .reset ; Then unconditionally reset
+
mov si,adv0
call .check_adv
jz .ok ; Primary ADV okay
@@ -98,6 +101,7 @@ adv_verify:
jz .adv1ok
; Neither ADV is usable; initialize to blank
+.reset:
mov di,adv0
mov eax,ADV_MAGIC1
stosd