[syslinux:elflink] isolinux: Clear upper half of EDX before using
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Tue Nov 26 10:06:08 PST 2013
Commit-ID: 870b84dd8714ddfccc9288025331423efa6d76b7
Gitweb: http://www.syslinux.org/commit/870b84dd8714ddfccc9288025331423efa6d76b7
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Tue, 26 Nov 2013 09:58:17 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Tue, 26 Nov 2013 09:58:17 -0800
isolinux: Clear upper half of EDX before using
In checkin:
cb015497a4e4 isolinux: Update LBA in getlinsec loop
... we use EDX as a sector count, but the sector count is actually in
DX, and the upper half of EDX is uninitialized. If the BIOS enters
with a nonzero value in the upper half of EDX, this breaks horribly.
At least one set of BIOSes has been identified where if the LBA > 64K
then the upper half of EDX will be nonzero.
Reported-by: Carl Duff <cdrw2400 at gmail.com>
Reported-by: Philip Müller <philm at manjaro.org>
Tested-by: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
core/isolinux.asm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/isolinux.asm b/core/isolinux.asm
index b494eb4..4dc8be6 100644
--- a/core/isolinux.asm
+++ b/core/isolinux.asm
@@ -415,7 +415,7 @@ MaxLMA equ 384*1024 ; Reasonable limit (384K)
call getlinsec
pop eax
pop cx
- mov dx,cx
+ movzx edx,cx
pop bp
pop bx
More information about the Syslinux-commits
mailing list