qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 6/8] hw/acpi/Kconfig: Introduce the ACPI_PIIX4 c


From: BALATON Zoltan
Subject: Re: [Qemu-devel] [PATCH 6/8] hw/acpi/Kconfig: Introduce the ACPI_PIIX4 config
Date: Tue, 19 Mar 2019 23:47:22 +0100 (CET)
User-agent: Alpine 2.21.9999 (BSF 287 2018-06-16)

On Tue, 19 Mar 2019, Igor Mammedov wrote:
On Sun, 17 Mar 2019 01:22:57 +0100
Philippe Mathieu-Daudé <address@hidden> wrote:

The PIIX4 chipset is a generic southbridge and can be used by
non-X86 hardware. Introduce the ACPI_PIIX4 Kconfig.
Hardware that requires ACPI but doesn't need the PIIX4 chipset
won't compile it.
I know that mips somewhat depends on piix but does it actually
implements, uses or plans to use ACPI in practice?

I think it does not compile without due to PIIX depends on it. Likewise for VT82C686. I get errors about undefined functions when linking a ppc board using it (not yet upstream) without this patch:
http://patchwork.ozlabs.org/patch/1054018/

../hw/isa/vt82c686.o: In function `vt82c686b_pm_realize':
hw/isa/vt82c686.c:375: undefined reference to `apm_init'
hw/isa/vt82c686.c:381: undefined reference to `acpi_pm_tmr_init'
hw/isa/vt82c686.c:382: undefined reference to `acpi_pm1_evt_init'
../hw/isa/vt82c686.o: In function `pm_update_sci':
hw/isa/vt82c686.c:195: undefined reference to `acpi_pm1_evt_get_sts'
../hw/isa/vt82c686.o: In function `vt82c686b_pm_realize':
hw/isa/vt82c686.c:383: undefined reference to `acpi_pm1_cnt_init'
../hw/isa/vt82c686.o: In function `pm_update_sci':
hw/isa/vt82c686.c:203: undefined reference to `acpi_pm_tmr_update'
../hw/isa/vt82c686.o:(.data.rel+0x370): undefined reference to `vmstate_apm'
collect2: error: ld returned 1 exit status

Regards,
BALATON Zoltan

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 default-configs/mips-softmmu-common.mak | 2 +-
 hw/acpi/Kconfig                         | 7 +++++++
 hw/acpi/Makefile.objs                   | 3 ++-
 hw/i386/Kconfig                         | 2 ++
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/default-configs/mips-softmmu-common.mak 
b/default-configs/mips-softmmu-common.mak
index 6f49a3a8c7..21c6e3cbe3 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -16,7 +16,7 @@ CONFIG_PCSPK=y
 CONFIG_I8042=y
 CONFIG_FDC=y
 CONFIG_ACPI=y
-CONFIG_ACPI_X86=y
+CONFIG_ACPI_PIIX4=y
 CONFIG_ACPI_MEMORY_HOTPLUG=y
 CONFIG_ACPI_NVDIMM=y
 CONFIG_ACPI_CPU_HOTPLUG=y
diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig
index b18ddb06da..10f24f3b41 100644
--- a/hw/acpi/Kconfig
+++ b/hw/acpi/Kconfig
@@ -8,6 +8,13 @@ config ACPI_X86
     select ACPI_CPU_HOTPLUG
     select ACPI_MEMORY_HOTPLUG

+config ACPI_PIIX4
+    bool
+    select ACPI
+    select ACPI_NVDIMM
+    select ACPI_CPU_HOTPLUG
+    select ACPI_MEMORY_HOTPLUG
+
 config ACPI_ICH9
     bool
     select ACPI
diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs
index dff94d35e7..c5c2c1cf03 100644
--- a/hw/acpi/Makefile.objs
+++ b/hw/acpi/Makefile.objs
@@ -1,4 +1,5 @@
-common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
+common-obj-$(CONFIG_ACPI) += core.o
+common-obj-$(CONFIG_ACPI_PIIX4) += piix4.o pcihp.o
 common-obj-$(CONFIG_ACPI_ICH9) += ich9.o tco.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
 common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 7fa5395894..64f9957047 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -69,6 +69,8 @@ config ISAPC
     # FIXME: it is in the same file as i440fx, and does not compile
     # if separated
     depends on I440FX
+    # QEMU isapc weirdness: it uses PIIX3 with ACPI features from PIIX4
+    select ACPI_PIIX4

 config Q35
     bool




reply via email to

[Prev in Thread] Current Thread [Next in Thread]