From b2f4da3956debf656279a0836500b6989a85e276 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Mon, 9 May 2016 19:26:37 +0200 Subject: OvmfPkg: replace PcdAcpiPmBaseAddress with PIIX4_PMBA_VALUE In the next patches, we'll differentiate the PMBA IO port address that we program on PIIX4 vs. Q35. Normally we'd just turn PcdAcpiPmBaseAddress into a dynamic PCD. However, because we need this value in BaseRomAcpiTimerLib too (which cannot access RAM and dynamic PCDs), it must remain a build time constant. We will introduce its Q35 counterpart later. As first step, replace the PCD with a new macro in "OvmfPlatforms.h"; Jordan prefers the latter to fixed PCDs in this instance. Cc: Gabriel Somlo Cc: Jordan Justen Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1333238 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen Tested-by: Gabriel Somlo --- OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c') diff --git a/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c b/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c index 5164769f60..c46055a09b 100644 --- a/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c +++ b/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c @@ -16,7 +16,6 @@ #include #include #include -#include #include /** @@ -67,9 +66,9 @@ AcpiTimerLibConstructor ( if ((PciRead8 (AcpiCtlReg) & AcpiEnBit) == 0) { // // If the Power Management Base Address is not programmed, - // then program the Power Management Base Address from a PCD. + // then program it now. // - PciAndThenOr32 (Pmba, (UINT32) ~0xFFC0, PcdGet16 (PcdAcpiPmBaseAddress)); + PciAndThenOr32 (Pmba, (UINT32) ~0xFFC0, PIIX4_PMBA_VALUE); // // Enable PMBA I/O port decodes -- cgit v1.2.3