Browse Source

Platform/SiFive/U5SeriesPkg: Remove use of deprecated interfaces

The non-status reporting PcdSet functions were deprecated and have
now been removed. Update SiFive code to assert on error status.

Deprecated PcdSet* code under DISABLE_NEW_DEPRECATED_INTERFACES has
been removed. This includes PcdSetXX interfaces used by RISC-V code
which is now causing a compilation error. Switch to the PcdSetXXS
interfaces.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Gilbert Chen <gilbert.chen@hpe.com>
Signed-off-by: Mark Salter <msalter@redhat.com>
Reviewed-by: Abner Chang <abner.chang@hpe.com>
Abner Chang 3 years ago
parent
commit
9e459701f5

+ 6 - 3
Platform/SiFive/U5SeriesPkg/Universal/Dxe/RamFvbServicesRuntimeDxe/FwBlockService.c

@@ -1087,18 +1087,21 @@ FvbInitialize (
   //
   // Set several PCD values to point to flash
   //
-  PcdSet64 (
+  Status = PcdSet64S (
     PcdFlashNvStorageVariableBase64,
     (UINTN) PcdGet32 (PcdPlatformFlashNvStorageVariableBase)
     );
-  PcdSet32 (
+  ASSERT_EFI_ERROR (Status);
+  Status = PcdSet32S (
     PcdFlashNvStorageFtwWorkingBase,
     PcdGet32 (PcdPlatformFlashNvStorageFtwWorkingBase)
     );
-  PcdSet32 (
+  ASSERT_EFI_ERROR (Status);
+  Status = PcdSet32S (
     PcdFlashNvStorageFtwSpareBase,
     PcdGet32 (PcdPlatformFlashNvStorageFtwSpareBase)
     );
+  ASSERT_EFI_ERROR (Status);
 
   FwhInstance = (EFI_FW_VOL_INSTANCE *)
     (