diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-03-10 18:09:48 -0800 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-03-30 10:09:41 +0200 |
commit | f0d5faf6f5ce11423bb26ee905ca22522cb62366 (patch) | |
tree | 123cdf42a622a168cdd1ff057f0e138e0956e58c /arch/arm/cpu/armv7/mx7 | |
parent | 0c62005b96efc9517ba450c4e788e5d4623fb6f5 (diff) |
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 <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'arch/arm/cpu/armv7/mx7')
-rw-r--r-- | arch/arm/cpu/armv7/mx7/soc.c | 15 |
1 files changed, 15 insertions, 0 deletions
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 |