Przeglądaj źródła

rework FPU support for ARM again

With this commit I broke Kodi support for cubox-i:
4f93b213f2d3393fbb0b7ca200988f475e6cef83

I found following info regarding VFP and NEON:
http://community.arm.com/groups/tools/blog/2013/04/15/arm-cortex-a-processors-and-gcc-command-lines

Try to implement with this table in mind.
Waldemar Brodkorb 9 lat temu
rodzic
commit
21b8f713db

+ 0 - 1
target/arm/systems/raspberry-pi2

@@ -4,7 +4,6 @@ config ADK_TARGET_SYSTEM_RASPBERRY_PI2
 	select ADK_raspberry_pi2
 	select ADK_TARGET_LITTLE_ENDIAN
 	select ADK_CPU_CORTEX_A7
-	select ADK_TARGET_CPU_WITH_NEON
 	select ADK_TARGET_BOARD_BCM28XX
 	select ADK_TARGET_WITH_VGA
 	select ADK_TARGET_WITH_SERIAL

+ 0 - 1
target/arm/systems/solidrun-imx6

@@ -4,7 +4,6 @@ config ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
 	select ADK_solidrun_imx6
 	select ADK_TARGET_LITTLE_ENDIAN
 	select ADK_CPU_CORTEX_A9
-	select ADK_TARGET_CPU_WITH_NEON
 	select ADK_TARGET_WITH_VGA
 	select ADK_TARGET_WITH_SERIAL
 	select ADK_TARGET_WITH_CPU_FREQ

+ 20 - 0
target/config/Config.in.cpu

@@ -77,22 +77,40 @@ config ADK_CPU_CORTEX_M4
 	bool
 	select ADK_TARGET_WITH_LT
 
+config ADK_CPU_CORTEX_A5
+	bool
+	select ADK_TARGET_WITH_NPTL
+	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_CPU_WITH_FPU_VFPV3
+	select ADK_TARGET_CPU_WITH_NEON
+
 config ADK_CPU_CORTEX_A7
 	bool
 	select ADK_TARGET_WITH_NPTL
 	select ADK_TARGET_WITH_MMU
 	select ADK_TARGET_CPU_WITH_FPU_VFPV4
+	select ADK_TARGET_CPU_WITH_NEON
 
 config ADK_CPU_CORTEX_A8
 	bool
 	select ADK_TARGET_WITH_NPTL
 	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_CPU_WITH_FPU_VFPV3
+	select ADK_TARGET_CPU_WITH_NEON
 
 config ADK_CPU_CORTEX_A9
 	bool
 	select ADK_TARGET_WITH_NPTL
 	select ADK_TARGET_WITH_MMU
 	select ADK_TARGET_CPU_WITH_FPU_VFPV3
+	select ADK_TARGET_CPU_WITH_NEON
+
+config ADK_CPU_CORTEX_A15
+	bool
+	select ADK_TARGET_WITH_NPTL
+	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_CPU_WITH_FPU_VFPV4
+	select ADK_TARGET_CPU_WITH_NEON
 
 config ADK_CPU_CORTEX_A53
 	bool
@@ -306,9 +324,11 @@ config ADK_TARGET_GCC_CPU
 	default "arm1176jzf-s" if ADK_CPU_ARM1176JZF_S
 	default "arm926ej-s" if ADK_CPU_ARM926EJ_S
 	default "armv8-a" if ADK_CPU_ARMV8
+	default "cortex-a5" if ADK_CPU_CORTEX_A5
 	default "cortex-a7" if ADK_CPU_CORTEX_A7
 	default "cortex-a8" if ADK_CPU_CORTEX_A8
 	default "cortex-a9" if ADK_CPU_CORTEX_A9
+	default "cortex-a15" if ADK_CPU_CORTEX_A15
 	default "cortex-a53" if ADK_CPU_CORTEX_A53
 	default "cortex-a57" if ADK_CPU_CORTEX_A57
 	default "cortex-m3" if ADK_CPU_CORTEX_M3

+ 6 - 0
target/config/Config.in.fpu.choice

@@ -1,3 +1,9 @@
 # This file is part of the OpenADK project. OpenADK is copyrighted
 # material, please see the LICENCE file in the top-level directory.
 
+config ADK_TARGET_ARCH_ARM_WITH_NEON
+	bool "enable NEON SIMD support"
+	depends on ADK_TARGET_ARCH_ARM
+	default n
+	help
+	  Enable support for NEON SIMD CPU extensions.

+ 10 - 4
target/config/Config.in.fpu.default

@@ -4,7 +4,13 @@
 config ADK_TARGET_FPU
 	string
 	depends on ADK_TARGET_ARCH_ARM
-	default "neon" if ADK_TARGET_CPU_WITH_NEON
-	default "vfp" if ADK_TARGET_CPU_WITH_FPU_VFP
-	default "vfpv3" if ADK_TARGET_CPU_WITH_FPU_VFPV3
-	default "vfpv4" if ADK_TARGET_CPU_WITH_FPU_VFPV4
+	default "vfpv3-fp16" if ADK_CPU_CORTEX_A5 && !ADK_TARGET_ARCH_ARM_WITH_NEON
+	default "vfpv4" if ADK_CPU_CORTEX_A7 && !ADK_TARGET_ARCH_ARM_WITH_NEON
+	default "vfpv3" if ADK_CPU_CORTEX_A8 && !ADK_TARGET_ARCH_ARM_WITH_NEON
+	default "vfpv3-fp16" if ADK_CPU_CORTEX_A9 && !ADK_TARGET_ARCH_ARM_WITH_NEON
+	default "vfpv4" if ADK_CPU_CORTEX_A15 && !ADK_TARGET_ARCH_ARM_WITH_NEON
+	default "neon-fp16" if ADK_CPU_CORTEX_A5 && ADK_TARGET_ARCH_ARM_WITH_NEON
+	default "neon-vfpv4" if ADK_CPU_CORTEX_A7 && ADK_TARGET_ARCH_ARM_WITH_NEON
+	default "neon" if ADK_CPU_CORTEX_A8 && ADK_TARGET_ARCH_ARM_WITH_NEON
+	default "neon-fp16" if ADK_CPU_CORTEX_A9 && ADK_TARGET_ARCH_ARM_WITH_NEON
+	default "neon-vfpv4" if ADK_CPU_CORTEX_A15 && ADK_TARGET_ARCH_ARM_WITH_NEON

+ 2 - 2
target/linux/config/Config.in.kernel

@@ -198,11 +198,11 @@ config ADK_KERNEL_VFPv4
 
 config ADK_KERNEL_NEON
 	bool
-	default y if ADK_TARGET_CPU_WITH_NEON
+	default y if ADK_TARGET_ARCH_ARM_WITH_NEON
 
 config ADK_KERNEL_MODE_NEON
 	bool
-	default y if ADK_TARGET_CPU_WITH_NEON
+	default y if ADK_TARGET_ARCH_ARM_WITH_NEON
 
 config ADK_TARGET_NO_CMDLINE
 	bool "Do not builtin any kernel cmdline"