From ac759060e6272c3e451808c9ba40927d76890f26 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Tue, 17 May 2016 16:08:23 +0200 Subject: [PATCH] OvmfPkg/AcpiTimerLib: don't use possibly unset PMBA register (PEI phase) We should store the right value to the PMBA (if the PMBA needs initialization) before setting mAcpiTimerIoAddr from the PMBA. Cc: Gabriel Somlo Cc: Jordan Justen Fixes: f122712b42af3d63902c2c141e90d2c200df6790 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen Tested-by: Gabriel Somlo --- OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c b/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c index c3c50c05d3..7144d75c73 100644 --- a/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c +++ b/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c @@ -63,8 +63,6 @@ AcpiTimerLibConstructor ( return RETURN_UNSUPPORTED; } - mAcpiTimerIoAddr = (PciRead32 (Pmba) & ~PMBA_RTE) + ACPI_TIMER_OFFSET; - // // Check to see if the Power Management Base Address is already enabled // @@ -81,6 +79,7 @@ AcpiTimerLibConstructor ( PciOr8 (AcpiCtlReg, AcpiEnBit); } + mAcpiTimerIoAddr = (PciRead32 (Pmba) & ~PMBA_RTE) + ACPI_TIMER_OFFSET; return RETURN_SUCCESS; } -- 2.39.2