Reviewed-by: Sai Chaganty <rangasai.v.chaga...@intel.com>

-----Original Message-----
From: Kubacki, Michael A 
Sent: Thursday, September 19, 2019 10:54 AM
To: devel@edk2.groups.io
Cc: Bi, Dandan <dandan...@intel.com>; Chaganty, Rangasai V 
<rangasai.v.chaga...@intel.com>; Gao, Liming <liming....@intel.com>
Subject: [edk2-platforms][PATCH V1 1/1] AdvancedFeaturePkg/Ipmi: Fix X64 GCC 
Build Failures

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2204

These build failures can be reproduced simply by building the 
AdvancedFeaturePkg.dsc file in GCC5 for X64 architecture. To build the whole 
package DSC (not pull individual features into other packages), set the 
WORKSPACE variable to the edk2 directory in the workspace as is done by 
executing edksetup.sh then create the PACKAGES_PATH variable and add the 
Platform/Intel and Silicon/Intel directories to the variable value. Then start 
the build of AdvancedFeaturePkg.dsc:
  'build -p AdvancedFeaturePkg/AdvancedFeaturePkg.dsc -a X64'

This change adds EFIAPI to the following function declarations so they are 
consistent with the declaration for module entry points.
  * BmcElog.c - InitializeBmcElogLayer ()
  * FrbPei.c - InitializeFrbPei ()
  * IpmiFru.c - InitializeFru ()

All future contributions to AdvancedFeaturePkg must successfully build in GCC 
after this change.

Cc: Dandan Bi <dandan...@intel.com>
Cc: Sai Chaganty <rangasai.v.chaga...@intel.com>
Cc: Liming Gao <liming....@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kuba...@intel.com>
---
 Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c | 3 ++-
 Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c      | 3 ++-
 Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c 
b/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c
index e214f1a18b..a6d075b19c 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c
@@ -1,7 +1,7 @@
 /** @file
   BMC Event Log functions.
 
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -171,6 +171,7 @@ Returns:
 }
 
 EFI_STATUS
+EFIAPI
 InitializeBmcElogLayer (
   IN EFI_HANDLE             ImageHandle,
   IN EFI_SYSTEM_TABLE       *SystemTable
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c 
b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c
index 962cd7cc9b..5d33df0103 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c
@@ -1,7 +1,7 @@
 /** @file
     IPMI FRB PEIM.
 
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -51,6 +51,7 @@ SetWatchDogTimer (
 }
 
 EFI_STATUS
+EFIAPI
 InitializeFrbPei (
   IN       EFI_PEI_FILE_HANDLE       FileHandle,
   IN CONST EFI_PEI_SERVICES          **PeiServices
diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c 
b/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c
index 663983fd68..58e1fb4d7e 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c
@@ -1,7 +1,7 @@
 /** @file
   IPMI FRU Driver.
 
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -15,6 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include 
<IndustryStandard/Ipmi.h>
 
 EFI_STATUS
+EFIAPI
 InitializeFru (
   IN EFI_HANDLE             ImageHandle,
   IN EFI_SYSTEM_TABLE       *SystemTable
--
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47678): https://edk2.groups.io/g/devel/message/47678
Mute This Topic: https://groups.io/mt/34202401/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to