aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2012-08-07 15:52:03 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2012-08-29 09:30:31 -0500
commit4d09d37c6aa9a02b44b1fdb6268820fab92499bd (patch)
treed3215ac7632fdd4da9eec44a2e29510f501858e7
parent4bdb1a3059d7d3a931de0748a2eec39a0ab41b4e (diff)
downloadqemu-arm-4d09d37c6aa9a02b44b1fdb6268820fab92499bd.tar.gz
reset PMBA and PMREGMISC PIIX4 registers.
The bug causes Windows + OVMF hang after reboot since OVMF checks PMREGMISC to see if IO space is enabled and skip configuration if it is. Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/acpi_piix4.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 72d6e5c904..c56220b368 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -352,6 +352,9 @@ static void piix4_reset(void *opaque)
pci_conf[0x5a] = 0;
pci_conf[0x5b] = 0;
+ pci_conf[0x40] = 0x01; /* PM io base read only bit */
+ pci_conf[0x80] = 0;
+
if (s->kvm_enabled) {
/* Mark SMM as already inited (until KVM supports SMM). */
pci_conf[0x5B] = 0x02;
@@ -391,8 +394,6 @@ static int piix4_pm_initfn(PCIDevice *dev)
pci_conf[0x09] = 0x00;
pci_conf[0x3d] = 0x01; // interrupt pin 1
- pci_conf[0x40] = 0x01; /* PM io base read only bit */
-
/* APM */
apm_init(&s->apm, apm_ctrl_changed, s);