aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-11-26 09:58:17 -0800
committerH. Peter Anvin <hpa@zytor.com>2013-11-26 09:58:17 -0800
commit870b84dd8714ddfccc9288025331423efa6d76b7 (patch)
tree5c6878b5e8ec66d323da18b1004cadf8c1f15be9
parenta176e98a7be72c17c103c5bd7ca1cf94c66e63ad (diff)
downloadhdt-870b84dd8714ddfccc9288025331423efa6d76b7.tar.gz
hdt-870b84dd8714ddfccc9288025331423efa6d76b7.tar.xz
hdt-870b84dd8714ddfccc9288025331423efa6d76b7.zip
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@gmail.com> Reported-by: Philip Müller <philm@manjaro.org> Tested-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/isolinux.asm2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/isolinux.asm b/core/isolinux.asm
index b494eb4d..4dc8be6d 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