Am Freitag, 23. Mai 2008 20:23:11 schrieb Carl-Daniel Hailfinger:
Try this: Report actual and wanted LZMA decompression scratchpad size: Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
The patch worked, i had to set the decoder scratchpad size to 50335340, which seems quite much to me, but there was no more error on "Uncompressing to RAM".
Acked-by: Harald Gutmann harald.gutmann@gmx.net To add that also into the coreboot v2 reprository, and not just in v3.
But booting with LAB didn't work, the last lines which i get for now are: "rom_stream: 0xffc00000 - 0xfffe7fff Uncompressing to RAM 0x0100000"
Maybe, as i set the scratchpad size that high, it takes really long to decompress the image to the RAM. I waited about 2 minutes and nothing more happened, i think that should be enaugh time to decompress 4MB into the RAM.
Any idea what is wrong with my image, or what could be done to get debug informations?
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",
} state.Probs = (CProb *)scratchpad; res = LzmaDecode(&state, src + LZMA_PROPERTIES_SIZE + 8,LZMA_SCRATCHPAD_SIZE, mallocneeds);
(SizeT)0xffffffff, &inProcessed,