<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif">
<p>Hello,</p>
<p></p>
<p>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.</p>
<p></p>
<p></p>
<p>First here are all my modifications to the svn tree:</p>
<p>buildrom-devel: nothing special, just add a kernel-config for 64bit.</p>
<p>http://phpfi.com/319153</p>
<p></p>
<p>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: </p>
<p>build-error: http://phpfi.com/319154</p>
<p>changes to the coreboot svn-tree: http://phpfi.com/319151</p>
<p></p>
<p>Here is the buildrom-devel .config file:</p>
<p>http://phpfi.com/319150</p>
<p></p>
<p></p>
<p>The result on that changes is an 4MB large rom-file, which boots up, but fails on LZMA decompression with this erorr:</p>
<p></p>
<p>rom_stream: 0xffc00000 - 0xfffe7fff</p>
<p>Uncompressing to RAM 0x0100000</p>
<p>Incorrect stream properties</p>
<p>Decoder scratchpad too small!</p>
<p>Decoding error = 1</p>
<p>Unexpected Exeption: 6@10:04000408 - Halting</p>
<p></p>
<p>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.</p>
<p></p>
<p>Here is the code which is interesting for my investigations:</p>
<p>int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size)</p>
<p>{</p>
<p>  unsigned char prop0;</p>
<p>  if (size < LZMA_PROPERTIES_SIZE)</p>
<p>    return LZMA_RESULT_DATA_ERROR;</p>
<p>  prop0 = propsData[0];                //at that point on trying to boot the image the prop0 value is 255</p>
<p>  if (prop0 >= (9 * 5 * 5))</p>
<p>    return LZMA_RESULT_DATA_ERROR;</p>
<p>  {</p>
<p>    for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5));</p>
<p>    for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9);</p>
<p>    propsRes->lc = prop0;</p>
<p>    /*</p>
<p>    unsigned char remainder = (unsigned char)(prop0 / 9);</p>
<p>    propsRes->lc = prop0 % 9;</p>
<p>    propsRes->pb = remainder / 5;</p>
<p>    propsRes->lp = remainder % 5;</p>
<p>    */</p>
<p>  }</p>
<p>  return LZMA_RESULT_OK;</p>
<p>}</p>
<p></p>
<p>Has anyone of you an idea why the lzma decompression fails, or what could be done against that? </p>
<p>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. </p>
<p></p>
<p>Kind regards,</p>
<p>Harald Gutmann</p>
</body></html>