Skip to contentSkip to conversation

arm64/sve: Document firmware support requirements in Kconfig

PATCH New Dave Martin 3 participants 5 messages Mar 21, 2018 – Mar 23, 2018 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64/sve: Document firmware support requirements in Kconfig

Use of SVE by EL2 and below requires explicit support in the firmware. There is no means to hide the presence of SVE from EL2, so a kernel configured with CONFIG_ARM64_SVE=y will typically not work correctly on SVE capable hardware unless the firmware does include the appropriate support.

This is not expected to pose a problem in the wild, since platform integrators are responsible for ensuring that they ship up-to-date firmware to support their hardware. However, developers may hit the issue when using mismatched compoments.

In order to draw attention to the issue and how to solve it, this patch adds some Kconfig text giving a brief explanation and details of compatible firmware versions.

---

No functional change, but it would be good to get this explanatory text merged since developers who try Linux on SVE-enabled models may hit this problem, and fixed versions of ARM TF and the bootwrapper are now available.

 arch/arm64/Kconfig | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/Kconfig +17 -0
index 7381eeb..e6fa47b 100644
@@ -1104,6 +1104,23 @@ config ARM64_SVE
 
 	  To enable use of this extension on CPUs that implement it, say Y.
 
+	  Note that for architectural reasons, firmware _must_ implement SVE
+	  support when running on SVE capable hardware.  The required support
+	  is present in:
+
+	    * version 1.5 and later of the ARM Trusted Firmware
+	    * the AArch64 boot wrapper since commit 5e1261e08abf
+	      ("bootwrapper: SVE: Enable SVE for EL2 and below").
+
+	  For other firmware implementations, consult the firware documentation
+	  or vendor.
+
+	  If you need the kernel to boot on SVE-capable hardware with broken
+	  firmware, you may need to say N here until you get your firmware
+	  fixed.  Otherwise, you may experience firmware panics or lockups when
+	  booting the kernel.  If unsure and you are not observing these
+	  symptoms, you should assume that it is safe to say Y.
+
 config ARM64_MODULE_CMODEL_LARGE
 	bool
 
Signature · 1 line
2.1.4
maintainer
#1 lore raw

PATCH 1/1 arm64/sve: Document firmware support requirements in Kconfig

Quoted 14 lines · Dave P Martin
arch/arm64/Kconfig +6 -0
index 7381eeb..e6fa47b 100644
@@ -1104,6 +1104,23 @@ config ARM64_SVE
 
 	  To enable use of this extension on CPUs that implement it, say Y.
 
+	  Note that for architectural reasons, firmware _must_ implement SVE
+	  support when running on SVE capable hardware.  The required support
+	  is present in:
+
+	    * version 1.5 and later of the ARM Trusted Firmware
+	    * the AArch64 boot wrapper since commit 5e1261e08abf

arch/arm64/Kconfig config ARM64_SVE · line 1122

Quoted 10 lines
arch/arm64/Kconfig +10 -0
+	      ("bootwrapper: SVE: Enable SVE for EL2 and below").
+
+	  For other firmware implementations, consult the firware documentation
+	  or vendor.
+
+	  If you need the kernel to boot on SVE-capable hardware with broken
+	  firmware, you may need to say N here until you get your firmware
+	  fixed.  Otherwise, you may experience firmware panics or lockups when
+	  booting the kernel.  If unsure and you are not observing these
+	  symptoms, you should assume that it is safe to say Y.

It's a shame that we can't detect this architecturally but the alternative would be to ask the firmware to describe the presence of SVE via DT or ACPI (which I don't particularly like since it's a CPU feature rather than an SoC one).

I'm personally fine with the warning in Kconfig.

#2 lore raw

PATCH 1/1 arm64/sve: Document firmware support requirements in Kconfig

Quoted 22 lines · Catalin Marinas
Quoted 21 lines · Dave P Martin
arch/arm64/Kconfig +13 -0
index 7381eeb..e6fa47b 100644
@@ -1104,6 +1104,23 @@ config ARM64_SVE
 
 	  To enable use of this extension on CPUs that implement it, say Y.
 
+	  Note that for architectural reasons, firmware _must_ implement SVE
+	  support when running on SVE capable hardware.  The required support
+	  is present in:
+
+	    * version 1.5 and later of the ARM Trusted Firmware
+	    * the AArch64 boot wrapper since commit 5e1261e08abf
+	      ("bootwrapper: SVE: Enable SVE for EL2 and below").
+
+	  For other firmware implementations, consult the firware documentation
+	  or vendor.
+
+	  If you need the kernel to boot on SVE-capable hardware with broken
+	  firmware, you may need to say N here until you get your firmware
Quoted 8 lines

arch/arm64/Kconfig config ARM64_SVE · line 1122

Quoted 3 lines
arch/arm64/Kconfig +3 -0
+	  fixed.  Otherwise, you may experience firmware panics or lockups when
+	  booting the kernel.  If unsure and you are not observing these
+	  symptoms, you should assume that it is safe to say Y.

It's a shame that we can't detect this architecturally but the alternative would be to ask the firmware to describe the presence of SVE via DT or ACPI (which I don't particularly like since it's a CPU feature rather than an SoC one).

That was my view also. We could have done that, but it would set an undesirable precedent, given that this shouldn't apply to real platforms.

We could revisit this later if necessary.

Quoted 3 lines

I'm personally fine with the warning in Kconfig.

Thanks, I'll repost with the typo fix pointed out by Suzuki.

Cheers
---Dave

#3 lore raw

PATCH 1/1 arm64/sve: Document firmware support requirements in Kconfig

In reply to Dave Martin
Quoted 33 lines · Dave Martin

Use of SVE by EL2 and below requires explicit support in the firmware. There is no means to hide the presence of SVE from EL2, so a kernel configured with CONFIG_ARM64_SVE=y will typically not work correctly on SVE capable hardware unless the firmware does include the appropriate support.

This is not expected to pose a problem in the wild, since platform integrators are responsible for ensuring that they ship up-to-date firmware to support their hardware. However, developers may hit the issue when using mismatched compoments.

In order to draw attention to the issue and how to solve it, this patch adds some Kconfig text giving a brief explanation and details of compatible firmware versions.

---

No functional change, but it would be good to get this explanatory text merged since developers who try Linux on SVE-enabled models may hit this problem, and fixed versions of ARM TF and the bootwrapper are now available.

  arch/arm64/Kconfig | 17 +++++++++++++++++
  1 file changed, 17 insertions(+)
arch/arm64/Kconfig +0 -0
index 7381eeb..e6fa47b 100644
@@ -1104,6 +1104,23 @@ config ARM64_SVE
 
  	  To enable use of this extension on CPUs that implement it, say Y.

arch/arm64/Kconfig config ARM64_SVE · line 1115

Quoted 10 lines
arch/arm64/Kconfig +9 -0
 
+	  Note that for architectural reasons, firmware _must_ implement SVE
+	  support when running on SVE capable hardware.  The required support
+	  is present in:
+
+	    * version 1.5 and later of the ARM Trusted Firmware
+	    * the AArch64 boot wrapper since commit 5e1261e08abf
+	      ("bootwrapper: SVE: Enable SVE for EL2 and below").
+
+	  For other firmware implementations, consult the firware documentation

minor nit: s/firware/firmware/

Suzuki

#4 lore raw

PATCH 1/1 arm64/sve: Document firmware support requirements in Kconfig

Quoted 36 lines · Suzuki K Poulose
Quoted 35 lines · Dave Martin

Use of SVE by EL2 and below requires explicit support in the firmware. There is no means to hide the presence of SVE from EL2, so a kernel configured with CONFIG_ARM64_SVE=y will typically not work correctly on SVE capable hardware unless the firmware does include the appropriate support.

This is not expected to pose a problem in the wild, since platform integrators are responsible for ensuring that they ship up-to-date firmware to support their hardware. However, developers may hit the issue when using mismatched compoments.

In order to draw attention to the issue and how to solve it, this patch adds some Kconfig text giving a brief explanation and details of compatible firmware versions.

---

No functional change, but it would be good to get this explanatory text merged since developers who try Linux on SVE-enabled models may hit this problem, and fixed versions of ARM TF and the bootwrapper are now available.

 arch/arm64/Kconfig | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/Kconfig +3 -0
index 7381eeb..e6fa47b 100644
@@ -1104,6 +1104,23 @@ config ARM64_SVE
 	  To enable use of this extension on CPUs that implement it, say Y.
+	  Note that for architectural reasons, firmware _must_ implement SVE
+	  support when running on SVE capable hardware.  The required support
+	  is present in:
Quoted 8 lines

arch/arm64/Kconfig config ARM64_SVE · line 1115

Quoted 6 lines
arch/arm64/Kconfig +6 -0
+
+	    * version 1.5 and later of the ARM Trusted Firmware
+	    * the AArch64 boot wrapper since commit 5e1261e08abf
+	      ("bootwrapper: SVE: Enable SVE for EL2 and below").
+
+	  For other firmware implementations, consult the firware documentation

minor nit: s/firware/firmware/

Thanks, I'll repost with that fixed.

Cheers
---Dave