public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dong, Eric" <eric.dong@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Tan, Ming" <ming.tan@intel.com>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [edk2-devel] [PATCH] Features/Intel/Debugging: Fix build error when use Xcode
Date: Mon, 22 Jun 2020 07:41:11 +0000	[thread overview]
Message-ID: <DM6PR11MB3274CC7415A9FB40DFD1134AFE970@DM6PR11MB3274.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200622073249.5329-1-ming.tan@intel.com>

Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tan,
> Ming
> Sent: Monday, June 22, 2020 3:33 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2-devel] [PATCH] Features/Intel/Debugging: Fix build error
> when use Xcode
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2822
> 
> When use Xcode, it will report following compile error:
>   duplicate symbol _mRscHandlerProtocol in:
> 
> So in the Features/Intel/Debugging/,
> change the global variable name in the following files
>   RuntimeDxeBeepStatusCodeHandlerLib.c
>   RuntimeDxePostCodeStatusCodeHandlerLib.c
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Ming Tan <ming.tan@intel.com>
> ---
>  .../RuntimeDxeBeepStatusCodeHandlerLib.c      | 20 +++++++++----------
>  .../RuntimeDxePostCodeStatusCodeHandlerLib.c  | 20 +++++++++----------
>  2 files changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git
> a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod
> eHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
> b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod
> eHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
> index 631e2eecae..0bdc3f4575 100644
> ---
> a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod
> eHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
> +++
> b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCod
> eHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
> @@ -17,9 +17,9 @@
>  #include <Library/BeepMapLib.h>
> 
>  #include <Library/BeepLib.h>
> 
> 
> 
> -EFI_RSC_HANDLER_PROTOCOL  *mRscHandlerProtocol       = NULL;
> 
> -EFI_EVENT                 mExitBootServicesEvent     = NULL;
> 
> -BOOLEAN                   mRegistered                = FALSE;
> 
> +EFI_RSC_HANDLER_PROTOCOL  *mBeepRscHandlerProtocol       = NULL;
> 
> +EFI_EVENT                 mBeepExitBootServicesEvent     = NULL;
> 
> +BOOLEAN                   mBeepRegistered                = FALSE;
> 
> 
> 
>  /**
> 
>    Convert status code value to the times of beep.
> 
> @@ -79,8 +79,8 @@ UnregisterBeepBootTimeHandlers (
>    IN VOID             *Context
> 
>    )
> 
>  {
> 
> -  if (mRegistered) {
> 
> -    mRscHandlerProtocol->Unregister (BeepStatusCodeReportWorker);
> 
> +  if (mBeepRegistered) {
> 
> +    mBeepRscHandlerProtocol->Unregister (BeepStatusCodeReportWorker);
> 
>    }
> 
>  }
> 
> 
> 
> @@ -105,13 +105,13 @@ RegisterBeepBootTimeHandlers (
>    Status = gBS->LocateProtocol (
> 
>                    &gEfiRscHandlerProtocolGuid,
> 
>                    NULL,
> 
> -                  (VOID **) &mRscHandlerProtocol
> 
> +                  (VOID **) &mBeepRscHandlerProtocol
> 
>                    );
> 
>    ASSERT_EFI_ERROR (Status);
> 
> 
> 
> -  mRscHandlerProtocol->Register (BeepStatusCodeReportWorker,
> TPL_HIGH_LEVEL);
> 
> +  mBeepRscHandlerProtocol->Register (BeepStatusCodeReportWorker,
> TPL_HIGH_LEVEL);
> 
>    ASSERT_EFI_ERROR (Status);
> 
> -  mRegistered = TRUE;
> 
> +  mBeepRegistered = TRUE;
> 
> 
> 
>    Status = gBS->CreateEventEx (
> 
>                    EVT_NOTIFY_SIGNAL,
> 
> @@ -119,7 +119,7 @@ RegisterBeepBootTimeHandlers (
>                    UnregisterBeepBootTimeHandlers,
> 
>                    NULL,
> 
>                    &gEfiEventExitBootServicesGuid,
> 
> -                  &mExitBootServicesEvent
> 
> +                  &mBeepExitBootServicesEvent
> 
>                    );
> 
>    ASSERT_EFI_ERROR (Status);
> 
>  }
> 
> @@ -154,7 +154,7 @@ RuntimeDxeBeepStatusCodeHandlerLibConstructor (
>    Status = gBS->LocateProtocol (
> 
>                    &gEfiRscHandlerProtocolGuid,
> 
>                    NULL,
> 
> -                  (VOID **) &mRscHandlerProtocol
> 
> +                  (VOID **) &mBeepRscHandlerProtocol
> 
>                    );
> 
> 
> 
>    if (!EFI_ERROR (Status)) {
> 
> diff --git
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS
> tatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS
> tatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
> index 59b531fe7c..65fd555cc0 100644
> ---
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS
> tatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
> +++
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS
> tatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
> @@ -18,9 +18,9 @@
>  #include <Library/PostCodeMapLib.h>
> 
>  #include <Library/PostCodeLib.h>
> 
> 
> 
> -EFI_RSC_HANDLER_PROTOCOL  *mRscHandlerProtocol       = NULL;
> 
> -EFI_EVENT                 mExitBootServicesEvent     = NULL;
> 
> -BOOLEAN                   mRegisted                  = FALSE;
> 
> +EFI_RSC_HANDLER_PROTOCOL  *mPostCodeRscHandlerProtocol       = NULL;
> 
> +EFI_EVENT                 mPostCodeExitBootServicesEvent     = NULL;
> 
> +BOOLEAN                   mPostCodeRegisted                  = FALSE;
> 
> 
> 
>  /**
> 
>    Convert status code value and write data to post code.
> 
> @@ -81,8 +81,8 @@ UnregisterPostCodeBootTimeHandlers (
>    IN VOID             *Context
> 
>    )
> 
>  {
> 
> -  if (mRegisted) {
> 
> -    mRscHandlerProtocol->Unregister (PostCodeStatusCodeReportWorker);
> 
> +  if (mPostCodeRegisted) {
> 
> +    mPostCodeRscHandlerProtocol->Unregister
> (PostCodeStatusCodeReportWorker);
> 
>    }
> 
>  }
> 
> 
> 
> @@ -109,13 +109,13 @@ RegisterPostCodeBootTimeHandlers (
>    Status = gBS->LocateProtocol (
> 
>                    &gEfiRscHandlerProtocolGuid,
> 
>                    NULL,
> 
> -                  (VOID **) &mRscHandlerProtocol
> 
> +                  (VOID **) &mPostCodeRscHandlerProtocol
> 
>                    );
> 
>    ASSERT_EFI_ERROR (Status);
> 
> 
> 
> -  mRscHandlerProtocol->Register (PostCodeStatusCodeReportWorker,
> TPL_HIGH_LEVEL);
> 
> +  mPostCodeRscHandlerProtocol->Register
> (PostCodeStatusCodeReportWorker, TPL_HIGH_LEVEL);
> 
>    ASSERT_EFI_ERROR (Status);
> 
> -  mRegisted = TRUE;
> 
> +  mPostCodeRegisted = TRUE;
> 
> 
> 
>    Status = gBS->CreateEventEx (
> 
>                    EVT_NOTIFY_SIGNAL,
> 
> @@ -123,7 +123,7 @@ RegisterPostCodeBootTimeHandlers (
>                    UnregisterPostCodeBootTimeHandlers,
> 
>                    NULL,
> 
>                    &gEfiEventExitBootServicesGuid,
> 
> -                  &mExitBootServicesEvent
> 
> +                  &mPostCodeExitBootServicesEvent
> 
>                    );
> 
>    ASSERT_EFI_ERROR (Status);
> 
>  }
> 
> @@ -158,7 +158,7 @@
> RuntimeDxePostCodeStatusCodeHandlerLibConstructor (
>    Status = gBS->LocateProtocol (
> 
>                    &gEfiRscHandlerProtocolGuid,
> 
>                    NULL,
> 
> -                  (VOID **) &mRscHandlerProtocol
> 
> +                  (VOID **) &mPostCodeRscHandlerProtocol
> 
>                    );
> 
> 
> 
>    if (!EFI_ERROR (Status)) {
> 
> --
> 2.24.0.windows.2
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> 
> View/Reply Online (#61552): https://edk2.groups.io/g/devel/message/61552
> Mute This Topic: https://groups.io/mt/75033993/1768733
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [eric.dong@intel.com]
> -=-=-=-=-=-=


      reply	other threads:[~2020-06-22  7:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  7:32 [PATCH] Features/Intel/Debugging: Fix build error when use Xcode Tan, Ming
2020-06-22  7:41 ` Dong, Eric [this message]

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=DM6PR11MB3274CC7415A9FB40DFD1134AFE970@DM6PR11MB3274.namprd11.prod.outlook.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