summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-05-17 16:08:23 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-05-17 20:46:59 +0200
commitac759060e6272c3e451808c9ba40927d76890f26 (patch)
treea63836e274353224d86bda4d5a8725d284897056 /OvmfPkg
parentb41ef32518095f783d0c2343b496cc857c6f3dff (diff)
downloadedk2-ac759060e6272c3e451808c9ba40927d76890f26.tar.gz
edk2-ac759060e6272c3e451808c9ba40927d76890f26.tar.bz2
edk2-ac759060e6272c3e451808c9ba40927d76890f26.zip
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 <somlo@cmu.edu> Cc: Jordan Justen <jordan.l.justen@intel.com> Fixes: f122712b42af3d63902c2c141e90d2c200df6790 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Gabriel Somlo <somlo@cmu.edu>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c3
1 files changed, 1 insertions, 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;
}