All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig
@ 2017-01-16  9:31 Zhiqiang Hou
  2017-01-16  9:31 ` [U-Boot] [PATCHv2 2/4] ARMv8/sec_firmware: relocated and renamed the config FSL_PPA_ARMV8_PSCI Zhiqiang Hou
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Zhiqiang Hou @ 2017-01-16  9:31 UTC (permalink / raw)
  To: u-boot

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
V2:
 - Generate the patch base on the latest code.

 arch/arm/cpu/armv8/Kconfig            | 33 +++++++++++++++++++++++++++++++++
 arch/arm/cpu/armv8/Makefile           |  2 +-
 arch/arm/cpu/armv8/sec_firmware_asm.S |  4 ++--
 include/configs/ls1043ardb.h          |  3 ---
 include/configs/ls1046ardb.h          |  4 ----
 5 files changed, 36 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
index 22dce88..2ee5782 100644
--- a/arch/arm/cpu/armv8/Kconfig
+++ b/arch/arm/cpu/armv8/Kconfig
@@ -21,6 +21,39 @@ config ARMV8_SPIN_TABLE
 	    - Reserve the code for the spin-table and the release address
 	      via a /memreserve/ region in the Device Tree.
 
+menu "ARMv8 secure monitor firmware"
+config ARMV8_SEC_FIRMWARE_SUPPORT
+	bool "Enable ARMv8 secure monitor firmware framework support"
+	select OF_LIBFDT
+	select FIT
+	help
+	  This framework is aimed at making secure monitor firmware load
+	  process brief.
+	  Note: Only FIT format image is supported.
+	  You should prepare and provide the below information:
+	    - Address of secure firmware.
+	    - Address to hold the return address from secure firmware.
+	    - Secure firmware FIT image related information.
+	      Such as: SEC_FIRMWARE_FIT_IMAGE and SEC_FIRMEWARE_FIT_CNF_NAME
+	    - The target exception level that secure monitor firmware will
+	      return to.
+
+config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
+	bool "Enable ARMv8 secure monitor firmware framework support for SPL"
+	select SPL_OF_LIBFDT
+	select SPL_FIT
+	help
+	  Say Y here to support this framework in SPL phase.
+
+config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
+	bool "ARMv8 secure monitor firmware ERET address byteorder swap"
+	depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
+	help
+	  Say Y here when the endianness of the register or memory holding the
+	  Secure firmware exception return address is different with core's.
+
+endmenu
+
 config PSCI_RESET
 	bool "Use PSCI for reset and shutdown"
 	default y
diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
index 28ba786..1f1de4a 100644
--- a/arch/arm/cpu/armv8/Makefile
+++ b/arch/arm/cpu/armv8/Makefile
@@ -19,7 +19,7 @@ obj-y	+= cpu-dt.o
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_ARMV8_SPIN_TABLE) += spin_table.o spin_table_v8.o
 endif
-obj-$(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) += sec_firmware.o sec_firmware_asm.o
+obj-$(CONFIG_$(SPL_)ARMV8_SEC_FIRMWARE_SUPPORT) += sec_firmware.o sec_firmware_asm.o
 
 obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/
 obj-$(CONFIG_S32V234) += s32v234/
diff --git a/arch/arm/cpu/armv8/sec_firmware_asm.S b/arch/arm/cpu/armv8/sec_firmware_asm.S
index 903195d..6bae15d 100644
--- a/arch/arm/cpu/armv8/sec_firmware_asm.S
+++ b/arch/arm/cpu/armv8/sec_firmware_asm.S
@@ -23,12 +23,12 @@ WEAK(_sec_firmware_entry)
 	/* Set exception return address hold pointer */
         adr	x4, 1f
         mov	x3, x4
-#ifdef SEC_FIRMWARE_ERET_ADDR_REVERT
+#ifdef CONFIG_ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
         rev	w3, w3
 #endif
         str	w3, [x1]
         lsr	x3, x4, #32
-#ifdef SEC_FIRMWARE_ERET_ADDR_REVERT
+#ifdef CONFIG_ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
         rev	w3, w3
 #endif
         str	w3, [x2]
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index 71c26bd..cc9371a 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -10,9 +10,6 @@
 #include "ls1043a_common.h"
 
 #if defined(CONFIG_FSL_LS_PPA)
-#define CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
-#define SEC_FIRMWARE_ERET_ADDR_REVERT
-
 #define CONFIG_SYS_LS_PPA_FW_IN_XIP
 #ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
 #define	CONFIG_SYS_LS_PPA_FW_ADDR	0x60500000
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index 2fe8fc1..8ede24c 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -10,10 +10,6 @@
 #include "ls1046a_common.h"
 
 #if defined(CONFIG_FSL_LS_PPA)
-#define CONFIG_ARMV8_PSCI
-#define CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
-#define CONFIG_SYS_LS_PPA_DRAM_BLOCK_MIN_SIZE		(1UL * 1024 * 1024)
-
 #define CONFIG_SYS_LS_PPA_FW_IN_XIP
 #ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
 #define	CONFIG_SYS_LS_PPA_FW_ADDR	0x40500000
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCHv2 2/4] ARMv8/sec_firmware: relocated and renamed the config FSL_PPA_ARMV8_PSCI
  2017-01-16  9:31 [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig Zhiqiang Hou
@ 2017-01-16  9:31 ` Zhiqiang Hou
  2017-01-16  9:31 ` [U-Boot] [PATCHv2 3/4] kconfig: fsl PPA: move CONFIG_* to Kconfig Zhiqiang Hou
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Zhiqiang Hou @ 2017-01-16  9:31 UTC (permalink / raw)
  To: u-boot

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Moved the config FSL_PPA_ARMV8_PSCI from fsl-layerscape's Kconfig to
Kconfig under armv8 and renamed it to SEC_FIRMWARE_ARMV8_PSCI.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
V2:
 - New patch

 arch/arm/cpu/armv8/Kconfig                |  8 ++++++++
 arch/arm/cpu/armv8/cpu-dt.c               |  2 +-
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 10 +---------
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c   |  2 +-
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c   |  2 +-
 arch/arm/cpu/armv8/sec_firmware.c         |  2 +-
 arch/arm/cpu/armv8/sec_firmware_asm.S     |  2 +-
 arch/arm/include/asm/armv8/sec_firmware.h |  2 +-
 arch/arm/lib/bootm-fdt.c                  |  2 +-
 arch/arm/lib/psci-dt.c                    |  2 +-
 10 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
index 2ee5782..3a73580 100644
--- a/arch/arm/cpu/armv8/Kconfig
+++ b/arch/arm/cpu/armv8/Kconfig
@@ -45,6 +45,14 @@ config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
 	help
 	  Say Y here to support this framework in SPL phase.
 
+config SEC_FIRMWARE_ARMV8_PSCI
+	bool "PSCI implementation in secure monitor firmware"
+	depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
+	help
+	  This config enables the ARMv8 PSCI implementation in secure monitor
+	  firmware. This is a private PSCI implementation and different from
+	  those implemented under the common ARMv8 PSCI framework.
+
 config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
 	bool "ARMv8 secure monitor firmware ERET address byteorder swap"
 	depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
diff --git a/arch/arm/cpu/armv8/cpu-dt.c b/arch/arm/cpu/armv8/cpu-dt.c
index 3a5afe8..5156a15 100644
--- a/arch/arm/cpu/armv8/cpu-dt.c
+++ b/arch/arm/cpu/armv8/cpu-dt.c
@@ -14,7 +14,7 @@
 int psci_update_dt(void *fdt)
 {
 #ifdef CONFIG_MP
-#if defined(CONFIG_ARMV8_PSCI) || defined(CONFIG_FSL_PPA_ARMV8_PSCI)
+#if defined(CONFIG_ARMV8_PSCI) || defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
 
 #ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
 	/*
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index cc0dc88..9098296 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -49,20 +49,12 @@ config FSL_LS_PPA
 	bool "FSL Layerscape PPA firmware support"
 	depends on !ARMV8_PSCI
 	depends on ARCH_LS1043A || ARCH_LS1046A
-	select FSL_PPA_ARMV8_PSCI
+	select SEC_FIRMWARE_ARMV8_PSCI
 	help
 	  The FSL Primary Protected Application (PPA) is a software component
 	  which is loaded during boot stage, and then remains resident in RAM
 	  and runs in the TrustZone after boot.
 	  Say y to enable it.
-
-config FSL_PPA_ARMV8_PSCI
-	bool "PSCI implementation in PPA firmware"
-	depends on FSL_LS_PPA
-	help
-	  This config enables the ARMv8 PSCI implementation in PPA firmware.
-	  This is a private PSCI implementation and different from those
-	  implemented under the common ARMv8 PSCI framework.
 endmenu
 
 config SYS_FSL_MMDC
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 467d9af..f0c584b 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -411,7 +411,7 @@ int arch_early_init_r(void)
 #endif
 #ifdef CONFIG_MP
 #if defined(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) && \
-	defined(CONFIG_FSL_PPA_ARMV8_PSCI)
+	defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
 	/* Check the psci version to determine if the psci is supported */
 	psci_ver = sec_firmware_support_psci_version();
 #endif
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index c10ccf9..61b4946 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -43,7 +43,7 @@ void ft_fixup_cpu(void *blob)
 	u64 val, core_id;
 	size_t *boot_code_size = &(__secondary_boot_code_size);
 #if defined(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) && \
-	defined(CONFIG_FSL_PPA_ARMV8_PSCI)
+	defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
 	int node;
 	u32 psci_ver;
 
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 0b973f0..ec9cf40 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -209,7 +209,7 @@ __weak bool sec_firmware_is_valid(const void *sec_firmware_img)
 	return true;
 }
 
-#ifdef CONFIG_FSL_PPA_ARMV8_PSCI
+#ifdef CONFIG_SEC_FIRMWARE_ARMV8_PSCI
 /*
  * The PSCI_VERSION function is added from PSCI v0.2. When the PSCI
  * v0.1 received this function, the NOT_SUPPORTED (0xffff_ffff) error
diff --git a/arch/arm/cpu/armv8/sec_firmware_asm.S b/arch/arm/cpu/armv8/sec_firmware_asm.S
index 6bae15d..a69963f 100644
--- a/arch/arm/cpu/armv8/sec_firmware_asm.S
+++ b/arch/arm/cpu/armv8/sec_firmware_asm.S
@@ -41,7 +41,7 @@ WEAK(_sec_firmware_entry)
         ret
 ENDPROC(_sec_firmware_entry)
 
-#ifdef CONFIG_FSL_PPA_ARMV8_PSCI
+#ifdef CONFIG_SEC_FIRMWARE_ARMV8_PSCI
 ENTRY(_sec_firmware_support_psci_version)
 	mov	x0, 0x84000000
 	mov	x1, 0x0
diff --git a/arch/arm/include/asm/armv8/sec_firmware.h b/arch/arm/include/asm/armv8/sec_firmware.h
index a4e144b..5ae00fa 100644
--- a/arch/arm/include/asm/armv8/sec_firmware.h
+++ b/arch/arm/include/asm/armv8/sec_firmware.h
@@ -14,7 +14,7 @@
 int sec_firmware_init(const void *, u32 *, u32 *);
 int _sec_firmware_entry(const void *, u32 *, u32 *);
 bool sec_firmware_is_valid(const void *);
-#ifdef CONFIG_FSL_PPA_ARMV8_PSCI
+#ifdef CONFIG_SEC_FIRMWARE_ARMV8_PSCI
 unsigned int sec_firmware_support_psci_version(void);
 unsigned int _sec_firmware_support_psci_version(void);
 #endif
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
index e261d4f..d84789c 100644
--- a/arch/arm/lib/bootm-fdt.c
+++ b/arch/arm/lib/bootm-fdt.c
@@ -53,7 +53,7 @@ int arch_fixup_fdt(void *blob)
 #endif
 
 #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV8_PSCI) || \
-	defined(CONFIG_FSL_PPA_ARMV8_PSCI)
+	defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
 	ret = psci_update_dt(blob);
 	if (ret)
 		return ret;
diff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c
index 45af037..05e0ad6 100644
--- a/arch/arm/lib/psci-dt.c
+++ b/arch/arm/lib/psci-dt.c
@@ -17,7 +17,7 @@
 int fdt_psci(void *fdt)
 {
 #if defined(CONFIG_ARMV7_PSCI) || defined(CONFIG_ARMV8_PSCI) || \
-	defined(CONFIG_FSL_PPA_ARMV8_PSCI)
+	defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
 	int nodeoff;
 	unsigned int psci_ver = 0;
 	int tmp;
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCHv2 3/4] kconfig: fsl PPA: move CONFIG_* to Kconfig
  2017-01-16  9:31 [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig Zhiqiang Hou
  2017-01-16  9:31 ` [U-Boot] [PATCHv2 2/4] ARMv8/sec_firmware: relocated and renamed the config FSL_PPA_ARMV8_PSCI Zhiqiang Hou
@ 2017-01-16  9:31 ` Zhiqiang Hou
  2017-01-16  9:31 ` [U-Boot] [PATCHv2 4/4] fsl PPA: enable PPA for ls1043ardb and ls1046ardb Zhiqiang Hou
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Zhiqiang Hou @ 2017-01-16  9:31 UTC (permalink / raw)
  To: u-boot

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
V2:
 - Select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT only for LSCH2 platforms.
 - Remove the dependence on LS1043A and LS1046A.
 - Generate the patch base on the latest code.

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig  | 27 ++++++++++++++++++++++++++-
 arch/arm/cpu/armv8/fsl-layerscape/Makefile |  2 +-
 include/configs/ls1043ardb.h               |  7 -------
 include/configs/ls1046ardb.h               |  7 -------
 4 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index 9098296..7ed9fd5 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -48,13 +48,38 @@ menu "Layerscape PPA"
 config FSL_LS_PPA
 	bool "FSL Layerscape PPA firmware support"
 	depends on !ARMV8_PSCI
-	depends on ARCH_LS1043A || ARCH_LS1046A
+	select ARMV8_SEC_FIRMWARE_SUPPORT
 	select SEC_FIRMWARE_ARMV8_PSCI
+	select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT if FSL_LSCH2
 	help
 	  The FSL Primary Protected Application (PPA) is a software component
 	  which is loaded during boot stage, and then remains resident in RAM
 	  and runs in the TrustZone after boot.
 	  Say y to enable it.
+
+choice
+	prompt "FSL Layerscape PPA firmware loading-media select"
+	depends on FSL_LS_PPA
+	default SYS_LS_PPA_FW_IN_XIP
+
+config SYS_LS_PPA_FW_IN_XIP
+	bool "XIP"
+	help
+	  Say Y here if the PPA firmware locate at XIP flash, such
+	  as NOR or QSPI flash.
+
+endchoice
+
+config SYS_LS_PPA_FW_ADDR
+	hex "Address of PPA firmware loading from"
+	depends on FSL_LS_PPA
+	default 0x40500000 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT
+	default 0x60500000 if SYS_LS_PPA_FW_IN_XIP
+	help
+	  If the PPA firmware locate at XIP flash, such as NOR or
+	  QSPI flash, this address is a directly memory-mapped.
+	  If it is in a serial accessed flash, such as NAND and SD
+	  card, it is a byte offset.
 endmenu
 
 config SYS_FSL_MMDC
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Makefile b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
index 423b4b3..c9ab93e 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Makefile
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
@@ -10,7 +10,7 @@ obj-y += soc.o
 obj-$(CONFIG_MP) += mp.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_SPL) += spl.o
-obj-$(CONFIG_FSL_LS_PPA) += ppa.o
+obj-$(CONFIG_$(SPL_)FSL_LS_PPA) += ppa.o
 
 ifneq ($(CONFIG_FSL_LSCH3),)
 obj-y += fsl_lsch3_speed.o
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index cc9371a..49fa556 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -9,13 +9,6 @@
 
 #include "ls1043a_common.h"
 
-#if defined(CONFIG_FSL_LS_PPA)
-#define CONFIG_SYS_LS_PPA_FW_IN_XIP
-#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
-#define	CONFIG_SYS_LS_PPA_FW_ADDR	0x60500000
-#endif
-#endif
-
 #if defined(CONFIG_NAND_BOOT) || defined(CONFIG_SD_BOOT)
 #define CONFIG_SYS_TEXT_BASE		0x82000000
 #else
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index 8ede24c..559e9ed 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -9,13 +9,6 @@
 
 #include "ls1046a_common.h"
 
-#if defined(CONFIG_FSL_LS_PPA)
-#define CONFIG_SYS_LS_PPA_FW_IN_XIP
-#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
-#define	CONFIG_SYS_LS_PPA_FW_ADDR	0x40500000
-#endif
-#endif
-
 #ifdef CONFIG_SD_BOOT
 #define CONFIG_SYS_TEXT_BASE		0x82000000
 #else
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCHv2 4/4] fsl PPA: enable PPA for ls1043ardb and ls1046ardb
  2017-01-16  9:31 [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig Zhiqiang Hou
  2017-01-16  9:31 ` [U-Boot] [PATCHv2 2/4] ARMv8/sec_firmware: relocated and renamed the config FSL_PPA_ARMV8_PSCI Zhiqiang Hou
  2017-01-16  9:31 ` [U-Boot] [PATCHv2 3/4] kconfig: fsl PPA: move CONFIG_* to Kconfig Zhiqiang Hou
@ 2017-01-16  9:31 ` Zhiqiang Hou
  2017-01-17 19:03 ` [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig york sun
  2017-01-19 17:44 ` york sun
  4 siblings, 0 replies; 11+ messages in thread
From: Zhiqiang Hou @ 2017-01-16  9:31 UTC (permalink / raw)
  To: u-boot

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Enable PPA for ls1043ardb NOR boot and ls1046ardb QSPI boot.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
V2:
 - No change

 configs/ls1043ardb_defconfig      | 1 +
 configs/ls1046ardb_qspi_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index 9042ac7..a36bb0b 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -4,6 +4,7 @@ CONFIG_SYS_FSL_DDR4=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-rdb"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
+CONFIG_FSL_LS_PPA=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig
index fa17373..62fd661 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_LS1046ARDB=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
+CONFIG_FSL_LS_PPA=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
 CONFIG_QSPI_BOOT=y
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig
  2017-01-16  9:31 [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig Zhiqiang Hou
                   ` (2 preceding siblings ...)
  2017-01-16  9:31 ` [U-Boot] [PATCHv2 4/4] fsl PPA: enable PPA for ls1043ardb and ls1046ardb Zhiqiang Hou
@ 2017-01-17 19:03 ` york sun
  2017-01-18  2:23   ` Z.Q. Hou
  2017-01-19 17:44 ` york sun
  4 siblings, 1 reply; 11+ messages in thread
From: york sun @ 2017-01-17 19:03 UTC (permalink / raw)
  To: u-boot

On 01/16/2017 01:45 AM, Zhiqiang Hou wrote:
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> ---
> V2:
>  - Generate the patch base on the latest code.
>
>  arch/arm/cpu/armv8/Kconfig            | 33 +++++++++++++++++++++++++++++++++
>  arch/arm/cpu/armv8/Makefile           |  2 +-
>  arch/arm/cpu/armv8/sec_firmware_asm.S |  4 ++--
>  include/configs/ls1043ardb.h          |  3 ---
>  include/configs/ls1046ardb.h          |  4 ----
>  5 files changed, 36 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
> index 22dce88..2ee5782 100644
> --- a/arch/arm/cpu/armv8/Kconfig
> +++ b/arch/arm/cpu/armv8/Kconfig
> @@ -21,6 +21,39 @@ config ARMV8_SPIN_TABLE
>  	    - Reserve the code for the spin-table and the release address
>  	      via a /memreserve/ region in the Device Tree.
>
> +menu "ARMv8 secure monitor firmware"
> +config ARMV8_SEC_FIRMWARE_SUPPORT
> +	bool "Enable ARMv8 secure monitor firmware framework support"
> +	select OF_LIBFDT
> +	select FIT
> +	help
> +	  This framework is aimed at making secure monitor firmware load
> +	  process brief.
> +	  Note: Only FIT format image is supported.
> +	  You should prepare and provide the below information:
> +	    - Address of secure firmware.
> +	    - Address to hold the return address from secure firmware.
> +	    - Secure firmware FIT image related information.
> +	      Such as: SEC_FIRMWARE_FIT_IMAGE and SEC_FIRMEWARE_FIT_CNF_NAME
> +	    - The target exception level that secure monitor firmware will
> +	      return to.
> +
> +config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
> +	bool "Enable ARMv8 secure monitor firmware framework support for SPL"
> +	select SPL_OF_LIBFDT
> +	select SPL_FIT
> +	help
> +	  Say Y here to support this framework in SPL phase.
> +
> +config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
> +	bool "ARMv8 secure monitor firmware ERET address byteorder swap"
> +	depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
> +	help
> +	  Say Y here when the endianness of the register or memory holding the
> +	  Secure firmware exception return address is different with core's.
> +
> +endmenu
> +

Zhiqiang,

After you move the macro to Kconfig, you should remove it from 
scripts/config_whitelist.txt.

Please help me understand when and where ARMV8_SEC_FIRMWARE_SUPPORT is 
turned on? I am trying to resolve the conflict between this set and 
Prabhakar's patch for LS1012A PPA http://patchwork.ozlabs.org/patch/709650/.

York

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

* [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig
  2017-01-17 19:03 ` [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig york sun
@ 2017-01-18  2:23   ` Z.Q. Hou
  2017-01-18  2:57     ` york sun
  0 siblings, 1 reply; 11+ messages in thread
From: Z.Q. Hou @ 2017-01-18  2:23 UTC (permalink / raw)
  To: u-boot

Hi York,

Thanks for your comments!

> -----Original Message-----
> From: york sun
> Sent: 2017?1?18? 3:04
> To: Z.Q. Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de;
> albert.u.boot at aribaud.net; sjg at chromium.org; bmeng.cn at gmail.com;
> hs at denx.de; yamada.masahiro at socionext.com; Ruchika Gupta
> <ruchika.gupta@nxp.com>; eddy.petrisor at gmail.com;
> s.temerkhanov at gmail.com; Prabhakar Kushwaha
> <prabhakar.kushwaha@nxp.com>; sr at denx.de; van.freenix at gmail.com;
> fgretief at spaceteq.co.za; rpjday at crashcourse.ca; trini at konsulko.com;
> Priyanka Jain <priyanka.jain@nxp.com>; Mingkai Hu <mingkai.hu@nxp.com>
> Subject: Re: [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware
> CONFIG_* to Kconfig
> 
> On 01/16/2017 01:45 AM, Zhiqiang Hou wrote:
> > From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >
> > Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> > ---
> > V2:
> >  - Generate the patch base on the latest code.
> >
> >  arch/arm/cpu/armv8/Kconfig            | 33
> +++++++++++++++++++++++++++++++++
> >  arch/arm/cpu/armv8/Makefile           |  2 +-
> >  arch/arm/cpu/armv8/sec_firmware_asm.S |  4 ++--
> >  include/configs/ls1043ardb.h          |  3 ---
> >  include/configs/ls1046ardb.h          |  4 ----
> >  5 files changed, 36 insertions(+), 10 deletions(-)
> >
> > diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
> > index 22dce88..2ee5782 100644
> > --- a/arch/arm/cpu/armv8/Kconfig
> > +++ b/arch/arm/cpu/armv8/Kconfig
> > @@ -21,6 +21,39 @@ config ARMV8_SPIN_TABLE
> >  	    - Reserve the code for the spin-table and the release address
> >  	      via a /memreserve/ region in the Device Tree.
> >
> > +menu "ARMv8 secure monitor firmware"
> > +config ARMV8_SEC_FIRMWARE_SUPPORT
> > +	bool "Enable ARMv8 secure monitor firmware framework support"
> > +	select OF_LIBFDT
> > +	select FIT
> > +	help
> > +	  This framework is aimed at making secure monitor firmware load
> > +	  process brief.
> > +	  Note: Only FIT format image is supported.
> > +	  You should prepare and provide the below information:
> > +	    - Address of secure firmware.
> > +	    - Address to hold the return address from secure firmware.
> > +	    - Secure firmware FIT image related information.
> > +	      Such as: SEC_FIRMWARE_FIT_IMAGE and
> SEC_FIRMEWARE_FIT_CNF_NAME
> > +	    - The target exception level that secure monitor firmware will
> > +	      return to.
> > +
> > +config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
> > +	bool "Enable ARMv8 secure monitor firmware framework support for
> SPL"
> > +	select SPL_OF_LIBFDT
> > +	select SPL_FIT
> > +	help
> > +	  Say Y here to support this framework in SPL phase.
> > +
> > +config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
> > +	bool "ARMv8 secure monitor firmware ERET address byteorder swap"
> > +	depends on ARMV8_SEC_FIRMWARE_SUPPORT ||
> SPL_ARMV8_SEC_FIRMWARE_SUPPORT
> > +	help
> > +	  Say Y here when the endianness of the register or memory holding the
> > +	  Secure firmware exception return address is different with core's.
> > +
> > +endmenu
> > +
> 
> Zhiqiang,
> 
> After you move the macro to Kconfig, you should remove it from
> scripts/config_whitelist.txt.

Shall I send an isolated patch to remove it?

> Please help me understand when and where
> ARMV8_SEC_FIRMWARE_SUPPORT is turned on? I am trying to resolve the
> conflict between this set and Prabhakar's patch for LS1012A PPA
> http://patchwork.ozlabs.org/patch/709650/.

Select it under the config FSL_LS_PPA.

Thanks,
Zhiqiang

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

* [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig
  2017-01-18  2:23   ` Z.Q. Hou
@ 2017-01-18  2:57     ` york sun
  2017-01-18  6:57       ` Z.Q. Hou
  0 siblings, 1 reply; 11+ messages in thread
From: york sun @ 2017-01-18  2:57 UTC (permalink / raw)
  To: u-boot

Reduced CC list.

On 01/17/2017 06:23 PM, Z.Q. Hou wrote:
> Hi York,
>
> Thanks for your comments!
>
>> -----Original Message-----
>> From: york sun
>> Sent: 2017?1?18? 3:04
>> To: Z.Q. Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de;
>> albert.u.boot at aribaud.net; sjg at chromium.org; bmeng.cn at gmail.com;
>> hs at denx.de; yamada.masahiro at socionext.com; Ruchika Gupta
>> <ruchika.gupta@nxp.com>; eddy.petrisor at gmail.com;
>> s.temerkhanov at gmail.com; Prabhakar Kushwaha
>> <prabhakar.kushwaha@nxp.com>; sr at denx.de; van.freenix at gmail.com;
>> fgretief at spaceteq.co.za; rpjday at crashcourse.ca; trini at konsulko.com;
>> Priyanka Jain <priyanka.jain@nxp.com>; Mingkai Hu <mingkai.hu@nxp.com>
>> Subject: Re: [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware
>> CONFIG_* to Kconfig
>>
>> On 01/16/2017 01:45 AM, Zhiqiang Hou wrote:
>>> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>>>
>>> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>>> ---
>>> V2:
>>>  - Generate the patch base on the latest code.
>>>
>>>  arch/arm/cpu/armv8/Kconfig            | 33
>> +++++++++++++++++++++++++++++++++
>>>  arch/arm/cpu/armv8/Makefile           |  2 +-
>>>  arch/arm/cpu/armv8/sec_firmware_asm.S |  4 ++--
>>>  include/configs/ls1043ardb.h          |  3 ---
>>>  include/configs/ls1046ardb.h          |  4 ----
>>>  5 files changed, 36 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
>>> index 22dce88..2ee5782 100644
>>> --- a/arch/arm/cpu/armv8/Kconfig
>>> +++ b/arch/arm/cpu/armv8/Kconfig
>>> @@ -21,6 +21,39 @@ config ARMV8_SPIN_TABLE
>>>  	    - Reserve the code for the spin-table and the release address
>>>  	      via a /memreserve/ region in the Device Tree.
>>>
>>> +menu "ARMv8 secure monitor firmware"
>>> +config ARMV8_SEC_FIRMWARE_SUPPORT
>>> +	bool "Enable ARMv8 secure monitor firmware framework support"
>>> +	select OF_LIBFDT
>>> +	select FIT
>>> +	help
>>> +	  This framework is aimed at making secure monitor firmware load
>>> +	  process brief.
>>> +	  Note: Only FIT format image is supported.
>>> +	  You should prepare and provide the below information:
>>> +	    - Address of secure firmware.
>>> +	    - Address to hold the return address from secure firmware.
>>> +	    - Secure firmware FIT image related information.
>>> +	      Such as: SEC_FIRMWARE_FIT_IMAGE and
>> SEC_FIRMEWARE_FIT_CNF_NAME
>>> +	    - The target exception level that secure monitor firmware will
>>> +	      return to.
>>> +
>>> +config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
>>> +	bool "Enable ARMv8 secure monitor firmware framework support for
>> SPL"
>>> +	select SPL_OF_LIBFDT
>>> +	select SPL_FIT
>>> +	help
>>> +	  Say Y here to support this framework in SPL phase.
>>> +
>>> +config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
>>> +	bool "ARMv8 secure monitor firmware ERET address byteorder swap"
>>> +	depends on ARMV8_SEC_FIRMWARE_SUPPORT ||
>> SPL_ARMV8_SEC_FIRMWARE_SUPPORT
>>> +	help
>>> +	  Say Y here when the endianness of the register or memory holding the
>>> +	  Secure firmware exception return address is different with core's.
>>> +
>>> +endmenu
>>> +
>>
>> Zhiqiang,
>>
>> After you move the macro to Kconfig, you should remove it from
>> scripts/config_whitelist.txt.
>
> Shall I send an isolated patch to remove it?

Not this time. I will remove it when I merge your patch.

>
>> Please help me understand when and where
>> ARMV8_SEC_FIRMWARE_SUPPORT is turned on? I am trying to resolve the
>> conflict between this set and Prabhakar's patch for LS1012A PPA
>> http://patchwork.ozlabs.org/patch/709650/.
>
> Select it under the config FSL_LS_PPA.
>

You don't have any platform selecting this config, do you? Can you help 
Prabhakar to rebase his patch on top of yours? He has this config 
enabled for all three LS1012A platforms.

York

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

* [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig
  2017-01-18  2:57     ` york sun
@ 2017-01-18  6:57       ` Z.Q. Hou
  2017-01-18 17:43         ` york sun
  0 siblings, 1 reply; 11+ messages in thread
From: Z.Q. Hou @ 2017-01-18  6:57 UTC (permalink / raw)
  To: u-boot

Hi York,

Thanks for your comments!

> -----Original Message-----
> From: york sun
> Sent: 2017?1?18? 10:57
> To: Z.Q. Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de; Prabhakar
> Kushwaha <prabhakar.kushwaha@nxp.com>
> Subject: Re: [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware
> CONFIG_* to Kconfig
> 
> Reduced CC list.
> 
> On 01/17/2017 06:23 PM, Z.Q. Hou wrote:
> > Hi York,
> >
> > Thanks for your comments!
> >
> >> -----Original Message-----
> >> From: york sun
> >> Sent: 2017?1?18? 3:04
> >> To: Z.Q. Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de;
> >> albert.u.boot at aribaud.net; sjg at chromium.org; bmeng.cn at gmail.com;
> >> hs at denx.de; yamada.masahiro at socionext.com; Ruchika Gupta
> >> <ruchika.gupta@nxp.com>; eddy.petrisor at gmail.com;
> >> s.temerkhanov at gmail.com; Prabhakar Kushwaha
> >> <prabhakar.kushwaha@nxp.com>; sr at denx.de; van.freenix at gmail.com;
> >> fgretief at spaceteq.co.za; rpjday at crashcourse.ca; trini at konsulko.com;
> >> Priyanka Jain <priyanka.jain@nxp.com>; Mingkai Hu
> >> <mingkai.hu@nxp.com>
> >> Subject: Re: [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware
> >> CONFIG_* to Kconfig
> >>
> >> On 01/16/2017 01:45 AM, Zhiqiang Hou wrote:
> >>> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >>>
> >>> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >>> ---
> >>> V2:
> >>>  - Generate the patch base on the latest code.
> >>>
> >>>  arch/arm/cpu/armv8/Kconfig            | 33
> >> +++++++++++++++++++++++++++++++++
> >>>  arch/arm/cpu/armv8/Makefile           |  2 +-
> >>>  arch/arm/cpu/armv8/sec_firmware_asm.S |  4 ++--
> >>>  include/configs/ls1043ardb.h          |  3 ---
> >>>  include/configs/ls1046ardb.h          |  4 ----
> >>>  5 files changed, 36 insertions(+), 10 deletions(-)
> >>>
> >>> diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
> >>> index 22dce88..2ee5782 100644
> >>> --- a/arch/arm/cpu/armv8/Kconfig
> >>> +++ b/arch/arm/cpu/armv8/Kconfig
> >>> @@ -21,6 +21,39 @@ config ARMV8_SPIN_TABLE
> >>>  	    - Reserve the code for the spin-table and the release address
> >>>  	      via a /memreserve/ region in the Device Tree.
> >>>
> >>> +menu "ARMv8 secure monitor firmware"
> >>> +config ARMV8_SEC_FIRMWARE_SUPPORT
> >>> +	bool "Enable ARMv8 secure monitor firmware framework support"
> >>> +	select OF_LIBFDT
> >>> +	select FIT
> >>> +	help
> >>> +	  This framework is aimed at making secure monitor firmware load
> >>> +	  process brief.
> >>> +	  Note: Only FIT format image is supported.
> >>> +	  You should prepare and provide the below information:
> >>> +	    - Address of secure firmware.
> >>> +	    - Address to hold the return address from secure firmware.
> >>> +	    - Secure firmware FIT image related information.
> >>> +	      Such as: SEC_FIRMWARE_FIT_IMAGE and
> >> SEC_FIRMEWARE_FIT_CNF_NAME
> >>> +	    - The target exception level that secure monitor firmware will
> >>> +	      return to.
> >>> +
> >>> +config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
> >>> +	bool "Enable ARMv8 secure monitor firmware framework support for
> >> SPL"
> >>> +	select SPL_OF_LIBFDT
> >>> +	select SPL_FIT
> >>> +	help
> >>> +	  Say Y here to support this framework in SPL phase.
> >>> +
> >>> +config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
> >>> +	bool "ARMv8 secure monitor firmware ERET address byteorder
> swap"
> >>> +	depends on ARMV8_SEC_FIRMWARE_SUPPORT ||
> >> SPL_ARMV8_SEC_FIRMWARE_SUPPORT
> >>> +	help
> >>> +	  Say Y here when the endianness of the register or memory holding
> the
> >>> +	  Secure firmware exception return address is different with core's.
> >>> +
> >>> +endmenu
> >>> +
> >>
> >> Zhiqiang,
> >>
> >> After you move the macro to Kconfig, you should remove it from
> >> scripts/config_whitelist.txt.
> >
> > Shall I send an isolated patch to remove it?
> 
> Not this time. I will remove it when I merge your patch.

Ok, thanks.

> >
> >> Please help me understand when and where
> ARMV8_SEC_FIRMWARE_SUPPORT
> >> is turned on? I am trying to resolve the conflict between this set
> >> and Prabhakar's patch for LS1012A PPA
> >> http://patchwork.ozlabs.org/patch/709650/.
> >
> > Select it under the config FSL_LS_PPA.
> >
> 
> You don't have any platform selecting this config, do you? Can you help
> Prabhakar to rebase his patch on top of yours? He has this config enabled for
> all three LS1012A platforms.

I have added the 'select ARMV8_SEC_FIRMWARE_SUPPORT' under the FSL_LS_PPA in the 3rd patch of this patchset.
Yes, I have sent the new method to enable PPA to Prabhakar.

Thanks,
Zhiqiang

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

* [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig
  2017-01-18  6:57       ` Z.Q. Hou
@ 2017-01-18 17:43         ` york sun
  2017-01-19  2:10           ` Z.Q. Hou
  0 siblings, 1 reply; 11+ messages in thread
From: york sun @ 2017-01-18 17:43 UTC (permalink / raw)
  To: u-boot

On 01/17/2017 10:57 PM, Z.Q. Hou wrote:
> Hi York,
>
> Thanks for your comments!
>
>> -----Original Message-----
>> From: york sun
>> Sent: 2017?1?18? 10:57
>> To: Z.Q. Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de; Prabhakar
>> Kushwaha <prabhakar.kushwaha@nxp.com>
>> Subject: Re: [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware
>> CONFIG_* to Kconfig
>>
>> Reduced CC list.
>>
>> On 01/17/2017 06:23 PM, Z.Q. Hou wrote:
>>> Hi York,
>>>
>>> Thanks for your comments!
>>>
>>>> -----Original Message-----
>>>> From: york sun
>>>> Sent: 2017?1?18? 3:04
>>>> To: Z.Q. Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de;
>>>> albert.u.boot at aribaud.net; sjg at chromium.org; bmeng.cn at gmail.com;
>>>> hs at denx.de; yamada.masahiro at socionext.com; Ruchika Gupta
>>>> <ruchika.gupta@nxp.com>; eddy.petrisor at gmail.com;
>>>> s.temerkhanov at gmail.com; Prabhakar Kushwaha
>>>> <prabhakar.kushwaha@nxp.com>; sr at denx.de; van.freenix at gmail.com;
>>>> fgretief at spaceteq.co.za; rpjday at crashcourse.ca; trini at konsulko.com;
>>>> Priyanka Jain <priyanka.jain@nxp.com>; Mingkai Hu
>>>> <mingkai.hu@nxp.com>
>>>> Subject: Re: [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware
>>>> CONFIG_* to Kconfig
>>>>
>>>> On 01/16/2017 01:45 AM, Zhiqiang Hou wrote:
>>>>> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>>>>>
>>>>> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>>>>> ---
>>>>> V2:
>>>>>  - Generate the patch base on the latest code.
>>>>>
>>>>>  arch/arm/cpu/armv8/Kconfig            | 33
>>>> +++++++++++++++++++++++++++++++++
>>>>>  arch/arm/cpu/armv8/Makefile           |  2 +-
>>>>>  arch/arm/cpu/armv8/sec_firmware_asm.S |  4 ++--
>>>>>  include/configs/ls1043ardb.h          |  3 ---
>>>>>  include/configs/ls1046ardb.h          |  4 ----
>>>>>  5 files changed, 36 insertions(+), 10 deletions(-)
>>>>>
>>>>> diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
>>>>> index 22dce88..2ee5782 100644
>>>>> --- a/arch/arm/cpu/armv8/Kconfig
>>>>> +++ b/arch/arm/cpu/armv8/Kconfig
>>>>> @@ -21,6 +21,39 @@ config ARMV8_SPIN_TABLE
>>>>>  	    - Reserve the code for the spin-table and the release address
>>>>>  	      via a /memreserve/ region in the Device Tree.
>>>>>
>>>>> +menu "ARMv8 secure monitor firmware"
>>>>> +config ARMV8_SEC_FIRMWARE_SUPPORT
>>>>> +	bool "Enable ARMv8 secure monitor firmware framework support"
>>>>> +	select OF_LIBFDT
>>>>> +	select FIT
>>>>> +	help
>>>>> +	  This framework is aimed at making secure monitor firmware load
>>>>> +	  process brief.
>>>>> +	  Note: Only FIT format image is supported.
>>>>> +	  You should prepare and provide the below information:
>>>>> +	    - Address of secure firmware.
>>>>> +	    - Address to hold the return address from secure firmware.
>>>>> +	    - Secure firmware FIT image related information.
>>>>> +	      Such as: SEC_FIRMWARE_FIT_IMAGE and
>>>> SEC_FIRMEWARE_FIT_CNF_NAME
>>>>> +	    - The target exception level that secure monitor firmware will
>>>>> +	      return to.
>>>>> +
>>>>> +config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
>>>>> +	bool "Enable ARMv8 secure monitor firmware framework support for
>>>> SPL"
>>>>> +	select SPL_OF_LIBFDT
>>>>> +	select SPL_FIT
>>>>> +	help
>>>>> +	  Say Y here to support this framework in SPL phase.
>>>>> +
>>>>> +config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
>>>>> +	bool "ARMv8 secure monitor firmware ERET address byteorder
>> swap"
>>>>> +	depends on ARMV8_SEC_FIRMWARE_SUPPORT ||
>>>> SPL_ARMV8_SEC_FIRMWARE_SUPPORT
>>>>> +	help
>>>>> +	  Say Y here when the endianness of the register or memory holding
>> the
>>>>> +	  Secure firmware exception return address is different with core's.
>>>>> +
>>>>> +endmenu
>>>>> +
>>>>
>>>> Zhiqiang,
>>>>
>>>> After you move the macro to Kconfig, you should remove it from
>>>> scripts/config_whitelist.txt.
>>>
>>> Shall I send an isolated patch to remove it?
>>
>> Not this time. I will remove it when I merge your patch.
>
> Ok, thanks.
>
>>>
>>>> Please help me understand when and where
>> ARMV8_SEC_FIRMWARE_SUPPORT
>>>> is turned on? I am trying to resolve the conflict between this set
>>>> and Prabhakar's patch for LS1012A PPA
>>>> http://patchwork.ozlabs.org/patch/709650/.
>>>
>>> Select it under the config FSL_LS_PPA.
>>>
>>
>> You don't have any platform selecting this config, do you? Can you help
>> Prabhakar to rebase his patch on top of yours? He has this config enabled for
>> all three LS1012A platforms.
>
> I have added the 'select ARMV8_SEC_FIRMWARE_SUPPORT' under the FSL_LS_PPA in the 3rd patch of this patchset.
> Yes, I have sent the new method to enable PPA to Prabhakar.

Ah! I made a mistake when resolving the conflict. Glad I asked you. Thanks.

York

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

* [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig
  2017-01-18 17:43         ` york sun
@ 2017-01-19  2:10           ` Z.Q. Hou
  0 siblings, 0 replies; 11+ messages in thread
From: Z.Q. Hou @ 2017-01-19  2:10 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: york sun
> Sent: 2017?1?19? 1:43
> To: Z.Q. Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de; Prabhakar
> Kushwaha <prabhakar.kushwaha@nxp.com>
> Subject: Re: [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware
> CONFIG_* to Kconfig
> 
> On 01/17/2017 10:57 PM, Z.Q. Hou wrote:
> > Hi York,
> >
> > Thanks for your comments!
> >
> >> -----Original Message-----
> >> From: york sun
> >> Sent: 2017?1?18? 10:57
> >> To: Z.Q. Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de; Prabhakar
> >> Kushwaha <prabhakar.kushwaha@nxp.com>
> >> Subject: Re: [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware
> >> CONFIG_* to Kconfig
> >>
> >> Reduced CC list.
> >>
> >> On 01/17/2017 06:23 PM, Z.Q. Hou wrote:
> >>> Hi York,
> >>>
> >>> Thanks for your comments!
> >>>
> >>>> -----Original Message-----
> >>>> From: york sun
> >>>> Sent: 2017?1?18? 3:04
> >>>> To: Z.Q. Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de;
> >>>> albert.u.boot at aribaud.net; sjg at chromium.org; bmeng.cn at gmail.com;
> >>>> hs at denx.de; yamada.masahiro at socionext.com; Ruchika Gupta
> >>>> <ruchika.gupta@nxp.com>; eddy.petrisor at gmail.com;
> >>>> s.temerkhanov at gmail.com; Prabhakar Kushwaha
> >>>> <prabhakar.kushwaha@nxp.com>; sr at denx.de; van.freenix at gmail.com;
> >>>> fgretief at spaceteq.co.za; rpjday at crashcourse.ca; trini at konsulko.com;
> >>>> Priyanka Jain <priyanka.jain@nxp.com>; Mingkai Hu
> >>>> <mingkai.hu@nxp.com>
> >>>> Subject: Re: [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware
> >>>> CONFIG_* to Kconfig
> >>>>
> >>>> On 01/16/2017 01:45 AM, Zhiqiang Hou wrote:
> >>>>> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >>>>>
> >>>>> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >>>>> ---
> >>>>> V2:
> >>>>>  - Generate the patch base on the latest code.
> >>>>>
> >>>>>  arch/arm/cpu/armv8/Kconfig            | 33
> >>>> +++++++++++++++++++++++++++++++++
> >>>>>  arch/arm/cpu/armv8/Makefile           |  2 +-
> >>>>>  arch/arm/cpu/armv8/sec_firmware_asm.S |  4 ++--
> >>>>>  include/configs/ls1043ardb.h          |  3 ---
> >>>>>  include/configs/ls1046ardb.h          |  4 ----
> >>>>>  5 files changed, 36 insertions(+), 10 deletions(-)
> >>>>>
> >>>>> diff --git a/arch/arm/cpu/armv8/Kconfig
> >>>>> b/arch/arm/cpu/armv8/Kconfig index 22dce88..2ee5782 100644
> >>>>> --- a/arch/arm/cpu/armv8/Kconfig
> >>>>> +++ b/arch/arm/cpu/armv8/Kconfig
> >>>>> @@ -21,6 +21,39 @@ config ARMV8_SPIN_TABLE
> >>>>>  	    - Reserve the code for the spin-table and the release address
> >>>>>  	      via a /memreserve/ region in the Device Tree.
> >>>>>
> >>>>> +menu "ARMv8 secure monitor firmware"
> >>>>> +config ARMV8_SEC_FIRMWARE_SUPPORT
> >>>>> +	bool "Enable ARMv8 secure monitor firmware framework support"
> >>>>> +	select OF_LIBFDT
> >>>>> +	select FIT
> >>>>> +	help
> >>>>> +	  This framework is aimed at making secure monitor firmware load
> >>>>> +	  process brief.
> >>>>> +	  Note: Only FIT format image is supported.
> >>>>> +	  You should prepare and provide the below information:
> >>>>> +	    - Address of secure firmware.
> >>>>> +	    - Address to hold the return address from secure firmware.
> >>>>> +	    - Secure firmware FIT image related information.
> >>>>> +	      Such as: SEC_FIRMWARE_FIT_IMAGE and
> >>>> SEC_FIRMEWARE_FIT_CNF_NAME
> >>>>> +	    - The target exception level that secure monitor firmware will
> >>>>> +	      return to.
> >>>>> +
> >>>>> +config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
> >>>>> +	bool "Enable ARMv8 secure monitor firmware framework support for
> >>>> SPL"
> >>>>> +	select SPL_OF_LIBFDT
> >>>>> +	select SPL_FIT
> >>>>> +	help
> >>>>> +	  Say Y here to support this framework in SPL phase.
> >>>>> +
> >>>>> +config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
> >>>>> +	bool "ARMv8 secure monitor firmware ERET address byteorder
> >> swap"
> >>>>> +	depends on ARMV8_SEC_FIRMWARE_SUPPORT ||
> >>>> SPL_ARMV8_SEC_FIRMWARE_SUPPORT
> >>>>> +	help
> >>>>> +	  Say Y here when the endianness of the register or memory
> >>>>> +holding
> >> the
> >>>>> +	  Secure firmware exception return address is different with core's.
> >>>>> +
> >>>>> +endmenu
> >>>>> +
> >>>>
> >>>> Zhiqiang,
> >>>>
> >>>> After you move the macro to Kconfig, you should remove it from
> >>>> scripts/config_whitelist.txt.
> >>>
> >>> Shall I send an isolated patch to remove it?
> >>
> >> Not this time. I will remove it when I merge your patch.
> >
> > Ok, thanks.
> >
> >>>
> >>>> Please help me understand when and where
> >> ARMV8_SEC_FIRMWARE_SUPPORT
> >>>> is turned on? I am trying to resolve the conflict between this set
> >>>> and Prabhakar's patch for LS1012A PPA
> >>>> http://patchwork.ozlabs.org/patch/709650/.
> >>>
> >>> Select it under the config FSL_LS_PPA.
> >>>
> >>
> >> You don't have any platform selecting this config, do you? Can you
> >> help Prabhakar to rebase his patch on top of yours? He has this
> >> config enabled for all three LS1012A platforms.
> >
> > I have added the 'select ARMV8_SEC_FIRMWARE_SUPPORT' under the
> FSL_LS_PPA in the 3rd patch of this patchset.
> > Yes, I have sent the new method to enable PPA to Prabhakar.
> 
> Ah! I made a mistake when resolving the conflict. Glad I asked you. Thanks.

All right!

Thanks,
Zhiqiang

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

* [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig
  2017-01-16  9:31 [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig Zhiqiang Hou
                   ` (3 preceding siblings ...)
  2017-01-17 19:03 ` [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig york sun
@ 2017-01-19 17:44 ` york sun
  4 siblings, 0 replies; 11+ messages in thread
From: york sun @ 2017-01-19 17:44 UTC (permalink / raw)
  To: u-boot

On 01/16/2017 01:45 AM, Zhiqiang Hou wrote:
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> ---
> V2:
>  - Generate the patch base on the latest code.
>

This set is applied to fsl-qoriq master, awaiting upstream. Thanks.

York

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

end of thread, other threads:[~2017-01-19 17:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-16  9:31 [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig Zhiqiang Hou
2017-01-16  9:31 ` [U-Boot] [PATCHv2 2/4] ARMv8/sec_firmware: relocated and renamed the config FSL_PPA_ARMV8_PSCI Zhiqiang Hou
2017-01-16  9:31 ` [U-Boot] [PATCHv2 3/4] kconfig: fsl PPA: move CONFIG_* to Kconfig Zhiqiang Hou
2017-01-16  9:31 ` [U-Boot] [PATCHv2 4/4] fsl PPA: enable PPA for ls1043ardb and ls1046ardb Zhiqiang Hou
2017-01-17 19:03 ` [U-Boot] [PATCHv2 1/4] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig york sun
2017-01-18  2:23   ` Z.Q. Hou
2017-01-18  2:57     ` york sun
2017-01-18  6:57       ` Z.Q. Hou
2017-01-18 17:43         ` york sun
2017-01-19  2:10           ` Z.Q. Hou
2017-01-19 17:44 ` york sun

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.