[coreboot] Gigabyte M57SLI - 4MB Chip - LAB LZMA Error

Harald Gutmann harald.gutmann at gmx.net
Fri May 23 20:05:05 CEST 2008


as i had some time in the past week i tried to get coreboot running on the m57sli mainboard, but i failed once more. i created the romimage with buildrom-devel, and did some changes to different values.

First here are all my modifications to the svn tree:
buildrom-devel: nothing special, just add a kernel-config for 64bit.

cooreboot v2: change the ROM_SIZE to 4MB and increase the value for ROM_IMAGE_SIZE, as the ld process fails otherwise with the following error: 
build-error: http://phpfi.com/319154
changes to the coreboot svn-tree: http://phpfi.com/319151

Here is the buildrom-devel .config file:

The result on that changes is an 4MB large rom-file, which boots up, but fails on LZMA decompression with this erorr:

rom_stream: 0xffc00000 - 0xfffe7fff
Uncompressing to RAM 0x0100000
Incorrect stream properties
Decoder scratchpad too small!
Decoding error = 1
Unexpected Exeption: 6 at 10:04000408 - Halting

After looking at the code, with my "little" programming experiences, i found out, that the error results from the function LzmaDecodeProperties and is caused by the value prop0 as it seems to me. I added a printk_warning of prop0 which results in the compilled images in a value of 255, where the code needs it smaller than 9 * 5 * 5, which would be 225.

Here is the code which is interesting for my investigations:
int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size)
  unsigned char prop0;
  prop0 = propsData[0];		//at that point on trying to boot the image the prop0 value is 255
  if (prop0 >= (9 * 5 * 5))
    for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5));
    for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9);
    propsRes->lc = prop0;
    unsigned char remainder = (unsigned char)(prop0 / 9);
    propsRes->lc = prop0 % 9;
    propsRes->pb = remainder / 5;
    propsRes->lp = remainder % 5;
  return LZMA_RESULT_OK;

Has anyone of you an idea why the lzma decompression fails, or what could be done against that? 
What i tried until now is to increase the "scratchpad" in lzma.c, but that didn't help and was just guessed. The error is the same if i try to build coreboot with the same changes, and just für 32bit. 

Kind regards,
Harald Gutmann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080523/028e122f/attachment.html>

More information about the coreboot mailing list