summaryrefslogtreecommitdiff
path: root/OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c')
-rw-r--r--OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c b/OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c
index 72620ba5fd..027912e0f7 100644
--- a/OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c
+++ b/OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c
@@ -20,11 +20,12 @@
#include <Library/IoLib.h>
#include <Library/PciLib.h>
#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
//
// PIIX4 Power Management Base Address
//
-UINT32 mPmba = 0xb000;
+STATIC UINT32 mPmba;
#define PCI_BAR_IO 0x1
#define ACPI_TIMER_FREQUENCY 3579545
@@ -56,6 +57,8 @@ AcpiTimerLibConstructor (
ASSERT (mPmba & PCI_BAR_IO);
mPmba &= ~PCI_BAR_IO;
} else {
+ mPmba = PcdGet16 (PcdAcpiPmBaseAddress);
+
PciAndThenOr32 (PCI_LIB_ADDRESS (0,Device,3,0x40),
(UINT32) ~0xfc0, mPmba);
PciOr8 (PCI_LIB_ADDRESS (0,Device,3,0x04), 0x01);