U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: u-boot@lists.denx.de
Subject: [PATCH 6/8] armv8: layerscape: don't initialize GIC in SPL
Date: Mon, 16 Nov 2020 22:47:29 +0100	[thread overview]
Message-ID: <20201116214731.29128-7-michael@walle.cc> (raw)
In-Reply-To: <20201116214731.29128-1-michael@walle.cc>

The BL31 expects the GIC to be uninitialized. Thus, if we are loading
the BL31 by the SPL we must not initialize it. If u-boot is loaded by
the SPL directly, it will initialize the GIC again (in the same
lowlevel_init()).

This was tested on a custom board with SPL loading the BL31 and jumping
to u-boot as BL33 as well as loading u-boot directly by the SPL. In case
the ATF BL1/BL2 is used, this patch won't change anything, because no
SPL is used at all.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S b/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S
index a519f6ed67..d8803738f1 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S
+++ b/arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S
@@ -192,6 +192,7 @@ ENTRY(lowlevel_init)
 #endif
 
 	/* Initialize GIC Secure Bank Status */
+#if !defined(CONFIG_SPL_BUILD)
 #if defined(CONFIG_GICV2) || defined(CONFIG_GICV3)
 	branch_if_slave x0, 1f
 	bl	get_gic_offset
@@ -205,6 +206,7 @@ ENTRY(lowlevel_init)
 	bl	gic_init_secure_percpu
 #endif
 #endif
+#endif
 
 100:
 	branch_if_master x0, x1, 2f
-- 
2.20.1

  parent reply	other threads:[~2020-11-16 21:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 21:47 [PATCH 0/8] spl: atf: add support for LOAD_IMAGE_V2 Michael Walle
2020-11-16 21:47 ` [PATCH 1/8] treewide: use CONFIG_IS_ENABLED() for ARMV8_SEC_FIRMWARE_SUPPORT Michael Walle
2020-11-18 14:21   ` Michal Simek
2020-11-16 21:47 ` [PATCH 2/8] spl: atf: move storage for bl31_params into function Michael Walle
2020-11-18 14:07   ` Michal Simek
2020-11-16 21:47 ` [PATCH 3/8] spl: atf: provide a bl2_plat_get_bl31_params_default() Michael Walle
2020-11-18 14:23   ` Michal Simek
2020-11-18 14:24     ` Michal Simek
2020-11-16 21:47 ` [PATCH 4/8] spl: atf: remove helper structure from common header Michael Walle
2020-11-18 14:25   ` Michal Simek
2020-11-16 21:47 ` [PATCH 5/8] spl: atf: add support for LOAD_IMAGE_V2 Michael Walle
2020-11-18 14:26   ` Michal Simek
2020-11-16 21:47 ` Michael Walle [this message]
2020-11-16 21:47 ` [PATCH 7/8] board: sl28: add ATF support (bl31) Michael Walle
2020-11-18 14:06   ` Michal Simek
2020-11-18 14:10     ` Michael Walle
2020-11-18 14:15       ` Michal Simek
2020-11-18 14:20         ` Michael Walle
2020-11-18 16:11         ` Michael Walle
2020-11-16 21:47 ` [PATCH 8/8] board: sl28: add OP-TEE Trusted OS support (bl32) Michael Walle

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=20201116214731.29128-7-michael@walle.cc \
    --to=michael@walle.cc \
    --cc=u-boot@lists.denx.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