audk/OvmfPkg/PlatformPei
Gabriel Somlo e2ab3f819f OvmfPkg: Q35: Use correct ACPI PM control register:bit
On PIIX4, function 3, the PMREGMISC register at offset 0x80, with
default value 0x00 has its bit 0 (PMIOSE) indicate whether the PM
IO space given in the PMBA register (offset 0x40) is enabled.
PMBA must be configured *before* setting this bit.

On Q35/ICH9+, function 0x1f, the equivalent role is fulfilled by
bit 7 (ACPI_EN) in the ACPI Control Register (ACPI_CNTL) at offset
0x44, also with a default value of 0x00.

Currently, OVMF hangs when Q35 reboots, because while PMBA is reset
by QEMU, the register at offset 0x80 (matching PMREGMISC on PIIX4)
is not reset, since it has a completely different meaning on LPC.
As such, the power management initialization logic in OVMF finds
the "PMIOSE" bit enabled after a reboot and decides to skip setting
PMBA. This causes the ACPI timer tick routine to read a constant
value from the wrong register, which in turn causes the ACPI delay
loop to hang indefinitely.

This patch modifies the Base[Rom]AcpiTimerLib constructors and the
PlatformPei ACPI PM init routines to use ACPI_CNTL:ACPI_EN instead
of PMREGMISC:PMIOSE when running on Q35.

Reported-by: Reza Jelveh <reza.jelveh@tuhh.de>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17076 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-26 19:06:07 +00:00
..
Cmos.c Update the copyright notice format 2010-04-28 12:43:04 +00:00
Cmos.h Update the copyright notice format 2010-04-28 12:43:04 +00:00
Fv.c OvmfPkg/PlatformPei: Allocate PEI FV as ACPI NVS if S3 is supported 2014-03-04 08:02:59 +00:00
MemDetect.c OvmfPkg: Fix VS2005 build warnings 2014-09-25 02:29:10 +00:00
Platform.c OvmfPkg: Q35: Use correct ACPI PM control register:bit 2015-03-26 19:06:07 +00:00
Platform.h OvmfPkg/PlatformPei: Detect S3 support for QEMU / KVM 2014-03-04 08:01:58 +00:00
PlatformPei.inf OvmfPkg: Add PCD for Host Bridge dev. ID (PcdOvmfHostBridgePciDevId) 2014-11-14 00:37:39 +00:00
Xen.c OvmfPkg/PlatformPei: Set PcdPciDisableBusEnumeration in InitializeXen 2014-02-01 21:22:36 +00:00
Xen.h OvmfPkg: define EFI_XEN_OVMF_INFO 2013-12-08 01:35:52 +00:00