[syslinux] Nasty Bug (BIOS?).

Geert Stappers stappers at stappers.nl
Thu Aug 18 10:44:11 PDT 2005


On Thu, Aug 18, 2005 at 02:15:14PM +0200, Arwin Vosselman wrote:
> 
> At first I thought, I was dealing with the known EBIOS/CBIOS-problem.
> The symptom was exactly the same (hangs at ...EBIOS). As 3.10-pre8 and
> 3.10-pre9, in contrary what was mentioned in the ML, did not bring any
> improvement, I looked deeper into what could be my specific problem.
> 
> I found out that the program just halted at 'cmp [esi],edx' (line 658;
> ldlinux.asm 3.10-pre9)! By replacing that code by 'cmp [si],edx' the
> problems were gone, it worked like a charm;-) The only thing I can think
> of to cause this is that the 16 high bits of esi are incorrect. (An
> opcode-bug for this command seemed out of the question.)
> 
> After putting 'cmp [esi],edx' back and putting in a command 'xor esi,esi'
> after line 641 it works again like a charm. This proves IMO my theory
> that the high 16 bits of esi were set to some undesired value.
> 
> Probably the BIOS is setting the 16 high bits of esi to some value
> causing 'cmp [esi], edx' to go beyond the maximum.
> 
> Hardware: MB Chaintech 5AGM2, BIOS Award v4.51PG, Intel Pentium 166-MMX,
> HDD 6GB.
> 

Nice report, thank you.

Below is a translation (attempt) into a unified diff,
I hope I understood the report well enough


$ diff -burN syslinux-3.10-pre8-untouched/ syslinux-3.10-pre8-modified/
diff -burN syslinux-3.10-pre8-untouched/ldlinux.asm
syslinux-3.10-pre8-modified/ldlinux.asm
--- syslinux-3.10-pre8-untouched/ldlinux.asm    2005-08-09 07:23:54.000000000 +0200
+++ syslinux-3.10-pre8-modified/ldlinux.asm     2005-08-18 19:35:50.622201936 +0200
@@ -654,7 +654,7 @@
                dec cx
                jz .chunk_ready
                inc edx                         ; Next linear sector
-               cmp [esi],edx                   ; Does it match
+               cmp [si],edx                    ; Does it match
                jnz .chunk_ready                ; If not, this is it
                add esi,4                       ; If so, add sector to chunk
                jmp short .make_chunk



Cheers
Geert Stappers




More information about the Syslinux mailing list