.../RuntimeDxeBeepStatusCodeHandlerLib.c | 20 +++++++++---------- .../RuntimeDxePostCodeStatusCodeHandlerLib.c | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-)
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/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
index 631e2eecae..0bdc3f4575 100644
--- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
+++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/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/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
index 59b531fe7c..65fd555cc0 100644
--- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/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/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
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]
> -=-=-=-=-=-=
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#61553): https://edk2.groups.io/g/devel/message/61553
Mute This Topic: https://groups.io/mt/75033993/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.