[PATCH 02/40] x86: Allow any arch to generate ACPI tables

Simon Glass sjg at chromium.org
Wed Dec 1 17:02:36 CET 2021


These have sadly found their way to ARM now. Allow any arch to support
generating ACPI tables.

Disable this for the tools build.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/Kconfig                 |  2 ++
 arch/x86/Kconfig             |  9 ---------
 configs/tools-only_defconfig |  1 +
 lib/Kconfig                  | 18 ++++++++++++++++++
 4 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 3e2cc84ab2c..037ecff4b2f 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -148,6 +148,7 @@ config SANDBOX
 	select SYS_CACHE_SHIFT_4
 	select IRQ
 	select SUPPORT_EXTENSION_SCAN
+	select SUPPORT_ACPI
 	imply BITREVERSE
 	select BLOBLIST
 	imply LTO
@@ -210,6 +211,7 @@ config X86
 	select HAVE_PRIVATE_LIBGCC
 	select OF_CONTROL
 	select PCI
+	select SUPPORT_ACPI
 	select SUPPORT_OF_CONTROL
 	select SYS_CACHE_SHIFT_6
 	select TIMER
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index b8d8ee30838..7cbfd6c9720 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -770,15 +770,6 @@ config GENERATE_MP_TABLE
 	  multiprocessing as well as symmetric I/O interrupt handling with
 	  the local APIC and I/O APIC.
 
-config GENERATE_ACPI_TABLE
-	bool "Generate an ACPI (Advanced Configuration and Power Interface) table"
-	select QFW if QEMU
-	help
-	  The Advanced Configuration and Power Interface (ACPI) specification
-	  provides an open standard for device configuration and management
-	  by the operating system. It defines platform-independent interfaces
-	  for configuration and power management monitoring.
-
 config ACPI_GNVS_EXTERNAL
 	bool
 	help
diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
index f482c9a1c1b..0f918c492b2 100644
--- a/configs/tools-only_defconfig
+++ b/configs/tools-only_defconfig
@@ -17,6 +17,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_IP_DEFRAG=y
+# CONFIG_GENERATE_ACPI_TABLE is not set
 # CONFIG_ACPIGEN is not set
 CONFIG_AXI=y
 CONFIG_AXI_SANDBOX=y
diff --git a/lib/Kconfig b/lib/Kconfig
index 807a4c6ade0..34554af45dd 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -192,6 +192,24 @@ config LIB_HW_RAND
 
 endchoice
 
+config SUPPORT_ACPI
+	bool
+	help
+	  Enable this if your arch or board can support generating ACPI
+	  (Advanced Configuration and Power Interface) tables. In this case
+	  U-Boot can generate these tables and pass them to the Operating
+	  System.
+
+config GENERATE_ACPI_TABLE
+	bool "Generate an ACPI (Advanced Configuration and Power Interface) table"
+	depends on SUPPORT_ACPI
+	select QFW if QEMU
+	help
+	  The Advanced Configuration and Power Interface (ACPI) specification
+	  provides an open standard for device configuration and management
+	  by the operating system. It defines platform-independent interfaces
+	  for configuration and power management monitoring.
+
 config SPL_TINY_MEMSET
 	bool "Use a very small memset() in SPL"
 	help
-- 
2.34.0.rc2.393.gf8c9666880-goog



More information about the U-Boot mailing list