Patchwork [U-Boot,RFC,19/22] sandbox: image: Adjust FIT image printing to work with sandbox

login
register
mail settings
Submitter Simon Glass
Date Jan. 10, 2013, 2:58 p.m.
Message ID <1357829905-6579-20-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/211045/
State RFC
Headers show

Comments

Simon Glass - Jan. 10, 2013, 2:58 p.m.
Use map_sysmem() to convert from address to pointer, so that sandbox can
print FIT information without crashing.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 common/image-fit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/common/image-fit.c b/common/image-fit.c
index ef21112..9f3ece2 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -373,7 +373,7 @@  void fit_image_print(const void *fit, int image_noffset, const char *p)
 	if (ret)
 		printf("unavailable\n");
 	else
-		printf("0x%08lx\n", (ulong)data);
+		printf("0x%08lx\n", (ulong)map_to_sysmem((char *)data));
 #endif
 
 	printf("%s  Data Size:    ", p);