mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] ARM pbl: Provide a dummy error function for the decompressor
Date: Tue,  2 Oct 2012 15:06:56 +0200	[thread overview]
Message-ID: <1349183217-19639-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1349183217-19639-1-git-send-email-s.hauer@pengutronix.de>

We can't do anything useful in the error function, so we just hang.
This has the advantage that at least when a JTAG debugger is connected
we can see what happens. Otherwise the code just jumps to NULL in case
of an error.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/cpu/start-pbl.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c
index 932a3da..2cd33ce 100644
--- a/arch/arm/cpu/start-pbl.c
+++ b/arch/arm/cpu/start-pbl.c
@@ -113,6 +113,11 @@ static void mmu_disable(void)
 	__mmu_cache_off();
 }
 
+void noinline errorfn(char *error)
+{
+	while (1);
+}
+
 static void barebox_uncompress(void *compressed_start, unsigned int len)
 {
 	void (*barebox)(void);
@@ -135,7 +140,7 @@ static void barebox_uncompress(void *compressed_start, unsigned int len)
 	decompress((void *)compressed_start,
 			len,
 			NULL, NULL,
-			(void *)TEXT_BASE, NULL, NULL);
+			(void *)TEXT_BASE, NULL, errorfn);
 
 	if (use_mmu)
 		mmu_disable();
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-10-02 13:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 13:06 [PATCH] pbl updates Sascha Hauer
2012-10-02 13:06 ` Sascha Hauer [this message]
2012-10-02 13:06 ` [PATCH 2/2] ARM pbl: actually create cached mappings in the decompressor Sascha Hauer
2012-10-02 14:30 ` [PATCH] pbl updates Jean-Christophe PLAGNIOL-VILLARD
2012-10-02 16:50   ` Sascha Hauer
2012-10-02 18:36     ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-03 10:06       ` Sascha Hauer
2012-10-03 11:37         ` Jean-Christophe PLAGNIOL-VILLARD

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=1349183217-19639-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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