Ok. So I took a look at the code to figure out why the last output that I see is "Jumping to LinuxBIOS".
My assembly is weak so I'd appreciate corrections to my interpretation of the asm below.
decompr_end_n2b: movb $0x12, %al ; outb %al, $0x80 movl %esp, %ebp mov $str_pre_main, %ebx ; lea 0f, %esp ; jmp console_tx_string ; 0: leal _iseg, %edi jmp %edi
This suggests to me that since the console_tx_string succesfully wrote to the serial port, that leal _iseg, %edi; jmp %edi is the area of my problem.
looking at _iseg, by dumping crt0.o, i see:
00000aab <decompr_end_n2b>: aab: b0 12 mov $0x12,%al aad: e6 80 out %al,$0x80 aaf: 89 e5 mov %esp,%ebp ab1: bb 1c 00 00 00 mov $0x1c,%ebx ab6: 8d 25 c1 0a 00 00 lea 0xac1,%esp abc: e9 fa f7 ff ff jmp 2bb <console_tx_string> ac1: 8d 3d 00 00 00 00 lea 0x0,%edi ac7: ff e7 jmp *%edi ac9: b0 ee mov $0xee,%al acb: e6 80 out %al,$0x80 acd: f4 hlt ace: eb f9 jmp ac9 <decompr_end_n2b+0x1e>
i was surprised by the lea 0x0, %edi; jmp *%edi. but then i figured _iseg might get defined later by the ldscript.
i see that the i386 config sets _iseg to _RAMBASE. and that was set to 0x4000 in another i386 default. so dumping linuxbios shows:
000f0aab <decompr_end_n2b>: f0aab: b0 12 mov $0x12,%al f0aad: e6 80 out %al,$0x80 f0aaf: 89 e5 mov %esp,%ebp f0ab1: bb ec 0a 0f 00 mov $0xf0aec,%ebx f0ab6: 8d 25 c1 0a 0f 00 lea 0xf0ac1,%esp f0abc: e9 fa f7 ff ff jmp f02bb <console_tx_string> f0ac1: 8d 3d 00 40 00 00 lea 0x4000,%edi f0ac7: ff e7 jmp *%edi f0ac9: b0 ee mov $0xee,%al f0acb: e6 80 out %al,$0x80 f0acd: f4 hlt f0ace: eb f9 jmp f0ac9 <decompr_end_n2b+0x1e>
that _iseg looks better now. so next, i need to figure out what ought to be at 0x4000. looking at __main since that's where the copying to ram serial output comes from, i see a mov f0ad0,ebx, output, then lea 0x4000,%edi. and a 0xf0b14 into %esi. we then jump to dcl1_n2b. i don't really understand the code there. but i think that looks like it's copying f0b14 to 4000. i think that's what the movsb %ds:(%esi),%es:(%edi) is doing. i wonder when that loop terminates.
i guess i must be wrong here, f0b14, is after _binary_linuxbios_payload_start. i doubt we're supposed to be jumping to filo at that point. i was expecting pci initialization, other stuff and then filo to come in and read the kernel elf from an ext2 partition from the ide (CompactFlash) device. are those assumptions valid?
ok. i ought to reread the code. i suspect that most likely i've got misprogrammed sdram or something like that. in the meantime, if anyone's got suggestions/advice, i'm all ears.
000f09f2 <__main>: f09f2: bb d0 0a 0f 00 mov $0xf0ad0,%ebx f09f7: 8d 25 02 0a 0f 00 lea 0xf0a02,%esp f09fd: e9 b9 f8 ff ff jmp f02bb <console_tx_string> f0a02: b0 11 mov $0x11,%al f0a04: e6 80 out %al,$0x80 f0a06: fc cld f0a07: 8d 35 14 0b 0f 00 lea 0xf0b14,%esi f0a0d: 8d 3d 00 40 00 00 lea 0x4000,%edi f0a13: 89 ec mov %ebp,%esp f0a15: bd ff ff ff ff mov $0xffffffff,%ebp f0a1a: eb 05 jmp f0a21 <dcl1_n2b>
000f0a1c <decompr_literals_n2b>: f0a1c: a4 movsb %ds:(%esi),%es:(%edi)
000f0a1d <decompr_loop_n2b>: f0a1d: 01 db add %ebx,%ebx f0a1f: 75 07 jne f0a28 <dcl2_n2b>
000f0a21 <dcl1_n2b>: f0a21: 8b 1e mov (%esi),%ebx f0a23: 83 ee fc sub $0xfffffffc,%esi f0a26: 11 db adc %ebx,%ebx
000f0a28 <dcl2_n2b>: f0a28: 72 f2 jb f0a1c <decompr_literals_n2b> f0a2a: 31 c0 xor %eax,%eax f0a2c: 40 inc %eax
--- ramesh bios ramesh_bios@yahoo.com wrote:
Hi Ron,
Just wanted to report that your suggestion was excellent. I'm now getting serial output saying "Jumping to LinuxBIOS". It took only a few minutes to get this working so I was pleasantly surprised. :-) Thanks!
Ok, I'm now going to read a bit more about x86 booting and figure out what's next and what the memory output means.
LinuxBIOS-1.0.0 Tue Jan 11 06:22:00 IST 2005 starting... Setting up default parameters for memory Sizing memory Probing for DIMM0 Probing for DIMM1 Found DIMM1 Page Size: 00001000 Component Banks: 4 Module Banks: 2 DIMM size: 08000000 Memory sizing done, MC_BANK_CFG = 0x55200070 Copying LinuxBIOS to ram. Jumping to LinuxBIOS.
Thanks all!
--- "Ronald G. Minnich" rminnich@lanl.gov wrote:
your plan is fine. use the advantech pcm5823 as a model board, and use freebios, not freebios2.
Don't fit linux into the flash. Use filo and boot linux from a hard drive.
Keep me posted on how it goes and good luck.
ron _______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org
http://www.clustermatic.org/mailman/listinfo/linuxbios
__________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250 _______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org
http://www.clustermatic.org/mailman/listinfo/linuxbios
__________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail