From: "Oram, Isaac W" <isaac.w.oram@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Oram, Isaac W" <isaac.w.oram@intel.com>,
"benjamin.doron00@gmail.com" <benjamin.doron00@gmail.com>
Cc: "Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>,
"Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
"Sinha, Ankit" <ankit.sinha@intel.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>,
"Dong, Eric" <eric.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH v1 1/3] AcpiDebugFeaturePkg: Included modules are mutually exclusive
Date: Mon, 8 Aug 2022 19:26:25 +0000 [thread overview]
Message-ID: <SA1PR11MB58019A9D0BD062BF0C1F2CD5D0639@SA1PR11MB5801.namprd11.prod.outlook.com> (raw)
In-Reply-To: <170974F020AA914C.7247@groups.io>
Pushed as edc718521e..d85e4251ce
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Oram, Isaac W
Sent: Monday, August 8, 2022 12:22 PM
To: devel@edk2.groups.io; benjamin.doron00@gmail.com
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Sinha, Ankit <ankit.sinha@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH v1 1/3] AcpiDebugFeaturePkg: Included modules are mutually exclusive
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Benjamin Doron
Sent: Monday, July 25, 2022 10:12 AM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Sinha, Ankit <ankit.sinha@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
Subject: [edk2-devel] [PATCH v1 1/3] AcpiDebugFeaturePkg: Included modules are mutually exclusive
The DXE and SMM versions of AcpiDebug perform the same task and are therefore mutually exclusive. Including both modules results in a duplicate ACPI table, resulting in the feature not working at all.
Therefore, add a new PCD to determine which module will be included.
Now, either version successfully write to the debug buffer.
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
---
Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc | 1 +
Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc | 1 +
Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebug.c | 4 ++++
Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec | 1 +
Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc | 3 +++
Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf | 7 +++++--
6 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index 28530b8c674b..908fe4d1f7a9 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -48,6 +48,7 @@
# Debugging features # gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable |TRUE+ gAcpiDebugFeaturePkgTokenSpaceGuid.PcdUseSmmVersion |FALSE gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable |TRUE gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEnable |TRUE gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable |TRUEdiff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
index e214175edaf7..d59e3e61b9b9 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
@@ -59,6 +59,7 @@
# [PcdsFeatureFlag] gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable |FALSE+ gAcpiDebugFeaturePkgTokenSpaceGuid.PcdUseSmmVersion |FALSE gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable |FALSE gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEnable |FALSE gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable |FALSEdiff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebug.c b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebug.c
index 4caeffc7dec9..0b28e2f7a6d5 100644
--- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebug.c
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD
+++ ebug.c
@@ -483,6 +483,10 @@ InitializeAcpiDebugSmm (
EFI_SMM_BASE2_PROTOCOL *SmmBase2; BOOLEAN InSmm; + if (!PcdGetBool (PcdAcpiDebugFeatureActive)) {+ return EFI_SUCCESS;+ }+ Status = gBS->LocateProtocol (&gEfiSmmBase2ProtocolGuid, NULL, (VOID **) &SmmBase2); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) {diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
index 915923100731..1a290bab29d9 100644
--- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
+++ ec
@@ -28,6 +28,7 @@
[PcdsFeatureFlag] gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable|FALSE|BOOLEAN|0xA0000001+ gAcpiDebugFeaturePkgTokenSpaceGuid.PcdUseSmmVersion|FALSE|BOOLEAN|0xA0000002 [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] ## This PCD specifies the ACPI debug message buffer size.diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
index f5b8bacee039..684549bbdd78 100644
--- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
+++ ure.dsc
@@ -54,5 +54,8 @@
# in the package build. # Add components here that should be included in the package build.+!if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdUseSmmVersion == FALSE AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf+!else AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf+!endifdiff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf
index 855826292cb5..e904a2f8fbf2 100644
--- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fd
+++ f
@@ -7,5 +7,8 @@
# ## -INF RuleOverride = DRIVER_ACPITABLE AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf-INF RuleOverride = DRIVER_ACPITABLE AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf+!if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdUseSmmVersion == FALSE+ INF RuleOverride = DRIVER_ACPITABLE AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf+!else+ INF RuleOverride = DRIVER_ACPITABLE AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf+!endif--
2.36.1
-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91815): https://edk2.groups.io/g/devel/message/91815
Mute This Topic: https://groups.io/mt/92609642/1492418
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [isaac.w.oram@intel.com] -=-=-=-=-=-=
prev parent reply other threads:[~2022-08-08 19:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 17:12 [PATCH v1 1/3] AcpiDebugFeaturePkg: Included modules are mutually exclusive Benjamin Doron
2022-07-25 17:12 ` [PATCH v1 2/3] UserAuthFeaturePkg: Included DXE versions " Benjamin Doron
2022-08-08 22:51 ` Oram, Isaac W
2022-08-09 17:09 ` Benjamin Doron
2022-08-16 21:26 ` Oram, Isaac W
2022-07-25 17:12 ` [PATCH v1 3/3] LogoFeaturePkg,BoardModulePkg: Set existing logo as BGRT Benjamin Doron
2022-08-09 17:51 ` Oram, Isaac W
2022-08-08 19:21 ` [edk2-devel] [PATCH v1 1/3] AcpiDebugFeaturePkg: Included modules are mutually exclusive Oram, Isaac W
[not found] ` <170974F020AA914C.7247@groups.io>
2022-08-08 19:26 ` Oram, Isaac W [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=SA1PR11MB58019A9D0BD062BF0C1F2CD5D0639@SA1PR11MB5801.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