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 9/9] ARM: uncompress.c: Add some debugging messages
Date: Tue,  9 Dec 2014 19:17:44 +0100	[thread overview]
Message-ID: <1418149064-26448-10-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1418149064-26448-1-git-send-email-s.hauer@pengutronix.de>

Now that we have printf support in the PBL we can use it right
after setup_c(). Add some debug messages to the early PBL code
to make it more clear what is happening there.

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

diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c
index d64706d..03c73d5 100644
--- a/arch/arm/cpu/uncompress.c
+++ b/arch/arm/cpu/uncompress.c
@@ -17,6 +17,7 @@
  * GNU General Public License for more details.
  *
  */
+#define pr_fmt(fmt) "uncompress.c: " fmt
 
 #include <common.h>
 #include <init.h>
@@ -76,9 +77,12 @@ static void __noreturn noinline uncompress_start_payload(unsigned long membase,
 
 	setup_c();
 
+	pr_debug("memory at 0x%08lx, size 0x%08lx\n", membase, memsize);
+
 	if (IS_ENABLED(CONFIG_MMU_EARLY)) {
 		endmem &= ~0x3fff;
 		endmem -= SZ_16K; /* ttb */
+		pr_debug("enabling MMU, ttb @ 0x%08x\n", endmem);
 		mmu_early_enable(membase, memsize, endmem);
 	}
 
@@ -93,6 +97,9 @@ static void __noreturn noinline uncompress_start_payload(unsigned long membase,
 	pg_start = image_end + 1;
 	pg_len = *(image_end);
 
+	pr_debug("uncompressing barebox binary at 0x%p (size 0x%08x) to 0x%08lx\n",
+			pg_start, pg_len, barebox_base);
+
 	pbl_barebox_uncompress((void*)barebox_base, pg_start, pg_len);
 
 	arm_early_mmu_cache_flush();
@@ -103,6 +110,8 @@ static void __noreturn noinline uncompress_start_payload(unsigned long membase,
 	else
 		barebox = (void *)barebox_base;
 
+	pr_debug("jumping to uncompressed image at 0x%p\n", barebox);
+
 	barebox(membase, memsize, boarddata);
 }
 
-- 
2.1.3


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

      parent reply	other threads:[~2014-12-09 18:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 18:17 PBL console support Sascha Hauer
2014-12-09 18:17 ` [PATCH 1/9] PBL: Add strnlen, needed for printf support Sascha Hauer
2014-12-09 18:17 ` [PATCH 2/9] printf: move panic() to common/misc.c Sascha Hauer
2014-12-09 18:17 ` [PATCH 3/9] printf: move simple_strto*() functions to separate file Sascha Hauer
2014-12-09 18:17 ` [PATCH 4/9] printf: use local isdigit/isalnum implementation Sascha Hauer
2014-12-09 18:17 ` [PATCH 5/9] Add PBL console support Sascha Hauer
2014-12-09 18:17 ` [PATCH 6/9] malloc: Add a function to detect if malloc pool is already initialized Sascha Hauer
2014-12-09 18:17 ` [PATCH 7/9] console: Make sure xzalloc is only used when it's available Sascha Hauer
2014-12-09 18:17 ` [PATCH 8/9] ARM: start.c: Add some debugging messages Sascha Hauer
2014-12-09 18:17 ` Sascha Hauer [this message]

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=1418149064-26448-10-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