[syslinux] Nasty Bug (BIOS?).

H. Peter Anvin hpa at zytor.com
Thu Aug 18 10:34:59 PDT 2005


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.
> 

*Thank you* for some excellent debugging work!  The uses of esi on lines 
658 and 660 are, in fact, a bug.  The CBIOS code has as a side effect to 
set the high bits of esi to zero (line 456), but the EBIOS code doesn't, 
so it's not really surprising that that caused problems; it's more 
surprising it hasn't caused problems on more systems.

I will fix this and push out 3.10-pre10.

	-hpa




More information about the Syslinux mailing list