armv8: Allow for ARMv8 extensions to be chosen

There are now a few architectural extensions available for ARMv8, some
of which introduce instructions or other features that may be useful.
This allows the user to select an extension implemented on their SoC
which will set the -march option passed into the compiler.

Change-Id: Ifca50dad98aab130ac04df455bac2cfb65abf82e
Signed-off-by: David Hendricks <dhendricks@fb.com>
Reviewed-on: https://review.coreboot.org/23641
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
David Hendricks 2018-02-07 13:27:26 -08:00 committed by David Hendricks
parent c92f13533b
commit cc3b69bd14
2 changed files with 19 additions and 1 deletions

View File

@ -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.

View File

@ -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