diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-05-09 20:05:18 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-05-17 20:48:35 +0200 |
commit | 07d3ba07709d8aa417f5f887b84ec78a908c6d2a (patch) | |
tree | 448d18b9d1d57a9cf316327751c4980ce99dbbf1 /OvmfPkg/Library | |
parent | b2f4da3956debf656279a0836500b6989a85e276 (diff) | |
download | edk2-07d3ba07709d8aa417f5f887b84ec78a908c6d2a.zip edk2-07d3ba07709d8aa417f5f887b84ec78a908c6d2a.tar.gz edk2-07d3ba07709d8aa417f5f887b84ec78a908c6d2a.tar.bz2 |
OvmfPkg: add and use industry standard macro PIIX4_PMBA_MASK
We already have the identical purpose (but different value) macro for
ICH9, namely ICH9_PMBASE_MASK in
"OvmfPkg/Include/IndustryStandard/Q35MchIch9.h".
Also, stop bit-negating signed integer constants.
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>
Diffstat (limited to 'OvmfPkg/Library')
-rw-r--r-- | OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c | 2 | ||||
-rw-r--r-- | OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c b/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c index 109b267..652545d 100644 --- a/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c +++ b/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c @@ -70,7 +70,7 @@ AcpiTimerLibConstructor ( // If the Power Management Base Address is not programmed,
// then program it now.
//
- PciAndThenOr32 (Pmba, (UINT32) ~0xFFC0, PIIX4_PMBA_VALUE);
+ PciAndThenOr32 (Pmba, ~(UINT32)PIIX4_PMBA_MASK, PIIX4_PMBA_VALUE);
//
// Enable PMBA I/O port decodes
diff --git a/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c b/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c index c46055a..735dfd2 100644 --- a/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c +++ b/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c @@ -68,7 +68,7 @@ AcpiTimerLibConstructor ( // If the Power Management Base Address is not programmed,
// then program it now.
//
- PciAndThenOr32 (Pmba, (UINT32) ~0xFFC0, PIIX4_PMBA_VALUE);
+ PciAndThenOr32 (Pmba, ~(UINT32)PIIX4_PMBA_MASK, PIIX4_PMBA_VALUE);
//
// Enable PMBA I/O port decodes
|