Skip to contentSkip to conversation

arch/arm: add more cores (branch yem/aarch64-new-cores)

PATCH New Yann E. MORIN 3 participants 10 messages Dec 30, 2018 – Jan 18, 2019

lore
Share & tools
lore
#0 lore raw

cover arch/arm: add more cores (branch yem/aarch64-new-cores)

Hello All!

This small series:
- fixes the conditions under which some of the existing cores may be selected,
- extends our choice of ARM cores, that were added with gcc-8.

Those four new cores have been verified to at least alow building the toolchain, with uClibc-ng, glibc, and musl:

    https://gitlab.com/ymorin/buildroot/pipelines/41680241

Regards,
Yann E. MORIN.

The following changes since commit cd6c2f41ef0e58d0b797039512d5c0f07c7239ab

package/php: bump version to 7.3.0 (2018-12-28 14:04:00 +0100)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to c6db960a999901cb0beaac68b264e7c9b82e8891

arch/arm: add an armv8.3a core (2018-12-30 15:15:44 +0100)

----------------------------------------------------------------
Yann E. MORIN (4):
arch/arm: drop useless conditional dependencies for 64-bit-only cores arch/arm: restrict more armv8a cores to aarch64
arch/arm: add armv8.2a cortex-based cores
arch/arm: add an armv8.3a core

 arch/Config.in.arm | 55 ++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 39 insertions(+), 16 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/4 arch/arm: drop useless conditional dependencies for 64-bit-only cores

Those cores are already guarded by a 64-bit-only condition, so they can't even select additional options in non-64-bit mode anyway...

Cc Thomas Petazzoni <[email protected]>
---
 arch/Config.in.arm | 9 ---------
 1 file changed, 9 deletions(-)
arch/Config.in.arm +0 -9
index f0488b4685..83813d96f5 100644
@@ -440,27 +440,18 @@ if BR2_ARCH_IS_64
 comment "armv8.1a cores"
 config BR2_thunderx2t99
 	bool "thunderx2t99"
-	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderx2t99p1
 	bool "thunderx2t99p1"
-	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_vulcan
 	bool "vulcan"
-	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
Signature · 1 line
2.14.1
#2 lore raw

PATCH 1/4 arch/arm: drop useless conditional dependencies for 64-bit-only cores

Hello,

Quoted 8 lines · Yann E. MORIN

Those cores are already guarded by a 64-bit-only condition, so they can't even select additional options in non-64-bit mode anyway...

Cc Thomas Petazzoni <[email protected]>
---
 arch/Config.in.arm | 9 ---------
 1 file changed, 9 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/4 arch/arm: restrict more armv8a cores to aarch64

In reply to Yann E. MORIN

Since gcc-8, falkor and qdf24xx have been available only as AArch64.

Although we could support building in 32-bit for older gcc versions, we decided not to, in the sake of simplicity.

Cc Thomas Petazzoni <[email protected]>
---
 arch/Config.in.arm | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
arch/Config.in.arm +1 -7
index 83813d96f5..bc1bb26582 100644
@@ -376,25 +376,19 @@ config BR2_exynos_m1
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
+if BR2_ARCH_IS_64
 config BR2_falkor
 	bool "falkor"
-	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_qdf24xx
 	bool "qdf24xx"
-	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
-	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_6
-if BR2_ARCH_IS_64
 config BR2_thunderx
 	bool "thunderx"
 	select BR2_ARM_CPU_HAS_FP_ARMV8
Signature · 1 line
2.14.1
#4 lore raw

PATCH 2/4 arch/arm: restrict more armv8a cores to aarch64

Hello,

Quoted 10 lines · Yann E. MORIN

Since gcc-8, falkor and qdf24xx have been available only as AArch64.

Although we could support building in 32-bit for older gcc versions, we decided not to, in the sake of simplicity.

Cc Thomas Petazzoni <[email protected]>
---
 arch/Config.in.arm | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Applied to master after reworking the commit log to mention the exact gcc commit that dropped falkor and qdf24xx availability for ARM32. Since it was due to the released HW never supporting AArch32, it does not make sense to support these cores in AArch32 with older gcc versions.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 2/4 arch/arm: restrict more armv8a cores to aarch64

In reply to Yann E. MORIN
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Since gcc-8, falkor and qdf24xx have been available only as AArch64. Although we could support building in 32-bit for older gcc versions, we decided not to, in the sake of simplicity.

Cc Thomas Petazzoni <[email protected]>

Committed to 2018.02.x and 2018.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 3/4 arch/arm: add armv8.2a cortex-based cores

In reply to Yann E. MORIN

The armv8.2a generation is a cumulative extension to armv8.1a.

Since gcc correctly enables the appropriate extensions based on the core name, we don't really need to introduce a separate config for armv8.2a, and we can piggyback on armv8a.

In theory, gcc supports those cores in arm mode. However, configuring gcc thusly generates a non-working gcc that constantly whines:
cc1: warning: switch -mcpu=cortex-a55 conflicts with -march=armv8.2-a switch

It is to be noted that the -march flag is internal to gcc. It is not something that Buildroot did set when configuring gcc; Buildroot only ever sets --with-cpu (not --with-arch).

Additionally, uClibc fails to build entirely (unsure if this is caused by the above, or if it is a separate issue, though), with:
#### Your compiler does not support TLS and you are trying to build uClibc-ng #### with NPTL support. Upgrade your binutils and gcc to versions which #### support TLS for your architecture. Do not contact uClibc-ng maintainers #### about this problem.

Glibc and musl have not been tested in arm mode, so maybe we could have a toolchain that eventually works (or at least, pretends to be working), but we decided it was not worth the effort.

Thus, we restrict those cores to AArch64 mode only.

Cc Thomas Petazzoni <[email protected]>

---
Notes: those few packages that have a cortex-dependent option have been checked to not require extending the list: at91bootstrap3, gst-omapfb, kodi, nvidia-tegra23, and openblas. Only kvm-unit-tests may need it, but it has not been done by lack of testing possibility.

---
 arch/Config.in.arm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/Config.in.arm +26 -0
index bc1bb26582..e3c64d12ab 100644
@@ -451,6 +451,28 @@ config BR2_vulcan
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 endif # BR2_ARCH_IS_64
+
+if BR2_ARCH_IS_64
+comment "armv8.2a cores"
+config BR2_cortex_a55
+	bool "cortex-A55"
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
+config BR2_cortex_a75
+	bool "cortex-A75"
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
+config BR2_cortex_a75_a55
+	bool "cortex-A75/A55 big.LITTLE"
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
+endif # BR2_ARCH_IS_64
 endchoice
 
 config BR2_ARM_ENABLE_NEON
@@ -796,6 +818,10 @@ config BR2_GCC_TARGET_CPU
 	default "thunderx2t99"	if BR2_thunderx2t99
 	default "thunderx2t99p1"	if BR2_thunderx2t99p1
 	default "vulcan"	if BR2_vulcan
+	# armv8.2a
+	default "cortex-a55"	if BR2_cortex_a55
+	default "cortex-a75"	if BR2_cortex_a75
+	default "cortex-a75.cortex-a55"	if BR2_cortex_a75_a55
 
 config BR2_GCC_TARGET_ABI
 	default "aapcs-linux"	if BR2_arm || BR2_armeb
Signature · 1 line
2.14.1
#7 lore raw

PATCH 3/4 arch/arm: add armv8.2a cortex-based cores

Hello,

Quoted 30 lines · Yann E. MORIN

The armv8.2a generation is a cumulative extension to armv8.1a.

Since gcc correctly enables the appropriate extensions based on the core name, we don't really need to introduce a separate config for armv8.2a, and we can piggyback on armv8a.

In theory, gcc supports those cores in arm mode. However, configuring gcc thusly generates a non-working gcc that constantly whines:
cc1: warning: switch -mcpu=cortex-a55 conflicts with -march=armv8.2-a switch

It is to be noted that the -march flag is internal to gcc. It is not something that Buildroot did set when configuring gcc; Buildroot only ever sets --with-cpu (not --with-arch).

Additionally, uClibc fails to build entirely (unsure if this is caused by the above, or if it is a separate issue, though), with:
#### Your compiler does not support TLS and you are trying to build uClibc-ng #### with NPTL support. Upgrade your binutils and gcc to versions which #### support TLS for your architecture. Do not contact uClibc-ng maintainers #### about this problem.

Glibc and musl have not been tested in arm mode, so maybe we could have a toolchain that eventually works (or at least, pretends to be working), but we decided it was not worth the effort.

Thus, we restrict those cores to AArch64 mode only.

Cc Thomas Petazzoni <[email protected]>
Quoted 8 lines

---
Notes: those few packages that have a cortex-dependent option have been checked to not require extending the list: at91bootstrap3, gst-omapfb, kodi, nvidia-tegra23, and openblas. Only kvm-unit-tests may need it, but it has not been done by lack of testing possibility.

---
 arch/Config.in.arm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

PATCH 4/4 arch/arm: add an armv8.3a core

In reply to Yann E. MORIN

The armv8.3a generation is a cumulative extension to armv8.2a.

Since gcc correctly enables the appropriate extensions based on the core name, we don't really need to introduce a separate config for armv8.3a, and we can piggyback on armv8a.

This new core is AArch64 only.

Cc Thomas Petazzoni <[email protected]>
---
 arch/Config.in.arm | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/Config.in.arm +12 -0
index e3c64d12ab..a9972978d4 100644
@@ -473,6 +473,16 @@ config BR2_cortex_a75_a55
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 endif # BR2_ARCH_IS_64
+
+if BR2_ARCH_IS_64
+comment "armv8.3a cores"
+config BR2_saphira
+	bool "saphira"
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
+endif # BR2_ARCH_IS_64
 endchoice
 
 config BR2_ARM_ENABLE_NEON
@@ -822,6 +832,8 @@ config BR2_GCC_TARGET_CPU
 	default "cortex-a55"	if BR2_cortex_a55
 	default "cortex-a75"	if BR2_cortex_a75
 	default "cortex-a75.cortex-a55"	if BR2_cortex_a75_a55
+	# armv8.3a
+	default "saphira"	if BR2_saphira
 
 config BR2_GCC_TARGET_ABI
 	default "aapcs-linux"	if BR2_arm || BR2_armeb
Signature · 1 line
2.14.1
#9 lore raw

PATCH 4/4 arch/arm: add an armv8.3a core

Hello,

Quoted 6 lines · Yann E. MORIN

The armv8.3a generation is a cumulative extension to armv8.2a.

Since gcc correctly enables the appropriate extensions based on the core name, we don't really need to introduce a separate config for armv8.3a, and we can piggyback on armv8a.

Quoted 7 lines

This new core is AArch64 only.

Cc Thomas Petazzoni <[email protected]>
---
 arch/Config.in.arm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com