summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/mach-imx/sys_proto.h
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@toradex.com>2019-11-28 15:56:21 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2019-12-23 10:30:21 +0100
commit694e2136eefc2d110f44b26218c03e44a1e88235 (patch)
tree29dac6daec4e02040793bdb85ee52ae830fd659f /arch/arm/include/asm/mach-imx/sys_proto.h
parentbc138ed0a86f0ca8f870c419955f07f3f21b7dfa (diff)
Currently imx-specific bootaux command doesn't support ELF format firmware for Cortex-M4 core. This patches introduces a PoC implementation of handling elf firmware (load_elf_image_phdr() was copy-pasted from elf.c just for PoC). 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 handle and load the elf sections to the right address, we need to translate the Cortex-M4 core memory addresses to primary/host CPU memory addresses (Cortex A7/A9 cores). This allows to boot firmwares from any location with just using bootaux, e.g.: > tftp ${loadaddr} hello_world.elf && bootaux ${loadaddr} Similar translation table can be found in the Linux remoteproc driver [1]. [1] https://elixir.bootlin.com/linux/latest/source/drivers/remoteproc/imx_rproc.c Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> (submitted upstream https://patchwork.ozlabs.org/patch/1202074/)
Diffstat (limited to 'arch/arm/include/asm/mach-imx/sys_proto.h')
-rw-r--r--arch/arm/include/asm/mach-imx/sys_proto.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h
index 775cd3df40..112161fc37 100644
--- a/arch/arm/include/asm/mach-imx/sys_proto.h
+++ b/arch/arm/include/asm/mach-imx/sys_proto.h
@@ -99,6 +99,13 @@ void gpr_init(void);
#endif /* CONFIG_MX6 */
+/* address translation table */
+struct rproc_att {
+ u32 da; /* device address (From Cortex M4 view) */
+ u32 sa; /* system bus address */
+ u32 size; /* size of reg range */
+};
+
u32 get_nr_cpus(void);
u32 get_cpu_rev(void);
u32 get_cpu_speed_grade_hz(void);