Skip to content

Commit

Permalink
reset PMBA and PMREGMISC PIIX4 registers.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gleb Natapov authored and Anthony Liguori committed Aug 29, 2012
1 parent 4bdb1a3 commit 4d09d37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hw/acpi_piix4.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 4d09d37

Please sign in to comment.