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. -- Regards, Arwin.
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
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