On 03/26/15 19:32, Gabriel L. Somlo wrote: > 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. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Gabriel Somlo <[email protected]> > Reported-by: Reza Jelveh <[email protected]> > Reviewed-by: Laszlo Ersek <[email protected]> > Reviewed-by: Jordan Justen <[email protected]> > --- > OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c | 24 ++++++++++------- > OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c | 24 ++++++++++------- > OvmfPkg/PlatformPei/Platform.c | 31 > ++++++++++++---------- > 3 files changed, 45 insertions(+), 34 deletions(-)
I moved the Reported-by tag above the other tags (to reflect the timeline). In addition, yesterday I reproduced the issue on Q35, and now I've tested the fix on Q35, and I've also confirmed that PIIX4 continues to work fine. For that reason you'll find my Tested-by at the bottom as well. Committed to SVN as r17076. Thanks! Laszlo ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
