sandbox: image: Adjust FIT image printing to work with sandbox
authorSimon Glass <sjg@chromium.org>
Thu, 16 May 2013 13:53:26 +0000 (13:53 +0000)
committerTom Rini <trini@ti.com>
Tue, 4 Jun 2013 20:06:31 +0000 (16:06 -0400)
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

index 589f53dbb5256f58a4b55d30b0d807ac66a8e1b7..7bf82d33cf7bce134b13613a445a5311e2988031 100644 (file)
@@ -351,10 +351,13 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
 
 #ifndef USE_HOSTCC
        printf("%s  Data Start:   ", p);
-       if (ret)
+       if (ret) {
                printf("unavailable\n");
-       else
-               printf("0x%08lx\n", (ulong)data);
+       } else {
+               void *vdata = (void *)data;
+
+               printf("0x%08lx\n", (ulong)map_to_sysmem(vdata));
+       }
 #endif
 
        printf("%s  Data Size:    ", p);