qemu-e2k/hw/acpi
Isaku Yamahata 0fd7432533 acpi/piix4: reinitialize acpi PM device on reset
Commit 6be8cf56bc made sure that SCI is enabled in PM1.CNT
on reset in acpi_only mode by modifying acpi_pm1_cnt_reset() and
that worked for q35 as expected.

The function was introduced by commit
  eaba51c573 (acpi, acpi_piix, vt82c686: factor out PM1_CNT logic)
that forgot to actually call it at piix4 reset time and as result
SCI_EN wasn't set as was expected by 6be8cf56bc in acpi_only mode.

So Windows crashes when it notices that SCI_EN is not set and FADT is
not providing information about how to enable it anymore.
Reproducer:
   qemu-system-x86_64 -enable-kvm -M pc-i440fx-6.0,smm=off -cdrom any_windows_10x64.iso

Fix it by calling acpi_pm1_cnt_reset() at piix4 reset time.

Occasionally this patch adds reset acpi PM related registers on
piix4 reset time and de-assert sci.
piix4_pm_realize() initializes acpi pm tmr, evt, cnt and gpe.
Reset them on device reset. pm_reset() in ich9.c correctly calls
corresponding reset functions.

Fixes: 6be8cf56bc (acpi/core: always set SCI_EN when SMM isn't supported)
Reported-by: Reinoud Zandijk <reinoud@NetBSD.org>
Co-developed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Message-Id: <8a5bbd19727045ec863523830078dd4ca63f6a9a.1616532563.git.isaku.yamahata@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-04-01 12:19:52 -04:00
..
acpi_interface.c
acpi-stub.c
acpi-x86-stub.c
aml-build-stub.c acpi: add aml builder stubs 2020-10-21 11:36:19 +02:00
aml-build.c acpi: add aml_to_decimalstring() and aml_call6() helpers 2021-03-22 18:58:19 -04:00
bios-linker-loader.c
core.c acpi/core: always set SCI_EN when SMM isn't supported 2021-02-23 10:58:42 -05:00
cpu_hotplug.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
cpu.c qapi: Use QAPI_LIST_APPEND in trivial cases 2021-01-28 08:08:45 +01:00
generic_event_device.c ACPI: Avoid infinite recursion when dump-vmstate 2020-11-12 14:13:59 +00:00
ghes.c acpi: Permit OEM ID and OEM table ID fields to be changed 2021-02-05 08:52:59 -05:00
hmat.c acpi: Permit OEM ID and OEM table ID fields to be changed 2021-02-05 08:52:59 -05:00
hmat.h acpi: Permit OEM ID and OEM table ID fields to be changed 2021-02-05 08:52:59 -05:00
ich9.c acpi/core: always set SCI_EN when SMM isn't supported 2021-02-23 10:58:42 -05:00
ipmi-stub.c
ipmi.c
Kconfig ACPI: Build related register address fields via hardware error fw_cfg blob 2020-05-14 15:03:09 +01:00
memory_hotplug.c qapi: Use QAPI_LIST_APPEND in trivial cases 2021-01-28 08:08:45 +01:00
meson.build meson: convert hw/acpi 2020-08-21 06:30:32 -04:00
nvdimm.c acpi: Permit OEM ID and OEM table ID fields to be changed 2021-02-05 08:52:59 -05:00
pci.c pci: introduce acpi-index property for PCI device 2021-03-22 18:58:19 -04:00
pcihp.c pci: acpi: ensure that acpi-index is unique 2021-03-22 18:58:19 -04:00
piix4.c acpi/piix4: reinitialize acpi PM device on reset 2021-04-01 12:19:52 -04:00
tco.c hw/acpi/tco: Remove unused definitions 2020-09-09 15:26:41 +02:00
tpm.c
trace-events pci: introduce acpi-index property for PCI device 2021-03-22 18:58:19 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
utils.c acpi: Set proper maximum size for "etc/acpi/rsdp" blob 2021-03-22 18:58:19 -04:00
vmgenid.c acpi: Permit OEM ID and OEM table ID fields to be changed 2021-02-05 08:52:59 -05:00