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: Thu, 21 Mar 2019 15:32:13 +0100 (CET)
User-agent: Alpine 2.21.9999 (BSF 287 2018-06-16)

On Thu, 21 Mar 2019, Igor Mammedov wrote:
On Tue, 19 Mar 2019 23:47:22 +0100 (CET)
BALATON Zoltan <address@hidden> wrote:

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
yep, looks like for piix_pm we need to pull in pci/cpu/mem and nvdimm
stuff even if it's not going to be used

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'

If you a going to reuse vt82c686 then following patch should help


diff --git a/default-configs/mips-softmmu-common.mak 
b/default-configs/mips-softmmu-common.mak
index 0795d52..9c2cf15 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -16,10 +16,11 @@ CONFIG_PCSPK=y
CONFIG_PCKBD=y
CONFIG_FDC=y
CONFIG_ACPI=y
-CONFIG_ACPI_X86=y
-CONFIG_ACPI_MEMORY_HOTPLUG=y
-CONFIG_ACPI_NVDIMM=y
-CONFIG_ACPI_CPU_HOTPLUG=y
+CONFIG_ACPI_GENERIC_HW=y
+#CONFIG_ACPI_X86=y
+#CONFIG_ACPI_MEMORY_HOTPLUG=y
+#CONFIG_ACPI_NVDIMM=y
+#CONFIG_ACPI_CPU_HOTPLUG=y
CONFIG_APM=y
CONFIG_I8257=y
CONFIG_PIIX4=y
diff --git a/dtc b/dtc
--- a/dtc
+++ b/dtc
@@ -1 +1 @@
-Subproject commit 88f18909db731a627456f26d779445f84e449536
+Subproject commit 88f18909db731a627456f26d779445f84e449536-dirty
diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig
index eca3bee..319707f 100644
--- a/hw/acpi/Kconfig
+++ b/hw/acpi/Kconfig
@@ -4,10 +4,14 @@ config ACPI
config ACPI_X86
    bool
    select ACPI
+    select ACPI_GENERIC_HW
    select ACPI_NVDIMM
    select ACPI_CPU_HOTPLUG
    select ACPI_MEMORY_HOTPLUG

+config ACPI_GENERIC_HW
+    bool
+
config ACPI_X86_ICH
    bool
    select ACPI_X86
diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs
index ba93c5b..2b524bd 100644
--- a/hw/acpi/Makefile.objs
+++ b/hw/acpi/Makefile.objs
@@ -1,12 +1,13 @@
ifeq ($(CONFIG_ACPI),y)
-common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
+common-obj-$(CONFIG_ACPI_GENERIC_HW) += core.o
+common-obj-$(CONFIG_ACPI_X86) += piix4.o pcihp.o
common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o
common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o
common-obj-$(CONFIG_ACPI_VMGENID) += vmgenid.o
-common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o
+common-obj-$(call lnot,$(CONFIG_ACPI_GENERIC_HW)) += acpi-stub.o

common-obj-y += acpi_interface.o
common-obj-y += bios-linker-loader.o


../hw/isa/vt82c686.o:(.data.rel+0x370): undefined reference to `vmstate_apm'
collect2: error: ld returned 1 exit status

for that you need to include CONFIG_APM

The simple patch I've submitted before fixed that for me so I don't know what to do with the above. I'll let you sort this out then adapt to what ends up in master. Until then I'm happy with my patch.

Regards,
BALATON Zoltan


reply via email to

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