[edk2-devel] [PATCH edk2-platforms 2/2] Platform/SiFive/U5SeriesPkg: Remove use of deprecated interfaces

Mark Salter msalter at redhat.com
Mon Dec 21 20:39:33 UTC 2020


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 at nuviainc.com>
CC: Abner Chang <abner.chang at hpe.com>
CC: Daniel Schaefer <daniel.schaefer at hpe.com>
CC: Gilbert Chen <gilbert.chen at hpe.com>
Signed-off-by: Mark Salter <msalter at redhat.com>
---
 .../Dxe/RamFvbServicesRuntimeDxe/FwBlockService.c        | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Platform/SiFive/U5SeriesPkg/Universal/Dxe/RamFvbServicesRuntimeDxe/FwBlockService.c b/Platform/SiFive/U5SeriesPkg/Universal/Dxe/RamFvbServicesRuntimeDxe/FwBlockService.c
index b69569339d25..55501fa6b85f 100644
--- a/Platform/SiFive/U5SeriesPkg/Universal/Dxe/RamFvbServicesRuntimeDxe/FwBlockService.c
+++ b/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 *)

     (

-- 
2.29.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69345): https://edk2.groups.io/g/devel/message/69345
Mute This Topic: https://groups.io/mt/79134944/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list