[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCHv5 10/46] arch/arm: Add more CPU models to processor optimization list
From: Wei Chen <Wei.Chen@xxxxxxx> Current processor optimization list only support generic cortex-a7 and one Allwin cortex-a7 SoC. In this patch, we add all armv7 cortex-a series and two armv8 32-bit CPU to support list. As arm64 and x86_64, we also add auto-detect host CPU option for arm32, even it's not likely to be used on arm32 platforms. New supported armv7 cortex-a CPU models: armv7-a,native armv7-a,generic-armv7-a armv7-a,cortex-a8 armv7-a,cortex-a9 armv7-a,cortex-a5 armv7-a,cortex-a15 armv7-a,cortex-a7 armv7-a,cortex-a12 armv7-a,cortex-a17 armv8-a,cortex-a32(full backward compatibility with Armv7) armv8-a,cortex-a35(full backward compatibility with Armv7) The generic-armv7-a would be our default option of armv7 processor. Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx> --- arch/arm/arm/Makefile.uk | 71 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/arch/arm/arm/Makefile.uk b/arch/arm/arm/Makefile.uk index 38ea876..9aef849 100644 --- a/arch/arm/arm/Makefile.uk +++ b/arch/arm/arm/Makefile.uk @@ -5,11 +5,18 @@ CFLAGS += -marm -fms-extensions CXXFLAGS += -D__ARM_32__ CXXFLAGS += -marm -fms-extensions -# Set GCC flags for MARCH_ARM32_A20NEON. GCC supports -mcpu=cortex-a7 from 4.7 -ifeq ($(CONFIG_MARCH_ARM32_A20NEON),y) +# Set GCC flags for MARCH_ARM32_GENERICV7. GCC supports -mtune=generic-armv7-a from 4.7 +ifeq ($(CONFIG_MARCH_ARM32_GENERICV7),y) $(call error_if_gcc_version_lt,4,7) -CFLAGS-$(call gcc_version_ge,4,7) += -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=vfpv4-d16 -mfpu=neon-vfpv4 -funsafe-math-optimizations -CXXFLAGS-$(call gcc_version_ge,4,7) += -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=vfpv4-d16 -mfpu=neon-vfpv4 -funsafe-math-optimizations +CFLAGS-$(call gcc_version_ge,4,7) += -march=armv7-a -mtune=generic-armv7-a +CXXFLAGS-$(call gcc_version_ge,4,7) += -march=armv7-a -mtune=generic-armv7-a +endif + +# Set GCC flags for MARCH_ARM32_CORTEXA5. GCC supports -mcpu=cortex-a5 from 4.5 +ifeq ($(CONFIG_MARCH_ARM32_CORTEXA5),y) +$(call error_if_gcc_version_lt,4,5) +CFLAGS-$(call gcc_version_ge,4,5) += -mcpu=cortex-a5 -mtune=cortex-a5 +CXXFLAGS-$(call gcc_version_ge,4,5) += -mcpu=cortex-a5 -mtune=cortex-a5 endif # Set GCC flags for MARCH_ARM32_CORTEXA7. GCC supports -mcpu=cortex-a7 from 4.7 @@ -19,6 +26,62 @@ CFLAGS-$(call gcc_version_ge,4,7) += -mcpu=cortex-a7 -mtune=cortex-a7 CXXFLAGS-$(call gcc_version_ge,4,7) += -mcpu=cortex-a7 -mtune=cortex-a7 endif +# Set GCC flags for MARCH_ARM32_CORTEXA8. GCC supports -mcpu=cortex-a8 from 4.3 +ifeq ($(CONFIG_MARCH_ARM32_CORTEXA8),y) +$(call error_if_gcc_version_lt,4,3) +CFLAGS-$(call gcc_version_ge,4,3) += -mcpu=cortex-a8 -mtune=cortex-a8 +CXXFLAGS-$(call gcc_version_ge,4,3) += -mcpu=cortex-a8 -mtune=cortex-a8 +endif + +# Set GCC flags for MARCH_ARM32_CORTEXA9. GCC supports -mcpu=cortex-a9 from 4.4 +ifeq ($(CONFIG_MARCH_ARM32_CORTEXA9),y) +$(call error_if_gcc_version_lt,4,4) +CFLAGS-$(call gcc_version_ge,4,4) += -mcpu=cortex-a9 -mtune=cortex-a9 +CXXFLAGS-$(call gcc_version_ge,4,4) += -mcpu=cortex-a9 -mtune=cortex-a9 +endif + +# Set GCC flags for MARCH_ARM32_CORTEXA12. GCC supports -mcpu=cortex-a12 from 4.9 +ifeq ($(CONFIG_MARCH_ARM32_CORTEXA12),y) +$(call error_if_gcc_version_lt,4,9) +CFLAGS-$(call gcc_version_ge,4,9) += -mcpu=cortex-a12 -mtune=cortex-a12 +CXXFLAGS-$(call gcc_version_ge,4,9) += -mcpu=cortex-a12 -mtune=cortex-a12 +endif + +# Set GCC flags for MARCH_ARM32_CORTEXA15. GCC supports -mcpu=cortex-a15 from 4.6 +ifeq ($(CONFIG_MARCH_ARM32_CORTEXA15),y) +$(call error_if_gcc_version_lt,4,6) +CFLAGS-$(call gcc_version_ge,4,6) += -mcpu=cortex-a15 -mtune=cortex-a15 +CXXFLAGS-$(call gcc_version_ge,4,6) += -mcpu=cortex-a15 -mtune=cortex-a15 +endif + +# Set GCC flags for MARCH_ARM32_CORTEXA17. GCC supports -mcpu=cortex-a17 from 6.1 +ifeq ($(CONFIG_MARCH_ARM32_CORTEXA17),y) +$(call error_if_gcc_version_lt,6,1) +CFLAGS-$(call gcc_version_ge,6,1) += -mcpu=cortex-a17 -mtune=cortex-a17 +CXXFLAGS-$(call gcc_version_ge,6,1) += -mcpu=cortex-a17 -mtune=cortex-a17 +endif + +# Set GCC flags for MARCH_ARM32_CORTEXA32. GCC supports -mcpu=cortex-a32 from 6.1 +ifeq ($(CONFIG_MARCH_ARM32_CORTEXA32),y) +$(call error_if_gcc_version_lt,6,1) +CFLAGS-$(call gcc_version_ge,6,1) += -mcpu=cortex-a32 -mtune=cortex-a32 +CXXFLAGS-$(call gcc_version_ge,6,1) += -mcpu=cortex-a32 -mtune=cortex-a32 +endif + +# Set GCC flags for MARCH_ARM32_CORTEXA35. GCC supports -mcpu=cortex-a35 from 6.1 +ifeq ($(CONFIG_MARCH_ARM32_CORTEXA35),y) +$(call error_if_gcc_version_lt,6,1) +CFLAGS-$(call gcc_version_ge,6,1) += -mcpu=cortex-a35 -mtune=cortex-a35 +CXXFLAGS-$(call gcc_version_ge,6,1) += -mcpu=cortex-a35 -mtune=cortex-a35 +endif + +# Set GCC flags for MARCH_ARM32_A20NEON. GCC supports -mcpu=cortex-a7 from 4.7 +ifeq ($(CONFIG_MARCH_ARM32_A20NEON),y) +$(call error_if_gcc_version_lt,4,7) +CFLAGS-$(call gcc_version_ge,4,7) += -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=vfpv4-d16 -mfpu=neon-vfpv4 -funsafe-math-optimizations +CXXFLAGS-$(call gcc_version_ge,4,7) += -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=vfpv4-d16 -mfpu=neon-vfpv4 -funsafe-math-optimizations +endif + $(eval $(call addlib,libarmmath)) LIBARMMATH_SRCS-$(CONFIG_ARCH_ARM_32) += $(CONFIG_UK_BASE)/arch/arm/divsi3.S LIBARMMATH_SRCS-$(CONFIG_ARCH_ARM_32) += $(CONFIG_UK_BASE)/arch/arm/ldivmod.S -- 2.17.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |