Trouble with etherboot-5.2.2

Eric W. Biederman ebiederman at
Tue Jan 6 15:57:01 CET 2004

Dave Ashley <linuxbios at> writes:

> Eric wrote:
> >Agreed.  What does readelf -e say they are in the file?
> Here it is:
> dave% readelf -e bin/via-rhine.elf 
> ELF Header:
>   Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
>   Class:                             ELF32
>   Data:                              2's complement, little endian
>   Version:                           1 (current)
>   OS/ABI:                            UNIX - System V
>   ABI Version:                       0
>   Type:                              EXEC (Executable file)
>   Machine:                           Intel 80386
>   Version:                           0x1
>   Entry point address:               0x20000
>   Start of program headers:          52 (bytes into file)
>   Start of section headers:          0 (bytes into file)
>   Flags:                             0x0
>   Size of this header:               52 (bytes)
>   Size of program headers:           32 (bytes)
>   Number of program headers:         2
>   Size of section headers:           0 (bytes)
>   Number of section headers:         0
>   Section header string table index: 0
> There are no sections in this file.
> Program Headers:
>   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
>   NOTE           0x000074 0x00000074 0x00000074 0x0003c 0x0003c RWE 0
>   LOAD           0x0000b0 0x00020000 0x00020000 0x05abc 0x0efc0 RWE 0

So we now know which segments you have and for certain their

> I get this with linuxbios + 5.2.2:
> Found ELF candiate at offset 0
> Loading Etherboot version: 5.2.2
> Dropping non PT_LOAD segment  
This is dropping the note segment.

> New segment addr 0x20000 size 0xefc0 offset 0xb0 filesize 0x5abc
> (cleaned up) New segment addr 0x20000 size 0xefc0 offset 0xb0 filesize 0x5abc

The segment is initially read from the rom fine.
> Loading Segment: addr: 0x0000000005f81028 memsz: 0x000000000000efc0 filesz: 0x0c
> Clearing Segment: addr: 0x0000000005f86ae4 memsz: 0x0000000000009504

The segment has been corrupted in processing.  So somewhere
between the call to build_elf_segment_list and load_elf_segment
the list has gotten corrupted.

My hunch it is just a coincidence that a new etherboot triggered this

> Jumping to boot code at 0x20000
> ROM segment 0x0001 length 0x0000 reloc 0x00020000

Take a look at the values in the segment list in elfboot.c and see
if you can track down how it is getting corrupted.  My hunch says it is
most likely a mis setup of your DRAM controller.


More information about the coreboot mailing list