public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Mark Salter" <msalter@redhat.com>
To: devel@edk2.groups.io
Cc: Leif Lindholm <leif@nuviainc.com>,
	Abner Chang <abner.chang@hpe.com>,
	Daniel Schaefer <daniel.schaefer@hpe.com>,
	Gilbert Chen <gilbert.chen@hpe.com>
Subject: [PATCH edk2-platforms 2/2] Platform/SiFive/U5SeriesPkg: Remove use of deprecated interfaces
Date: Mon, 21 Dec 2020 15:38:55 -0500	[thread overview]
Message-ID: <20201221203855.635031-3-msalter@redhat.com> (raw)
In-Reply-To: <20201221203855.635031-1-msalter@redhat.com>

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>
---
 .../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


  parent reply	other threads:[~2020-12-21 20:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 20:38 [PATCH edk2-platforms 0/2] RISC-V: Fix build errors Mark Salter
2020-12-21 20:38 ` [PATCH edk2-platforms 1/2] Silicon/RISC-V: Update old SMBIOS struct filed name Mark Salter
2020-12-21 20:38 ` Mark Salter [this message]
2020-12-22  6:36 ` [PATCH edk2-platforms 0/2] RISC-V: Fix build errors Abner Chang
2020-12-23  2:53   ` [edk2-devel] " Zhiguang Liu
2020-12-23  6:41     ` 回复: " gaoliming
2020-12-23  6:44       ` Michael D Kinney
2020-12-23  7:05         ` 回复: " gaoliming
2020-12-23  7:17           ` Bob Feng
2020-12-23  7:28           ` Zhiguang Liu
2020-12-23 15:47             ` Abner Chang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201221203855.635031-3-msalter@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox