OvmfPkg/PlatformPei: eliminate unchecked PcdSetXX() calls

These are deprecated / disabled under the
DISABLE_NEW_DEPRECATED_INTERFACES feature test macro.

Introduce a variable called PcdStatus, and use it to assert the success of
these operations (there is no reason for them to fail here).

Cc: Anthony PERARD <anthony.perard@citrix.com>
Cc: Gary Lin <glin@suse.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=166
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Gary Lin <glin@suse.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Laszlo Ersek
2016-10-21 11:59:36 +02:00
parent 4d1362e1f9
commit 32e083c71d
3 changed files with 40 additions and 20 deletions

View File

@@ -210,6 +210,8 @@ InitializeXen (
VOID
)
{
RETURN_STATUS PcdStatus;
if (mXenLeaf == 0) {
return EFI_NOT_FOUND;
}
@@ -222,7 +224,8 @@ InitializeXen (
//
AddReservedMemoryBaseSizeHob (0xFC000000, 0x1000000, FALSE);
PcdSetBool (PcdPciDisableBusEnumeration, TRUE);
PcdStatus = PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE);
ASSERT_RETURN_ERROR (PcdStatus);
return EFI_SUCCESS;
}