From: Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] u-boot fails to uncompress a "gzip'ed -9" kernel
Date: Tue, 24 Mar 2009 17:37:27 +0100 [thread overview]
Message-ID: <49C90C47.4070909@aimvalley.nl> (raw)
In-Reply-To: <1233067466.32516.19.camel@sid>
Hi Tor,
Did I ever respond to your email, I forgot.
Anyway it's nice to see others have the same problem also.
The root cause of this has been found, did you see this:
It's a CPU memory cache problem (I could have known).
details:
Scott Wood wrote:
> This board currently sets DBAT6 to cover all of the final 256MiB of
> address space; however, not all of this space is covered by a device. In
> particular, flash sits at 0xfe000000-0xfe7fffff, and nothing is mapped
> at the far end of the address space.
>
> In zlib, there is a loop that references p[-1] if p is non-NULL. Under
> some circumstances, this leads to the CPU speculatively loading from
> 0xfffffff8 if p is NULL. This leads to a machine check.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> Note that there are likely other board with the same issue.
>
> include/configs/MPC8313ERDB.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
> index 0ef4eba..21aedee 100644
> --- a/include/configs/MPC8313ERDB.h
> +++ b/include/configs/MPC8313ERDB.h
> @@ -544,7 +544,7 @@
> #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP)
>
> /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */
> -#define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10)
> +#define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_GUARDEDSTORAGE)
> #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
>
> #define CONFIG_SYS_IBAT7L (0)
Tor Krill wrote:
> Hi Norbert,
>
> I missed the start of this thread. So my apologies if im barking up the
> wrong tree :)
>
> We had problems uncompressing zImages on our 8313 board. But always
> suspected some memory timing issues, or perhaps some strangeness in
> 8313.
>
> I tracked our problems down to a specific line in lib_generic/zlib.c And
> by adding a small delay there our problems went away. (I know this is
> not good practice. But with time limited that is what you do.)
>
> Inlined (Pasted) is our patch that solved our problem:
>
> ----8<-------------------------------------------------------------
> --- [74f22482c362bbc50f1188bd5d31203e7995a9b4] zlib.c
> +++ [88e71e289d0241baaa9db0624b98f00b5f1774b5] zlib.c
> @@ -1604,6 +1604,7 @@
> while (p != Z_NULL)
> {
> q = (--p)->next;
> + udelay(10);
> ZFREE(z, p, p->word.Nalloc * sizeof(inflate_huft));
> p = q;
> }
> ----8<-------------------------------------------------------------
>
>
> /Tor
>
> On Tue, 2009-01-27 at 11:05 +0100, Norbert van Bolhuis wrote:
>> This is a MPC8313E-RDB board problem. We have 2 REV A4 boards.
>>
>> I can reproduce this problem on both of the MPC8313E-RDB boards
>> with any version of u-boot with a compressed file which contains
>> 1 or more dynamic codes blocks and a final fixed codes block.
>>
>> I have a 5k gzipped file for which the problem (already) occurs.
>>
>> I could test on a PQ2FADS board. The problem doesn't occur on this
>> board.
>>
>> I did some memory tests (which I should've done a bit earlier) and
>> the same problem (soft reset due to checkstop) occurs.
>>
>> I'll make a new thread for this.
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
>
next prev parent reply other threads:[~2009-03-24 16:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 11:55 [U-Boot] u-boot fails to uncompress a "gzip'ed -9" kernel N. van Bolhuis
2009-01-19 13:07 ` Wolfgang Denk
2009-01-19 13:59 ` N. van Bolhuis
2009-01-27 10:05 ` Norbert van Bolhuis
2009-01-27 13:33 ` [U-Boot] Nasty gunzip problem on MPC8313E-RDB Norbert van Bolhuis
2009-01-27 14:44 ` [U-Boot] u-boot fails to uncompress a "gzip'ed -9" kernel Tor Krill
2009-03-24 16:37 ` Norbert van Bolhuis [this message]
2009-09-30 8:21 ` [U-Boot] gunzip fails sometimes on MPC8343 André Schwarz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49C90C47.4070909@aimvalley.nl \
--to=nvbolhuis@aimvalley.nl \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox