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: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=165
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> # RVCT
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
INT32 Node;\r
RETURN_STATUS RetStatus;\r
UINT64 IoTranslation;\r
INT32 Node;\r
RETURN_STATUS RetStatus;\r
UINT64 IoTranslation;\r
+ RETURN_STATUS PcdStatus;\r
\r
PciExpressBaseAddress = PcdGet64 (PcdPciExpressBaseAddress);\r
if (PciExpressBaseAddress != MAX_UINT64) {\r
\r
PciExpressBaseAddress = PcdGet64 (PcdPciExpressBaseAddress);\r
if (PciExpressBaseAddress != MAX_UINT64) {\r
if (!EFI_ERROR (Status) && RegSize == 2 * sizeof (UINT64)) {\r
PciExpressBaseAddress = SwapBytes64 (*Reg);\r
\r
if (!EFI_ERROR (Status) && RegSize == 2 * sizeof (UINT64)) {\r
PciExpressBaseAddress = SwapBytes64 (*Reg);\r
\r
- PcdSetBool (PcdPciDisableBusEnumeration, FALSE);\r
+ PcdStatus = PcdSetBoolS (PcdPciDisableBusEnumeration, FALSE);\r
+ ASSERT_RETURN_ERROR (PcdStatus);\r
\r
IoTranslation = 0;\r
RetStatus = GetPciIoTranslation (FdtClient, Node, &IoTranslation);\r
if (!RETURN_ERROR (RetStatus)) {\r
\r
IoTranslation = 0;\r
RetStatus = GetPciIoTranslation (FdtClient, Node, &IoTranslation);\r
if (!RETURN_ERROR (RetStatus)) {\r
- PcdSet64 (PcdPciIoTranslation, IoTranslation);\r
+ PcdStatus = PcdSet64S (PcdPciIoTranslation, IoTranslation);\r
+ ASSERT_RETURN_ERROR (PcdStatus);\r
} else {\r
//\r
// Support for I/O BARs is not mandatory, and so it does not make sense\r
} else {\r
//\r
// Support for I/O BARs is not mandatory, and so it does not make sense\r
- PcdSet64 (PcdPciExpressBaseAddress, PciExpressBaseAddress);\r
+ PcdStatus = PcdSet64S (PcdPciExpressBaseAddress, PciExpressBaseAddress);\r
+ ASSERT_RETURN_ERROR (PcdStatus);\r
\r
return RETURN_SUCCESS;\r
}\r
\r
return RETURN_SUCCESS;\r
}\r