mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 04/11] ARM: i.MX8MQ: Add a macro to load BL31 ATF blob
Date: Tue, 3 Jul 2018 10:58:21 -0700	[thread overview]
Message-ID: <CAHQ1cqG-A7K-pfh9rEcgfKXLaH_JxSBF3Cshtnj621dwE1jhFw@mail.gmail.com> (raw)
In-Reply-To: <20180702062502.7hxe7gkev5jhjm3n@pengutronix.de>

On Sun, Jul 1, 2018 at 11:25 PM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> 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@gmail.com>
> > ---
> >  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.
>

OK, makes sense. I'll work on adding that feature as a part of v2.

Thanks,
Andrey Smirnov

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

  reply	other threads:[~2018-07-03 17:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30  3:48 [PATCH 00/11] ARM: i.MX8MQ and EVK support, part II Andrey Smirnov
2018-06-30  3:48 ` [PATCH 01/11] ARM: nxp-imx8mq-evk: Update DDR initialization code Andrey Smirnov
2018-06-30  3:48 ` [PATCH 02/11] ARM: Add code to support SMCCC on AArch64 Andrey Smirnov
2018-07-02  6:26   ` Sascha Hauer
2018-07-03 17:44     ` Andrey Smirnov
2018-06-30  3:48 ` [PATCH 03/11] ARM: i.MX8MQ: Configure cntfrq only in EL3 Andrey Smirnov
2018-06-30  3:48 ` [PATCH 04/11] ARM: i.MX8MQ: Add a macro to load BL31 ATF blob Andrey Smirnov
2018-07-02  6:25   ` Sascha Hauer
2018-07-03 17:58     ` Andrey Smirnov [this message]
2018-07-19 23:01       ` Andrey Smirnov
2018-06-30  3:48 ` [PATCH 05/11] ARM: i.MX: xload-esdhc: Move image base to MX8MQ_ATF_BL33_BASE_ADDR Andrey Smirnov
2018-06-30  3:48 ` [PATCH 06/11] ARM: i.MX: xload-esdhc: Allow patching first word of the image Andrey Smirnov
2018-07-02  6:20   ` Sascha Hauer
2018-07-03 18:12     ` Andrey Smirnov
2018-06-30  3:48 ` [PATCH 07/11] ARM: i.MX: fimware: Add pre-built BL31 ATF blob Andrey Smirnov
2018-07-02  5:23   ` Sascha Hauer
2018-07-03 17:59     ` Andrey Smirnov
2018-06-30  3:48 ` [PATCH 08/11] ARM: nxp-imx8mq-evk: Add code to load ATF BL31 blob Andrey Smirnov
2018-06-30  3:48 ` [PATCH 09/11] ARM: i.MX8MQ: Query and display ATF fimware hash if availible Andrey Smirnov
2018-06-30  3:48 ` [PATCH 10/11] ARM: nxp-imx8mq-evk: Add bootflow comments Andrey Smirnov
2018-07-02  5:48   ` Sascha Hauer
2018-07-03 18:00     ` Andrey Smirnov
2018-06-30  3:49 ` [PATCH 11/11] firmware: Fix copy-paste comment mistake Andrey Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHQ1cqG-A7K-pfh9rEcgfKXLaH_JxSBF3Cshtnj621dwE1jhFw@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox