I'm in the middle of debugging two possibly unrelated problems so I thought I'd share. At least this documents my train of thought for later.
I have an etherboot and filo payload for my Tyan s2892 board. It wasn't working, so I decided to try it on qemu. There seems to be something wrong with the ELF loader if this payload is compressed, although it works fine uncompressed. The error message is: rom_stream: 0xffe00000 - 0xfffeffff Uncompressing to RAM 0x01000000 olen = 0x0000bdba done. Found ELF candidate at offset 0 header_offset is 0 Try to load at offset 0x0 Loading Etherboot version: 5.4.2 Dropping non PT_LOAD segment New segment addr 0x10000 size 0x583c0 offset 0x0 filesize 0xbdc0 (cleaned up) New segment addr 0x10000 size 0x583c0 offset 0x0 filesize 0xbdc0 Loading Segment: addr: 0x0000000007fe4000 memsz: 0x0000000000008000 filesz: 0x0000000000008000 Loading Segment: addr: 0x0000000000018000 memsz: 0x00000000000503c0 filesz: 0x0000000000003dc0 121:stream_skip() - overflowed source buffer ERROR: Read of 15808 bytes read 15802 bytes... Can not load ELF Image.
So I tried to insert some debug statements to see why it was overflowing... I added a printk_warning:
And it errored out with the "scratchpad too small" error. Unfortunately I deleted the exact printk_warning statement, because now I can't recreate it. Maybe I'll figure out what I did eventually...
So with a new printk_warning statement, it looks like the uncompress doesn't return the correct size. It returns 0xbdba, and then tries to load 0xbdc0 bytes into memory.
rom_stream: 0xffe00000 - 0xfffeffff Uncompressing to RAM 0x01000000 olen = 0x0000bdba done. Found ELF candidate at offset 0 header_offset is 0 Try to load at offset 0x0 Loading Etherboot version: 5.4.2 Dropping non PT_LOAD segment New segment addr 0x10000 size 0x583c0 offset 0x0 filesize 0xbdc0 (cleaned up) New segment addr 0x10000 size 0x583c0 offset 0x0 filesize 0xbdc0 Loading Segment: addr: 0x0000000007fe4000 memsz: 0x0000000000008000 filesz: 0x0000000000008000 Loading Segment: addr: 0x0000000000018000 memsz: 0x00000000000503c0 filesz: 0x0000000000003dc0 rom 1008000 bytes 3dc0 rom_end 100bdb9 122:stream_skip() - overflowed source buffer ERROR: Read of 15808 bytes read 15802 bytes... Can not load ELF Image.
Anyway, I'm attaching the payload if anyone wants to help. The easiest way to reproduce it is with buildrom. Copy this payload into the deploy directory and configure buildrom to use LZMA for the payload, qemu for the platform, v2 for Coreboot.
Thanks, Myles