Re: [PATCH 04/11] ARM: i.MX8MQ: Add a macro to load BL31 ATF blob

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 29, 2018 at 08:48:53PM -0700, Andrey Smirnov wrote:
> Add a macro containing all of the code needed to load and transfer
> control to BL31 ATF blob on i.MX8M.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
> ---
>  arch/arm/mach-imx/include/mach/atf.h | 63 ++++++++++++++++++++++++++++
>  1 file changed, 63 insertions(+)
>  create mode 100644 arch/arm/mach-imx/include/mach/atf.h
> 
> diff --git a/arch/arm/mach-imx/include/mach/atf.h b/arch/arm/mach-imx/include/mach/atf.h
> new file mode 100644
> index 000000000..0b5018459
> --- /dev/null
> +++ b/arch/arm/mach-imx/include/mach/atf.h
> @@ -0,0 +1,63 @@
> +#ifndef __IMX_ATF_H__
> +#define __IMX_ATF_H__
> +
> +#include <asm/system.h>
> +
> +#define MX8MQ_ATF_BL31_SIZE_LIMIT	SZ_64K
> +#define MX8MQ_ATF_BL31_BASE_ADDR	0x00910000
> +#define MX8MQ_ATF_BL33_BASE_ADDR	0x40200000
> +
> +/**
> + * imx8mq_atf_load_bl31 - Load ATF BL31 blob and transfer contol to it
> + *
> + * @name:	Name of the BL31 blob
> + *
> + * This macro:
> +
> + *     1. Copies built-in BL31 blob to an address i.MX8M's BL31
> + *        expects to be placed
> + *
> + *     2. Sets up temporary stack pointer for EL2, which is execution
> + *        level that BL31 will drop us off at after it completes its
> + *        initialization routine
> + *
> + *     3. Transfers control to BL31
> + *
> + * NOTE: This has to be a macro in order delay the expansion of
> + * get_builtin_firmware(), otherwise it'll incorrectly interpret
> + * "name" literally

You show a good reason why we should add the firmware name strings
to the image along with a function that iterates over them. How
to add the firmware name strings is already provided in the Kernels
firmware/Makefile.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux