summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Robson <syslinux@mailinator.com>2008-02-16 16:06:18 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-16 16:06:18 -0800
commitcfd4ca71972366cbde56d7804696dede526b84c1 (patch)
tree542b13657a6f9f3c6f16b32c39cc14a63b1a4a9e
parent692f55c6ea720972780d47084a4a2146e56003d5 (diff)
downloadsyslinux-cfd4ca71972366cbde56d7804696dede526b84c1.tar.gz
ISOLINUX: Adaptec bug fix: handle the case of DL missing bit 7syslinux-3.62-pre9
Intel Classic R+ computer with Adaptec 1542CP BIOS 1.02 passes garbage in sp_drive, and the drive number originally passed in DL does not have 80h bit set. Check for this case and compensate if appropriate.
-rw-r--r--isolinux.asm14
1 files changed, 11 insertions, 3 deletions
diff --git a/isolinux.asm b/isolinux.asm
index be8fd0f7..c2457697 100644
--- a/isolinux.asm
+++ b/isolinux.asm
@@ -320,7 +320,7 @@ found_drive:
call writemsg
%endif
- ; No such luck. See if the the spec packet contained one.
+ ; No such luck. See if the spec packet contained one.
mov eax,[sp_lba]
and eax,eax
jz set_file ; Good enough
@@ -578,16 +578,24 @@ spec_query_failed:
; Okay, good enough...
mov si,alright_msg
call writemsg
- mov [DriveNumber],dl
+.found_drive0: mov [DriveNumber],dl
.found_drive: jmp found_drive
; Award BIOS 4.51 apparently passes garbage in sp_drive,
; but if this was the drive number originally passed in
; DL then consider it "good enough"
.maybe_broken:
- cmp byte [DriveNumber],dl
+ mov al,[DriveNumber]
+ cmp al,dl
je .found_drive
+ ; Intel Classic R+ computer with Adaptec 1542CP BIOS 1.02
+ ; passes garbage in sp_drive, and the drive number originally
+ ; passed in DL does not have 80h bit set.
+ or al,80h
+ cmp al,dl
+ je .found_drive0
+
.still_broken: dec dx
cmp dl, 80h
jnb .test_loop