Skip to contentSkip to conversation

xen/arm: Kconfig: ACPI should depend on UEFI

PATCH In review Julien Grall 3 participants 8 messages Jul 5, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: Kconfig: ACPI should depend on UEFI

From: Julien Grall <[email protected]>

On Arm, it is not possible to use ACPI without UEFI. In fact disabling UEFI but not ACPI will lead to a compilation error:

ld: prelink.o: in function `acpi_os_get_root_pointer':
/builds/xen-project/people/andyhhp/xen/xen/drivers/acpi/osl.c:73:
undefined reference to `efi' /builds/xen-project/people/andyhhp/xen/xen/drivers/acpi/osl.c:73:(.init.text+0x8ac0):
relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `efi'

So make the dependency clear in the Kconfig.

This was spotted by the randconfig build in gitlab CI.

Fixes 12314be5749e ("xen/arm: make ARM_EFI selectable for Arm64")
---
 xen/arch/arm/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/Kconfig +2 -2
index c30f32457388..439cc94f3344 100644
@@ -63,11 +63,11 @@ source "arch/Kconfig"
 
 config ACPI
 	bool "ACPI (Advanced Configuration and Power Interface) Support (UNSUPPORTED)" if UNSUPPORTED
-	depends on ARM_64
+	depends on ARM_64 && ARM_EFI
 	---help---
 
 	  Advanced Configuration and Power Interface (ACPI) support for Xen is
-	  an alternative to device tree on ARM64.
+	  an alternative to device tree on ARM64. This requires UEFI.
 
 config ARM_EFI
 	bool "UEFI boot service support"
Signature · 1 line
2.40.1
#1 lore raw

xen/arch/arm/Kconfig source "arch/Kconfig" · line 66

Quoted 8 lines · Julien Grall
xen/arch/arm/Kconfig +1 -1
@@ -63,11 +63,11 @@ source "arch/Kconfig"
 
 config ACPI
 	bool "ACPI (Advanced Configuration and Power Interface) Support (UNSUPPORTED)" if UNSUPPORTED
-	depends on ARM_64
+	depends on ARM_64 && ARM_EFI

Wouldn't it make sense to drop the ARM_64 dependency then? It's now redundant, and it seems quite likely that if EFI was ever support for 32-bit, ACPI could then be supported there as well.

Jan

#2 lore raw

Hi Jan,

Quoted 5 lines · Jan Beulich
Quoted 4 lines · Julien Grall
xen/arch/arm/Kconfig +0 -0
@@ -63,11 +63,11 @@ source "arch/Kconfig"
 
Quoted 8 lines

xen/arch/arm/Kconfig source "arch/Kconfig" · line 66

Quoted 4 lines
xen/arch/arm/Kconfig +1 -1
  config ACPI
  	bool "ACPI (Advanced Configuration and Power Interface) Support (UNSUPPORTED)" if UNSUPPORTED
-	depends on ARM_64
+	depends on ARM_64 && ARM_EFI

Wouldn't it make sense to drop the ARM_64 dependency then? It's now redundant, and it seems quite likely that if EFI was ever support for 32-bit, ACPI could then be supported there as well.

I think so. I am not planning to resend a new version for that. So I will do it on commit and mention it in the commit message.

Cheers,

Signature · 1 line
Julien Grall
#3 lore raw
Quoted 16 lines · Julien Grall

Hi Jan,

Quoted 12 lines · Jan Beulich
Quoted 7 lines · Julien Grall
xen/arch/arm/Kconfig +0 -0
@@ -63,11 +63,11 @@ source "arch/Kconfig"

  config ACPI
      bool "ACPI (Advanced Configuration and Power Interface) Support (UNSUPPORTED)" if UNSUPPORTED -    depends on ARM_64
+    depends on ARM_64 && ARM_EFI

Wouldn't it make sense to drop the ARM_64 dependency then? It's now redundant, and it seems quite likely that if EFI was ever support for 32-bit, ACPI could then be supported there as well.

Quoted 1 line

I think so. I am not planning to resend a new version for that. So I will do it on commit and mention it in the commit message.

Actually no. It would be easier to add UEFI on Arm32 compare to adding ACPI. So it would be best to keep ARM_64 here at least for the time been.

Cheers,

Signature · 1 line
Julien Grall
#4 lore raw
In reply to Jan Beulich

Hi Jan,

Quoted 7 lines · Jan Beulich
Quoted 4 lines · Julien Grall
xen/arch/arm/Kconfig +0 -0
@@ -63,11 +63,11 @@ source "arch/Kconfig"
 
Quoted 8 lines
Quoted 4 lines

config ACPI
bool "ACPI (Advanced Configuration and Power Interface) Support (UNSUPPORTED)" if UNSUPPORTED
- depends on ARM_64
+ depends on ARM_64 && ARM_EFI

Wouldn't it make sense to drop the ARM_64 dependency then? It's now redundant, and it seems quite likely that if EFI was ever support for 32-bit, ACPI could then be supported there as well.

I think we need to keep it.
If we add one day EFI support on arm32, we will probably not add ACPI support anyway.

Cheers
Bertrand

Quoted 2 lines

Jan

#5 lore raw
Quoted 22 lines · Bertrand Marquis

Hi Jan,

Quoted 7 lines · Jan Beulich
Quoted 4 lines · Julien Grall
xen/arch/arm/Kconfig +0 -0
@@ -63,11 +63,11 @@ source "arch/Kconfig"
 
Quoted 8 lines
Quoted 4 lines

config ACPI
bool "ACPI (Advanced Configuration and Power Interface) Support (UNSUPPORTED)" if UNSUPPORTED
- depends on ARM_64
+ depends on ARM_64 && ARM_EFI

Wouldn't it make sense to drop the ARM_64 dependency then? It's now redundant, and it seems quite likely that if EFI was ever support for 32-bit, ACPI could then be supported there as well.

Quoted 2 lines

I think we need to keep it.
If we add one day EFI support on arm32, we will probably not add ACPI support anyway.

Sorry Julien I answered Jan before seeing your mail but I said the same :-)

Cheers
Bertrand

Quoted 6 lines

Cheers
Bertrand

Quoted 2 lines

Jan

Reviewed-by on v1 1/1
#6 lore raw
In reply to Julien Grall

Hi Julien,

Quoted 14 lines · Julien Grall

From: Julien Grall <[email protected]>

On Arm, it is not possible to use ACPI without UEFI. In fact disabling UEFI but not ACPI will lead to a compilation error:

ld: prelink.o: in function `acpi_os_get_root_pointer':
/builds/xen-project/people/andyhhp/xen/xen/drivers/acpi/osl.c:73:
undefined reference to `efi' /builds/xen-project/people/andyhhp/xen/xen/drivers/acpi/osl.c:73:(.init.text+0x8ac0):
relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `efi'

Quoted 6 lines

So make the dependency clear in the Kconfig.

This was spotted by the randconfig build in gitlab CI.

Fixes 12314be5749e ("xen/arm: make ARM_EFI selectable for Arm64")

Cheers
Bertrand

Quoted 25 lines

---
xen/arch/arm/Kconfig | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/Kconfig +0 -0
index c30f32457388..439cc94f3344 100644
@@ -63,11 +63,11 @@ source "arch/Kconfig"
 

config ACPI
bool "ACPI (Advanced Configuration and Power Interface) Support (UNSUPPORTED)" if UNSUPPORTED
- depends on ARM_64
+ depends on ARM_64 && ARM_EFI
---help---

Advanced Configuration and Power Interface (ACPI) support for Xen is

xen/arch/arm/Kconfig +1 -1
-  an alternative to device tree on ARM64.
+  an alternative to device tree on ARM64. This requires UEFI.

config ARM_EFI
bool "UEFI boot service support"

Signature · 1 line
2.40.1
#7 lore raw

Hi,

Quoted 14 lines · Bertrand Marquis
Quoted 14 lines · Julien Grall

From: Julien Grall <[email protected]>

On Arm, it is not possible to use ACPI without UEFI. In fact disabling UEFI but not ACPI will lead to a compilation error:

ld: prelink.o: in function `acpi_os_get_root_pointer':
/builds/xen-project/people/andyhhp/xen/xen/drivers/acpi/osl.c:73:
undefined reference to `efi' /builds/xen-project/people/andyhhp/xen/xen/drivers/acpi/osl.c:73:(.init.text+0x8ac0):
relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against undefined symbol `efi'

Quoted 8 lines
Quoted 6 lines

So make the dependency clear in the Kconfig.

This was spotted by the randconfig build in gitlab CI.

Fixes 12314be5749e ("xen/arm: make ARM_EFI selectable for Arm64")

Thanks. I have committed the patch.

Cheers,

Signature · 1 line
Julien Grall