public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] CorebootPayloadPkg DSC: Add build option to disable deprecated APIs
@ 2016-10-24 21:38 Maurice Ma
  0 siblings, 0 replies; only message in thread
From: Maurice Ma @ 2016-10-24 21:38 UTC (permalink / raw)
  To: edk2-devel; +Cc: Maurice Ma, Prince Agyeman

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated. As a result replaced PcdSet32
with PcdSet32S accordingly to make the build pass.

[BuildOptions]
  *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Prince Agyeman <prince.agyeman@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=163
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
---
 CorebootModulePkg/CbSupportPei/CbSupportPei.c    | 3 ++-
 CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc    | 1 +
 CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CorebootModulePkg/CbSupportPei/CbSupportPei.c b/CorebootModulePkg/CbSupportPei/CbSupportPei.c
index 366682b32d11..9d5803449e25 100755
--- a/CorebootModulePkg/CbSupportPei/CbSupportPei.c
+++ b/CorebootModulePkg/CbSupportPei/CbSupportPei.c
@@ -329,7 +329,8 @@ CbPeiEntryPoint (
   if ((CbParseGetCbHeader (1, &pCbHeader) == RETURN_SUCCESS)
     && ((UINTN)pCbHeader > BASE_4KB)) {
     DEBUG((EFI_D_ERROR, "Actual Coreboot header: %p.\n", pCbHeader));
-    PcdSet32 (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);
+    Status = PcdSet32S (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);
+    ASSERT_EFI_ERROR (Status);
   }
 
   //
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
index 435743329674..3f053317abb0 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
+++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
@@ -83,6 +83,7 @@
   DEFINE SHELL_TYPE              = FULL_BIN
 
 [BuildOptions]
+  *_*_*_CC_FLAGS                 = /D DISABLE_NEW_DEPRECATED_INTERFACES
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG
   GCC:RELEASE_*_*_CC_FLAGS       = -DMDEPKG_NDEBUG
   INTEL:RELEASE_*_*_CC_FLAGS     = /D MDEPKG_NDEBUG
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
index 3ddc81b457ce..763d1c53023a 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
+++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
@@ -83,6 +83,7 @@
   DEFINE SHELL_TYPE              = FULL_BIN
 
 [BuildOptions]
+  *_*_*_CC_FLAGS                 = /D DISABLE_NEW_DEPRECATED_INTERFACES
   GCC:DEBUG_*_*_CC_FLAGS         = -Og -flto
   GCC:DEBUG_*_*_DLINK_FLAGS      = -flto
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG
-- 
1.9.5.msysgit.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-24 21:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-24 21:38 [PATCH] CorebootPayloadPkg DSC: Add build option to disable deprecated APIs Maurice Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox