summaryrefslogtreecommitdiff
path: root/src/arch/arm64/armv8
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm64/armv8')
-rw-r--r--src/arch/arm64/armv8/Kconfig12
-rw-r--r--src/arch/arm64/armv8/Makefile.inc8
2 files changed, 19 insertions, 1 deletions
diff --git a/src/arch/arm64/armv8/Kconfig b/src/arch/arm64/armv8/Kconfig
index 02a8dba93b..2070bea197 100644
--- a/src/arch/arm64/armv8/Kconfig
+++ b/src/arch/arm64/armv8/Kconfig
@@ -13,3 +13,15 @@ config ARCH_ROMSTAGE_ARMV8_64
config ARCH_RAMSTAGE_ARMV8_64
def_bool n
select ARCH_RAMSTAGE_ARM64
+
+config ARCH_ARMV8_EXTENSION
+ int
+ default 0
+ help
+ Specify ARMv8 extension, for example '1' for ARMv8.1, to control the
+ '-march' option passed into the compiler. Defaults to 0 for vanilla
+ ARMv8 but may be overridden in the SoC's Kconfig.
+
+ All ARMv8 implementations are downwards-compatible, so this does not
+ need to be changed unless specific features (e.g. new instructions)
+ are used by the SoC's coreboot code.
diff --git a/src/arch/arm64/armv8/Makefile.inc b/src/arch/arm64/armv8/Makefile.inc
index 21ebf70bfb..14a784bb92 100644
--- a/src/arch/arm64/armv8/Makefile.inc
+++ b/src/arch/arm64/armv8/Makefile.inc
@@ -17,7 +17,13 @@
subdirs-y += lib/
-armv8_flags = -march=armv8-a -I$(src)/arch/arm64/include/armv8/ -D__COREBOOT_ARM_ARCH__=8
+ifeq ($(CONFIG_ARCH_ARMV8_EXTENSION),0)
+march = armv8-a
+else
+march = armv8.$(CONFIG_ARCH_ARMV8_EXTENSION)-a
+endif
+
+armv8_flags = -march=$(march) -I$(src)/arch/arm64/include/armv8/ -D__COREBOOT_ARM_ARCH__=8
################################################################################
## bootblock