[U-Boot] [PATCH 1/1] sandbox: fix phys_to_virt()
Heinrich Schuchardt
xypron.glpk at gmx.de
Wed Sep 26 05:12:05 UTC 2018
Allow for pointers not created by map_to_sysmem().
This fixes the fit image and vboot test.
Fixes: 8b79c294ec57 ("sandbox: Enhance map_to_sysmem() to handle foreign
pointers")
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
Alex, this should fix the issues with the efi-next pull request. Would
you add it to your queue?
https://travis-ci.org/xypron2/u-boot/builds/433278595
---
arch/sandbox/cpu/cpu.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 6098945049..4e28d06e43 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -111,12 +111,8 @@ void *phys_to_virt(phys_addr_t paddr)
}
}
- printf("%s: Cannot map sandbox address %lx (SDRAM from 0 to %lx)\n",
- __func__, (ulong)paddr, (ulong)gd->ram_size);
- os_abort();
-
- /* Not reached */
- return NULL;
+ /* Allow for pointers not created by map_to_sysmem() */
+ return (void *)(gd->arch.ram_buf + paddr);
}
struct sandbox_mapmem_entry *find_tag(const void *ptr)
--
2.19.0
More information about the U-Boot
mailing list