[edk2-devel] [edk2-platforms] [PATCH v2 2/5] KabylakeSiliconPkg: Casting functions to EFIAPI

Agyeman, Prince posted 5 patches 6 years, 8 months ago
[edk2-devel] [edk2-platforms] [PATCH v2 2/5] KabylakeSiliconPkg: Casting functions to EFIAPI
Posted by Agyeman, Prince 6 years, 8 months ago
From: Prince Agyeman <prince.agyeman@intel.com>

This fixes the calling convension issues in gcc

Gcc build was tested on Ubuntu 16.04.5 LTS
with gcc version 5.4.0, nasm version 2.11.08

Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>

Signed-off-by: Prince Agyeman <prince.agyeman@intel.com>
---
 Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h         | 3 ++-
 Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c         | 3 ++-
 Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h    | 4 +++-
 .../Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c    | 4 +++-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
index 44f151c..666340e 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
@@ -1,7 +1,7 @@
 /** @file
   Header file for PCH Init SMM Handler
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -205,6 +205,7 @@ PchPcieLinkEqHandlerFunction (
 
 **/
 VOID
+EFIAPI
 PchPcieIoTrapSmiCallback (
   IN     EFI_HANDLE                     DispatchHandle,
   IN     EFI_SMM_IO_TRAP_CONTEXT        *CallbackContext,
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
index aed33bb..847fbfb 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
@@ -1,7 +1,7 @@
 /** @file
   PCH Pcie SMM Driver Entry
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -238,6 +238,7 @@ PchPciePmIoTrapSmiCallback (
 
 **/
 VOID
+EFIAPI
 PchPcieIoTrapSmiCallback (
   IN  EFI_HANDLE                            DispatchHandle,
   IN  EFI_SMM_IO_TRAP_CONTEXT                *CallbackContext,
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
index 508832e..a9f0664 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
@@ -1,7 +1,7 @@
 /** @file
   Prototypes and defines for the PCH SMM Dispatcher.
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -510,6 +510,7 @@ typedef struct {
                                   registered and the SMI source has been enabled.
 **/
 EFI_STATUS
+EFIAPI
 PchSmmCoreRegister (
   IN  PCH_SMM_GENERIC_PROTOCOL                          *This,
   IN  EFI_SMM_HANDLER_ENTRY_POINT2                      DispatchFunction,
@@ -530,6 +531,7 @@ PchSmmCoreRegister (
   @retval EFI_INVALID_PARAMETER   Handle is invalid.
 **/
 EFI_STATUS
+EFIAPI
 PchSmmCoreUnRegister (
   IN  PCH_SMM_GENERIC_PROTOCOL                         *This,
   IN  EFI_HANDLE                                       *DispatchHandle
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c
index 0c494bf..cb3bfba 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c
@@ -2,7 +2,7 @@
   This driver is responsible for the registration of child drivers
   and the abstraction of the PCH SMI sources.
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -325,6 +325,7 @@ SmiInputValueDuplicateCheck (
                                   registered and the SMI source has been enabled.
 **/
 EFI_STATUS
+EFIAPI
 PchSmmCoreRegister (
   IN  PCH_SMM_GENERIC_PROTOCOL                          *This,
   IN  EFI_SMM_HANDLER_ENTRY_POINT2                      DispatchFunction,
@@ -596,6 +597,7 @@ Error:
   @retval EFI_INVALID_PARAMETER   Handle is invalid.
 **/
 EFI_STATUS
+EFIAPI
 PchSmmCoreUnRegister (
   IN PCH_SMM_GENERIC_PROTOCOL                           *This,
   IN EFI_HANDLE                                         *DispatchHandle
-- 
2.7.4


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

View/Reply Online (#41109): https://edk2.groups.io/g/devel/message/41109
Mute This Topic: https://groups.io/mt/31693037/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms] [PATCH v2 2/5] KabylakeSiliconPkg: Casting functions to EFIAPI
Posted by Kubacki, Michael A 6 years, 8 months ago
Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Agyeman, Prince
> Sent: Monday, May 20, 2019 8:08 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Agyeman, Prince
> <prince.agyeman@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>;
> Sinha, Ankit <ankit.sinha@intel.com>
> Subject: [edk2-devel] [edk2-platforms] [PATCH v2 2/5] KabylakeSiliconPkg:
> Casting functions to EFIAPI
> 
> From: Prince Agyeman <prince.agyeman@intel.com>
> 
> This fixes the calling convension issues in gcc
> 
> Gcc build was tested on Ubuntu 16.04.5 LTS with gcc version 5.4.0, nasm
> version 2.11.08
> 
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Ankit Sinha <ankit.sinha@intel.com>
> 
> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com>
> ---
>  Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h         | 3 ++-
>  Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c         | 3 ++-
>  Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h    |
> 4 +++-
>  .../Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c    |
> 4 +++-
>  4 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
> index 44f151c..666340e 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
> @@ -1,7 +1,7 @@
>  /** @file
>    Header file for PCH Init SMM Handler
> 
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -205,6 +205,7 @@ PchPcieLinkEqHandlerFunction (
> 
>  **/
>  VOID
> +EFIAPI
>  PchPcieIoTrapSmiCallback (
>    IN     EFI_HANDLE                     DispatchHandle,
>    IN     EFI_SMM_IO_TRAP_CONTEXT        *CallbackContext,
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
> index aed33bb..847fbfb 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
> @@ -1,7 +1,7 @@
>  /** @file
>    PCH Pcie SMM Driver Entry
> 
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -238,6 +238,7 @@ PchPciePmIoTrapSmiCallback (
> 
>  **/
>  VOID
> +EFIAPI
>  PchPcieIoTrapSmiCallback (
>    IN  EFI_HANDLE                            DispatchHandle,
>    IN  EFI_SMM_IO_TRAP_CONTEXT                *CallbackContext,
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
> index 508832e..a9f0664 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
> +++
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
> @@ -1,7 +1,7 @@
>  /** @file
>    Prototypes and defines for the PCH SMM Dispatcher.
> 
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -510,6 +510,7 @@ typedef struct {
>                                    registered and the SMI source has been enabled.
>  **/
>  EFI_STATUS
> +EFIAPI
>  PchSmmCoreRegister (
>    IN  PCH_SMM_GENERIC_PROTOCOL                          *This,
>    IN  EFI_SMM_HANDLER_ENTRY_POINT2                      DispatchFunction,
> @@ -530,6 +531,7 @@ PchSmmCoreRegister (
>    @retval EFI_INVALID_PARAMETER   Handle is invalid.
>  **/
>  EFI_STATUS
> +EFIAPI
>  PchSmmCoreUnRegister (
>    IN  PCH_SMM_GENERIC_PROTOCOL                         *This,
>    IN  EFI_HANDLE                                       *DispatchHandle
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore
> .c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCor
> e.c
> index 0c494bf..cb3bfba 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore
> .c
> +++
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCo
> +++ re.c
> @@ -2,7 +2,7 @@
>    This driver is responsible for the registration of child drivers
>    and the abstraction of the PCH SMI sources.
> 
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -325,6 +325,7 @@ SmiInputValueDuplicateCheck (
>                                    registered and the SMI source has been enabled.
>  **/
>  EFI_STATUS
> +EFIAPI
>  PchSmmCoreRegister (
>    IN  PCH_SMM_GENERIC_PROTOCOL                          *This,
>    IN  EFI_SMM_HANDLER_ENTRY_POINT2                      DispatchFunction,
> @@ -596,6 +597,7 @@ Error:
>    @retval EFI_INVALID_PARAMETER   Handle is invalid.
>  **/
>  EFI_STATUS
> +EFIAPI
>  PchSmmCoreUnRegister (
>    IN PCH_SMM_GENERIC_PROTOCOL                           *This,
>    IN EFI_HANDLE                                         *DispatchHandle
> --
> 2.7.4
> 
> 
> 


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

View/Reply Online (#41243): https://edk2.groups.io/g/devel/message/41243
Mute This Topic: https://groups.io/mt/31693037/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms] [PATCH v2 2/5] KabylakeSiliconPkg: Casting functions to EFIAPI
Posted by Nate DeSimone 6 years, 8 months ago
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Agyeman, Prince
Sent: Monday, May 20, 2019 8:08 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Agyeman, Prince <prince.agyeman@intel.com>; Kubacki, Michael A <michael.a.kubacki@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>; Sinha, Ankit <ankit.sinha@intel.com>
Subject: [edk2-devel] [edk2-platforms] [PATCH v2 2/5] KabylakeSiliconPkg: Casting functions to EFIAPI

From: Prince Agyeman <prince.agyeman@intel.com>

This fixes the calling convension issues in gcc

Gcc build was tested on Ubuntu 16.04.5 LTS with gcc version 5.4.0, nasm version 2.11.08

Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>

Signed-off-by: Prince Agyeman <prince.agyeman@intel.com>
---
 Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h         | 3 ++-
 Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c         | 3 ++-
 Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h    | 4 +++-
 .../Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c    | 4 +++-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
index 44f151c..666340e 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
@@ -1,7 +1,7 @@
 /** @file
   Header file for PCH Init SMM Handler
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -205,6 +205,7 @@ PchPcieLinkEqHandlerFunction (
 
 **/
 VOID
+EFIAPI
 PchPcieIoTrapSmiCallback (
   IN     EFI_HANDLE                     DispatchHandle,
   IN     EFI_SMM_IO_TRAP_CONTEXT        *CallbackContext,
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
index aed33bb..847fbfb 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
@@ -1,7 +1,7 @@
 /** @file
   PCH Pcie SMM Driver Entry
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -238,6 +238,7 @@ PchPciePmIoTrapSmiCallback (
 
 **/
 VOID
+EFIAPI
 PchPcieIoTrapSmiCallback (
   IN  EFI_HANDLE                            DispatchHandle,
   IN  EFI_SMM_IO_TRAP_CONTEXT                *CallbackContext,
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
index 508832e..a9f0664 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
@@ -1,7 +1,7 @@
 /** @file
   Prototypes and defines for the PCH SMM Dispatcher.
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -510,6 +510,7 @@ typedef struct {
                                   registered and the SMI source has been enabled.
 **/
 EFI_STATUS
+EFIAPI
 PchSmmCoreRegister (
   IN  PCH_SMM_GENERIC_PROTOCOL                          *This,
   IN  EFI_SMM_HANDLER_ENTRY_POINT2                      DispatchFunction,
@@ -530,6 +531,7 @@ PchSmmCoreRegister (
   @retval EFI_INVALID_PARAMETER   Handle is invalid.
 **/
 EFI_STATUS
+EFIAPI
 PchSmmCoreUnRegister (
   IN  PCH_SMM_GENERIC_PROTOCOL                         *This,
   IN  EFI_HANDLE                                       *DispatchHandle
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c
index 0c494bf..cb3bfba 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCo
+++ re.c
@@ -2,7 +2,7 @@
   This driver is responsible for the registration of child drivers
   and the abstraction of the PCH SMI sources.
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -325,6 +325,7 @@ SmiInputValueDuplicateCheck (
                                   registered and the SMI source has been enabled.
 **/
 EFI_STATUS
+EFIAPI
 PchSmmCoreRegister (
   IN  PCH_SMM_GENERIC_PROTOCOL                          *This,
   IN  EFI_SMM_HANDLER_ENTRY_POINT2                      DispatchFunction,
@@ -596,6 +597,7 @@ Error:
   @retval EFI_INVALID_PARAMETER   Handle is invalid.
 **/
 EFI_STATUS
+EFIAPI
 PchSmmCoreUnRegister (
   IN PCH_SMM_GENERIC_PROTOCOL                           *This,
   IN EFI_HANDLE                                         *DispatchHandle
--
2.7.4





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

View/Reply Online (#41246): https://edk2.groups.io/g/devel/message/41246
Mute This Topic: https://groups.io/mt/31693037/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms] [PATCH v2 2/5] KabylakeSiliconPkg: Casting functions to EFIAPI
Posted by Chiu, Chasel 6 years, 8 months ago
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>


> -----Original Message-----
> From: Agyeman, Prince
> Sent: Tuesday, May 21, 2019 11:08 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Agyeman, Prince
> <prince.agyeman@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>; Sinha,
> Ankit <ankit.sinha@intel.com>
> Subject: [edk2-platforms] [PATCH v2 2/5] KabylakeSiliconPkg: Casting functions
> to EFIAPI
> 
> From: Prince Agyeman <prince.agyeman@intel.com>
> 
> This fixes the calling convension issues in gcc
> 
> Gcc build was tested on Ubuntu 16.04.5 LTS with gcc version 5.4.0, nasm version
> 2.11.08
> 
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Ankit Sinha <ankit.sinha@intel.com>
> 
> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com>
> ---
>  Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h         | 3
> ++-
>  Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c         | 3
> ++-
>  Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h    |
> 4 +++-
>  .../Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.c    |
> 4 +++-
>  4 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
> index 44f151c..666340e 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchInitSmm.h
> @@ -1,7 +1,7 @@
>  /** @file
>    Header file for PCH Init SMM Handler
> 
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -205,6 +205,7 @@ PchPcieLinkEqHandlerFunction (
> 
>  **/
>  VOID
> +EFIAPI
>  PchPcieIoTrapSmiCallback (
>    IN     EFI_HANDLE                     DispatchHandle,
>    IN     EFI_SMM_IO_TRAP_CONTEXT        *CallbackContext,
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
> index aed33bb..847fbfb 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchPcieSmm.c
> @@ -1,7 +1,7 @@
>  /** @file
>    PCH Pcie SMM Driver Entry
> 
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -238,6 +238,7 @@ PchPciePmIoTrapSmiCallback (
> 
>  **/
>  VOID
> +EFIAPI
>  PchPcieIoTrapSmiCallback (
>    IN  EFI_HANDLE                            DispatchHandle,
>    IN  EFI_SMM_IO_TRAP_CONTEXT                *CallbackContext,
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
> index 508832e..a9f0664 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
> +++
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmm.h
> @@ -1,7 +1,7 @@
>  /** @file
>    Prototypes and defines for the PCH SMM Dispatcher.
> 
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -510,6 +510,7 @@ typedef struct {
>                                    registered and the SMI source has been enabled.
>  **/
>  EFI_STATUS
> +EFIAPI
>  PchSmmCoreRegister (
>    IN  PCH_SMM_GENERIC_PROTOCOL                          *This,
>    IN  EFI_SMM_HANDLER_ENTRY_POINT2                      DispatchFunction,
> @@ -530,6 +531,7 @@ PchSmmCoreRegister (
>    @retval EFI_INVALID_PARAMETER   Handle is invalid.
>  **/
>  EFI_STATUS
> +EFIAPI
>  PchSmmCoreUnRegister (
>    IN  PCH_SMM_GENERIC_PROTOCOL                         *This,
>    IN  EFI_HANDLE                                       *DispatchHandle
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.
> c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.
> c
> index 0c494bf..cb3bfba 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCore.
> c
> +++
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/PchSmiDispatcher/Smm/PchSmmCo
> +++ re.c
> @@ -2,7 +2,7 @@
>    This driver is responsible for the registration of child drivers
>    and the abstraction of the PCH SMI sources.
> 
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -325,6 +325,7 @@ SmiInputValueDuplicateCheck (
>                                    registered and the SMI source has been enabled.
>  **/
>  EFI_STATUS
> +EFIAPI
>  PchSmmCoreRegister (
>    IN  PCH_SMM_GENERIC_PROTOCOL                          *This,
>    IN  EFI_SMM_HANDLER_ENTRY_POINT2                      DispatchFunction,
> @@ -596,6 +597,7 @@ Error:
>    @retval EFI_INVALID_PARAMETER   Handle is invalid.
>  **/
>  EFI_STATUS
> +EFIAPI
>  PchSmmCoreUnRegister (
>    IN PCH_SMM_GENERIC_PROTOCOL                           *This,
>    IN EFI_HANDLE                                         *DispatchHandle
> --
> 2.7.4


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

View/Reply Online (#41253): https://edk2.groups.io/g/devel/message/41253
Mute This Topic: https://groups.io/mt/31693037/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-