[U-Boot] [PATCH 1/2] ARM: Add arch/arm/cpu/armv7/Kconfig with non-secure and virt options

Hans de Goede hdegoede at redhat.com
Fri Oct 24 20:34:15 CEST 2014


Add arch/arm/cpu/armv7/Kconfig with non-secure and virt options, so that
we can have CONFIG_ARMV7_SEC_BY_DEFAULT as a proper Kconfig option.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 arch/arm/Kconfig                    |  2 ++
 arch/arm/cpu/armv7/Kconfig          | 20 ++++++++++++++++++++
 include/configs/arndale.h           |  2 --
 include/configs/sun7i.h             |  2 --
 include/configs/vexpress_ca15_tc2.h |  2 --
 5 files changed, 22 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/Kconfig

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0644917..d057dcc 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -560,6 +560,8 @@ source "arch/arm/cpu/arm926ejs/versatile/Kconfig"
 
 source "arch/arm/cpu/armv7/zynq/Kconfig"
 
+source "arch/arm/cpu/armv7/Kconfig"
+
 source "board/aristainetos/Kconfig"
 source "board/BuR/kwb/Kconfig"
 source "board/BuR/tseries/Kconfig"
diff --git a/arch/arm/cpu/armv7/Kconfig b/arch/arm/cpu/armv7/Kconfig
new file mode 100644
index 0000000..84e3edb
--- /dev/null
+++ b/arch/arm/cpu/armv7/Kconfig
@@ -0,0 +1,20 @@
+# FIXME, Once overything in u-boot is properly Kconfig-ified
+# this entire file should be "if ARMV7"
+if ARCH_SUNXI || TARGET_ARNDALE || TARGET_VEXPRESS_CA15_TC2
+
+# FIXME, needs a "depends on ARMV7_HAS_NONSEC"
+config ARMV7_NONSEC
+	boolean "Enable support for booting in non-secure mode" if EXPERT
+	default y
+	---help---
+	Say Y here to enable support for booting in non-secure / SVC mode.
+
+# FIXME, needs a "depends on ARMV7_HAS_VIRT"
+config ARMV7_VIRT
+	boolean "Enable support for hardware virtualization" if EXPERT
+	depends on ARMV7_NONSEC
+	default y
+	---help---
+	Say Y here to boot in hypervisor (HYP) mode when booting non-secure.
+
+endif
diff --git a/include/configs/arndale.h b/include/configs/arndale.h
index f9ee40f..aa6b631 100644
--- a/include/configs/arndale.h
+++ b/include/configs/arndale.h
@@ -60,6 +60,4 @@
 /* The PERIPHBASE in the CBAR register is wrong on the Arndale, so override it */
 #define CONFIG_ARM_GIC_BASE_ADDRESS	0x10480000
 
-#define CONFIG_ARMV7_VIRT
-
 #endif	/* __CONFIG_H */
diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h
index 7f7369c..5531dfd 100644
--- a/include/configs/sun7i.h
+++ b/include/configs/sun7i.h
@@ -30,8 +30,6 @@
 #endif
 #endif
 
-#define CONFIG_ARMV7_VIRT		1
-#define CONFIG_ARMV7_NONSEC		1
 #define CONFIG_ARMV7_PSCI		1
 #define CONFIG_ARMV7_SECURE_BASE	SUNXI_SRAM_B_BASE
 #define CONFIG_SYS_CLK_FREQ		24000000
diff --git a/include/configs/vexpress_ca15_tc2.h b/include/configs/vexpress_ca15_tc2.h
index 982f4a7..b43afa2 100644
--- a/include/configs/vexpress_ca15_tc2.h
+++ b/include/configs/vexpress_ca15_tc2.h
@@ -18,6 +18,4 @@
 #define CONFIG_SYSFLAGS_ADDR	0x1c010030
 #define CONFIG_SMP_PEN_ADDR	CONFIG_SYSFLAGS_ADDR
 
-#define CONFIG_ARMV7_VIRT
-
 #endif
-- 
2.1.0



More information about the U-Boot mailing list