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 <somlo@cmu.edu> Cc: Jordan Justen <jordan.l.justen@intel.com> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1333238 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>
This commit is contained in:
@@ -17,9 +17,10 @@
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/IoLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/TimerLib.h>
|
||||
|
||||
#include <OvmfPlatforms.h>
|
||||
|
||||
VOID
|
||||
AcpiPmControl (
|
||||
UINTN SuspendType
|
||||
@@ -27,8 +28,8 @@ AcpiPmControl (
|
||||
{
|
||||
ASSERT (SuspendType < 6);
|
||||
|
||||
IoBitFieldWrite16 (PcdGet16 (PcdAcpiPmBaseAddress) + 4, 10, 13, (UINT16) SuspendType);
|
||||
IoOr16 (PcdGet16 (PcdAcpiPmBaseAddress) + 4, BIT13);
|
||||
IoBitFieldWrite16 (PIIX4_PMBA_VALUE + 4, 10, 13, (UINT16) SuspendType);
|
||||
IoOr16 (PIIX4_PMBA_VALUE + 4, BIT13);
|
||||
CpuDeadLoop ();
|
||||
}
|
||||
|
||||
|
@@ -37,6 +37,3 @@
|
||||
DebugLib
|
||||
IoLib
|
||||
TimerLib
|
||||
|
||||
[Pcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdAcpiPmBaseAddress
|
Reference in New Issue
Block a user