mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2] ARM: i.MX8MP: adapt atf bl31 base addr
@ 2022-07-04 14:27 Marco Felsch
  2022-07-04 14:55 ` Lucas Stach
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Felsch @ 2022-07-04 14:27 UTC (permalink / raw)
  To: barebox

The usptream TF-A was shifting around the base address from version to
version. But finally with upstream TF-A v2.7 it is correctly set to
0x970000. This change was done since the first official silicon has an
SRAM size of 576KB where as the tapeout version A1 (pre-silicion) had
only 512KB.

The upstream TF-A has adapt it in verion v2.5 so the BL31 blob is at the
end of the SRAM. Unfortunately they had (accidental) reverted back to
0x960000 in v2.6. They noticed that and changed (again) back to 0x970000.
with v2.7.

This commit also adapts the documentation for the i.MX8MP-EVK to
reference the upstream TF-A. The new warning should point out that we
strongly recommended to use versions from v2.7 onwards, due to the
version mess explained above.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Changelog:

v2:
- fix commit message ger/eng mixup and mention tapeout version A1

 Documentation/boards/imx/nxp-imx8mp-evk.rst | 11 +++++++----
 arch/arm/mach-imx/include/mach/atf.h        |  2 +-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Documentation/boards/imx/nxp-imx8mp-evk.rst b/Documentation/boards/imx/nxp-imx8mp-evk.rst
index 366c1de500..1074992f2f 100644
--- a/Documentation/boards/imx/nxp-imx8mp-evk.rst
+++ b/Documentation/boards/imx/nxp-imx8mp-evk.rst
@@ -40,15 +40,18 @@ As a last step of this process those files need to be placed in
 	      firmware/${f}; \
   done
 
-Get and Build the ARM Trusted firmware
---------------------------------------
+Get and Build the Trusted Firmware A
+------------------------------------
 
-Get ATF from https://source.codeaurora.org/external/imx/imx-atf, branch
-imx_5.4.3_2.0.0::
+Get TF-A from https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ and
+checkout version v2.7::
 
   make PLAT=imx8mp bl31
   cp build/imx8mp/release/bl31.bin ${barebox_srctree}/imx8mp-bl31.bin
 
+.. warning:: It is important to use a version >= v2.7 else your system
+   might not boot.
+
 Build Barebox
 -------------
 
diff --git a/arch/arm/mach-imx/include/mach/atf.h b/arch/arm/mach-imx/include/mach/atf.h
index 09396f4646..bc400ddbad 100644
--- a/arch/arm/mach-imx/include/mach/atf.h
+++ b/arch/arm/mach-imx/include/mach/atf.h
@@ -10,7 +10,7 @@
 
 #define MX8MM_ATF_BL31_BASE_ADDR	0x00920000
 #define MX8MN_ATF_BL31_BASE_ADDR	0x00960000
-#define MX8MP_ATF_BL31_BASE_ADDR	0x00960000
+#define MX8MP_ATF_BL31_BASE_ADDR	0x00970000
 #define MX8MQ_ATF_BL31_BASE_ADDR	0x00910000
 #define MX8M_ATF_BL33_BASE_ADDR		0x40200000
 #define MX8MM_ATF_BL33_BASE_ADDR	MX8M_ATF_BL33_BASE_ADDR
-- 
2.30.2




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ARM: i.MX8MP: adapt atf bl31 base addr
  2022-07-04 14:27 [PATCH v2] ARM: i.MX8MP: adapt atf bl31 base addr Marco Felsch
@ 2022-07-04 14:55 ` Lucas Stach
  2022-07-04 15:01   ` Marco Felsch
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2022-07-04 14:55 UTC (permalink / raw)
  To: Marco Felsch, barebox

Am Montag, dem 04.07.2022 um 16:27 +0200 schrieb Marco Felsch:
> The usptream TF-A was shifting around the base address from version to
> version. But finally with upstream TF-A v2.7 it is correctly set to
> 0x970000. This change was done since the first official silicon has an
> SRAM size of 576KB where as the tapeout version A1 (pre-silicion) had
> only 512KB.

Now this doesn't match the commit message in the TF-A, which claims
that tapeout A0 (pre-release silicon) had 512K SRAM, while it was
extended to 576KB in the A1 tapeout, which is the current mass produced
version.

> 
> The upstream TF-A has adapt it in verion v2.5 so the BL31 blob is at the
                        ^ adapted   ^version
> end of the SRAM. Unfortunately they had (accidental) reverted back to

Who is they? "Unfortunately it was reverted back..."
> 0x960000 in v2.6. They noticed that and changed (again) back to 0x970000.
> with v2.7.
> 
> This commit also adapts the documentation for the i.MX8MP-EVK to
> reference the upstream TF-A. The new warning should point out that we
> strongly recommended to use versions from v2.7 onwards, due to the
           ^ recommend
> version mess explained above.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> Changelog:
> 
> v2:
> - fix commit message ger/eng mixup and mention tapeout version A1
> 
>  Documentation/boards/imx/nxp-imx8mp-evk.rst | 11 +++++++----
>  arch/arm/mach-imx/include/mach/atf.h        |  2 +-
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/boards/imx/nxp-imx8mp-evk.rst b/Documentation/boards/imx/nxp-imx8mp-evk.rst
> index 366c1de500..1074992f2f 100644
> --- a/Documentation/boards/imx/nxp-imx8mp-evk.rst
> +++ b/Documentation/boards/imx/nxp-imx8mp-evk.rst
> @@ -40,15 +40,18 @@ As a last step of this process those files need to be placed in
>  	      firmware/${f}; \
>    done
>  
> -Get and Build the ARM Trusted firmware
> ---------------------------------------
> +Get and Build the Trusted Firmware A
> +------------------------------------
>  
> -Get ATF from https://source.codeaurora.org/external/imx/imx-atf, branch
> -imx_5.4.3_2.0.0::
> +Get TF-A from https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ and
> +checkout version v2.7::
>  
>    make PLAT=imx8mp bl31
>    cp build/imx8mp/release/bl31.bin ${barebox_srctree}/imx8mp-bl31.bin
>  
> +.. warning:: It is important to use a version >= v2.7 else your system
> +   might not boot.

This doesn't tell anyone what's going on, I think we can bother the
reader with the details: "It is important to use a version >= v2.7, as
Barebox expects the BL31 SRAM load address used from this release
onwards."

> +
>  Build Barebox
>  -------------
>  
> diff --git a/arch/arm/mach-imx/include/mach/atf.h b/arch/arm/mach-imx/include/mach/atf.h
> index 09396f4646..bc400ddbad 100644
> --- a/arch/arm/mach-imx/include/mach/atf.h
> +++ b/arch/arm/mach-imx/include/mach/atf.h
> @@ -10,7 +10,7 @@
>  
>  #define MX8MM_ATF_BL31_BASE_ADDR	0x00920000
>  #define MX8MN_ATF_BL31_BASE_ADDR	0x00960000
> -#define MX8MP_ATF_BL31_BASE_ADDR	0x00960000
> +#define MX8MP_ATF_BL31_BASE_ADDR	0x00970000
>  #define MX8MQ_ATF_BL31_BASE_ADDR	0x00910000
>  #define MX8M_ATF_BL33_BASE_ADDR		0x40200000
>  #define MX8MM_ATF_BL33_BASE_ADDR	MX8M_ATF_BL33_BASE_ADDR





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ARM: i.MX8MP: adapt atf bl31 base addr
  2022-07-04 14:55 ` Lucas Stach
@ 2022-07-04 15:01   ` Marco Felsch
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Felsch @ 2022-07-04 15:01 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On 22-07-04, Lucas Stach wrote:
> Am Montag, dem 04.07.2022 um 16:27 +0200 schrieb Marco Felsch:
> > The usptream TF-A was shifting around the base address from version to
> > version. But finally with upstream TF-A v2.7 it is correctly set to
> > 0x970000. This change was done since the first official silicon has an
> > SRAM size of 576KB where as the tapeout version A1 (pre-silicion) had
> > only 512KB.
> 
> Now this doesn't match the commit message in the TF-A, which claims
> that tapeout A0 (pre-release silicon) had 512K SRAM, while it was
> extended to 576KB in the A1 tapeout, which is the current mass produced
> version.

Arg.. sry. I got your prev. comment wrong. Should have checked the tf-a
log twice. Sorry for the noise.

> > 
> > The upstream TF-A has adapt it in verion v2.5 so the BL31 blob is at the
>                         ^ adapted   ^version
> > end of the SRAM. Unfortunately they had (accidental) reverted back to
> 
> Who is they? "Unfortunately it was reverted back..."

The TF-A developers which are by name:

 - Ying-Chun Liu (PaulLiu)
 - Peng Fan
 - Jacky Bai

But yes, I will drop they.

> > 0x960000 in v2.6. They noticed that and changed (again) back to 0x970000.
> > with v2.7.
> > 
> > This commit also adapts the documentation for the i.MX8MP-EVK to
> > reference the upstream TF-A. The new warning should point out that we
> > strongly recommended to use versions from v2.7 onwards, due to the
>            ^ recommend

Yes.

> > version mess explained above.
> > 
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > ---
> > Changelog:
> > 
> > v2:
> > - fix commit message ger/eng mixup and mention tapeout version A1
> > 
> >  Documentation/boards/imx/nxp-imx8mp-evk.rst | 11 +++++++----
> >  arch/arm/mach-imx/include/mach/atf.h        |  2 +-
> >  2 files changed, 8 insertions(+), 5 deletions(-)
> > 
> > diff --git a/Documentation/boards/imx/nxp-imx8mp-evk.rst b/Documentation/boards/imx/nxp-imx8mp-evk.rst
> > index 366c1de500..1074992f2f 100644
> > --- a/Documentation/boards/imx/nxp-imx8mp-evk.rst
> > +++ b/Documentation/boards/imx/nxp-imx8mp-evk.rst
> > @@ -40,15 +40,18 @@ As a last step of this process those files need to be placed in
> >  	      firmware/${f}; \
> >    done
> >  
> > -Get and Build the ARM Trusted firmware
> > ---------------------------------------
> > +Get and Build the Trusted Firmware A
> > +------------------------------------
> >  
> > -Get ATF from https://source.codeaurora.org/external/imx/imx-atf, branch
> > -imx_5.4.3_2.0.0::
> > +Get TF-A from https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ and
> > +checkout version v2.7::
> >  
> >    make PLAT=imx8mp bl31
> >    cp build/imx8mp/release/bl31.bin ${barebox_srctree}/imx8mp-bl31.bin
> >  
> > +.. warning:: It is important to use a version >= v2.7 else your system
> > +   might not boot.
> 
> This doesn't tell anyone what's going on, I think we can bother the
> reader with the details: "It is important to use a version >= v2.7, as
> Barebox expects the BL31 SRAM load address used from this release
> onwards."
> 
> > +
> >  Build Barebox
> >  -------------
> >  
> > diff --git a/arch/arm/mach-imx/include/mach/atf.h b/arch/arm/mach-imx/include/mach/atf.h
> > index 09396f4646..bc400ddbad 100644
> > --- a/arch/arm/mach-imx/include/mach/atf.h
> > +++ b/arch/arm/mach-imx/include/mach/atf.h
> > @@ -10,7 +10,7 @@
> >  
> >  #define MX8MM_ATF_BL31_BASE_ADDR	0x00920000
> >  #define MX8MN_ATF_BL31_BASE_ADDR	0x00960000
> > -#define MX8MP_ATF_BL31_BASE_ADDR	0x00960000
> > +#define MX8MP_ATF_BL31_BASE_ADDR	0x00970000
> >  #define MX8MQ_ATF_BL31_BASE_ADDR	0x00910000
> >  #define MX8M_ATF_BL33_BASE_ADDR		0x40200000
> >  #define MX8MM_ATF_BL33_BASE_ADDR	MX8M_ATF_BL33_BASE_ADDR
> 
> 
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-04 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 14:27 [PATCH v2] ARM: i.MX8MP: adapt atf bl31 base addr Marco Felsch
2022-07-04 14:55 ` Lucas Stach
2022-07-04 15:01   ` Marco Felsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox