All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajesh Bhagat <rajesh.bhagat@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 08/27] armv8: layerscape: Add TFABOOT support
Date: Sat, 27 Oct 2018 13:15:30 +0000	[thread overview]
Message-ID: <20181027131428.5246-9-rajesh.bhagat@nxp.com> (raw)
In-Reply-To: <20181027131428.5246-1-rajesh.bhagat@nxp.com>

Adds TFABOOT support config option and add generic code to enable
execution from DDR.

Signed-off-by: York Sun <york.sun@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
---
Change in v5: None
Change in v4: None
Change in v3:
 - Seperated TFABOOT generic code
 - Moved before dependency patches

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 7 +++++++
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c   | 9 ++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index f2111fadc0..9092757d1f 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -514,3 +514,10 @@ config HAS_FSL_XHCI_USB
 	help
 	  For some SoC(such as LS1043A and LS1046A), USB and QE-HDLC multiplex use
 	  pins, select it when the pins are assigned to USB.
+
+config TFABOOT
+       bool "Support for booting from TFA"
+       default n
+       help
+         Enabling this will make a U-Boot binary that is capable of being
+         booted via TFA.
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 6304825180..3e084eddfa 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -88,7 +88,8 @@ static struct mm_region early_map[] = {
 #endif
 	{ CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1,
 	  CONFIG_SYS_FSL_DRAM_SIZE1,
-#if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_TFABOOT) || \
+	(defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD))
 	  PTE_BLOCK_MEMTYPE(MT_NORMAL) |
 #else	/* Start with nGnRnE and PXN and UXN to prevent speculative access */
 	  PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
@@ -139,7 +140,8 @@ static struct mm_region early_map[] = {
 #endif
 	{ CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1,
 	  CONFIG_SYS_FSL_DRAM_SIZE1,
-#if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_TFABOOT) || \
+	(defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD))
 	  PTE_BLOCK_MEMTYPE(MT_NORMAL) |
 #else	/* Start with nGnRnE and PXN and UXN to prevent speculative access */
 	  PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
@@ -1236,7 +1238,8 @@ void update_early_mmu_table(void)
 __weak int dram_init(void)
 {
 	fsl_initdram();
-#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
+#if (!defined(CONFIG_SPL) && !defined(CONFIG_TFABOOT)) || \
+	defined(CONFIG_SPL_BUILD)
 	/* This will break-before-make MMU for DDR */
 	update_early_mmu_table();
 #endif
-- 
2.17.1

  parent reply	other threads:[~2018-10-27 13:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-27 13:15 [U-Boot] [PATCH v5 00/27] TF-A Boot support for NXP Chassis 2 platforms Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 01/27] move data structure out of cpu.h Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 02/27] env: allow flash and nand env driver to compile together Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 03/27] env: sf: define API to override sf environment address Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 04/27] driver/ifc: replace __ilog2 with LOG2 macro Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 05/27] armv8: layerscape: Enable routing SError exception Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 06/27] armv8: fsl-layerscape: change tlb base from OCRAM to DDR in EL < 3 Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 07/27] drivers: ifc: dynamic chipselect mapping support Rajesh Bhagat
2018-10-27 13:15 ` Rajesh Bhagat [this message]
2018-10-27 13:15 ` [U-Boot] [PATCH v5 09/27] armv8: fsl-layerscape: identify boot source from PORSR register Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 10/27] armv8: layerscape: remove EL3 specific erratas for TFABOOT Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 11/27] armv8: fsl-layerscape: bootcmd identification " Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 12/27] armv8: layerscape: add SMC calls for DDR size and bank info Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 13/27] armv8: layerscape: skip OCRAM init for TFABOOT Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 14/27] armv8: fsl-layerscape: Update parsing boot source Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 15/27] armv8: sec_firmware: change el2_to_aarch32 SMC ID Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 16/27] armv8: sec_firmware: return job ring status as true in TFABOOT Rajesh Bhagat
2018-10-27 13:15 ` [U-Boot] [PATCH v5 17/27] net: fm: add TFABOOT support Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 18/27] drivers: qe: " Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 19/27] armv8: fsl-layerscape: add support of MC framework for TFA Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 20/27] armv8: ls1046ardb: Add TFABOOT support Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 21/27] armv8: ls1046aqds: " Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 22/27] armv8: ls1043ardb: " Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 23/27] armv8: ls1043aqds: " Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 24/27] armv8: ls1012ardb: " Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 25/27] armv8: ls1012aqds: fix secure boot compilation Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 26/27] armv8: ls1012aqds: Add TFABOOT support Rajesh Bhagat
2018-10-27 13:16 ` [U-Boot] [PATCH v5 27/27] armv8: ls1012afrx: " Rajesh Bhagat

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=20181027131428.5246-9-rajesh.bhagat@nxp.com \
    --to=rajesh.bhagat@nxp.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.