From f0d5faf6f5ce11423bb26ee905ca22522cb62366 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 10 Mar 2017 18:09:48 -0800 Subject: imx: imx-common: add elf firmware support Support elf firmware files for the auxiliary Cortex-M4 core. This has the advantage that the user does not need to know to which address the binary has been linked to. However, in order to load the elf sections to the right address, we need to translate the Cortex-M4 core memory addresses to primary/host CPU memory addresses (U-Boot is typically running on the A7/A9 core). This allows to boot firmwares from any location with just using bootaux, e.g.: tftp ${loadaddr} low_power_demo.elf && bootaux ${loadaddr} Signed-off-by: Stefan Agner Acked-by: Marcel Ziswiler --- arch/arm/cpu/armv7/mx7/soc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/arm/cpu/armv7/mx7') diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c index 35591562ff..90a753910b 100644 --- a/arch/arm/cpu/armv7/mx7/soc.c +++ b/arch/arm/cpu/armv7/mx7/soc.c @@ -308,6 +308,21 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac) #endif #ifdef CONFIG_IMX_BOOTAUX +const struct memorymap hostmap[] = { + { .auxcore = 0x00000000, .host = 0x00180000, .size = 0x8000 }, + { .auxcore = 0x00180000, .host = 0x00180000, .size = 0x8000 }, + { .auxcore = 0x1fff8000, .host = 0x007f8000, .size = 0x8000 }, + { .auxcore = 0x20000000, .host = 0x00800000, .size = 0x8000 }, + { .auxcore = 0x00900000, .host = 0x00900000, .size = 0x20000 }, + { .auxcore = 0x20200000, .host = 0x00900000, .size = 0x20000 }, + { .auxcore = 0x00920000, .host = 0x00920000, .size = 0x20000 }, + { .auxcore = 0x20220000, .host = 0x00920000, .size = 0x20000 }, + { .auxcore = 0x00940000, .host = 0x00940000, .size = 0x20000 }, + { .auxcore = 0x20240000, .host = 0x00940000, .size = 0x20000 }, + { .auxcore = 0x10000000, .host = 0x80000000, .size = 0x0fff0000 }, + { .auxcore = 0x80000000, .host = 0x80000000, .size = 0xe0000000 }, + { /* sentinel */ } +}; /* * Per the cortex-M reference manual, the reset vector of M4 needs -- cgit v1.2.3