[coreboot] Gigabyte M57SLI - 4MB Chip - LAB LZMA Error
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Fri May 23 20:23:11 CEST 2008
On 23.05.2008 20:05, Harald Gutmann wrote:
> Hello,
>
> 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.
> http://phpfi.com/319153
>
> 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:
> http://phpfi.com/319150
>
>
> 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!
>
Try this:
Report actual and wanted LZMA decompression scratchpad size:
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Index: LinuxBIOSv2-stuff/src/lib/lzma.c
===================================================================
--- LinuxBIOSv2-stuff/src/lib/lzma.c (Revision 3348)
+++ LinuxBIOSv2-stuff/src/lib/lzma.c (Arbeitskopie)
@@ -12,6 +12,7 @@
#include "lzmadecode.c"
+#define LZMA_SCRATCHPAD_SIZE 15980
static unsigned long ulzma(unsigned char * src, unsigned char * dst)
{
@@ -22,7 +23,7 @@
int res;
CLzmaDecoderState state;
SizeT mallocneeds;
- unsigned char scratchpad[15980];
+ unsigned char scratchpad[LZMA_SCRATCHPAD_SIZE];
memcpy(properties, src, LZMA_PROPERTIES_SIZE);
outSize = *(UInt32 *)(src + LZMA_PROPERTIES_SIZE);
@@ -30,8 +31,9 @@
printk_warning("Incorrect stream properties\n");
}
mallocneeds = (LzmaGetNumProbs(&state.Properties) * sizeof(CProb));
- if (mallocneeds > 15980) {
- printk_warning("Decoder scratchpad too small!\n");
+ if (mallocneeds > LZMA_SCRATCHPAD_SIZE) {
+ printk_warning("Decoder scratchpad too small, have %i, need %i!\n",
+ LZMA_SCRATCHPAD_SIZE, mallocneeds);
}
state.Probs = (CProb *)scratchpad;
res = LzmaDecode(&state, src + LZMA_PROPERTIES_SIZE + 8, (SizeT)0xffffffff, &inProcessed,
More information about the coreboot
mailing list