* Re: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. [not found] ` <DM6PR11MB437710173150A45380A2C6F1EE769@DM6PR11MB4377.namprd11.prod.outlook.com> @ 2021-12-15 5:43 ` Yao, Jiewen 2021-12-15 5:55 ` 回复: [edk2-devel] " gaoliming 0 siblings, 1 reply; 3+ messages in thread From: Yao, Jiewen @ 2021-12-15 5:43 UTC (permalink / raw) To: Reji, RencyX, devel@edk2.groups.io Cc: Zhang, Qi1, Kumar, Rahul1, Wang, Jian J, H, Krishnaprasad, Patil, Subhashini, Krishnappa, Banuprakash [-- Attachment #1.1: Type: text/plain, Size: 6918 bytes --] This solution does not make sense to me. Please start a discussion with MdePkg owner at first. Thank you Yao Jiewen From: Reji, RencyX <rencyx.reji@intel.com> Sent: Wednesday, December 15, 2021 1:39 PM To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com> Cc: Zhang, Qi1 <qi1.zhang@intel.com>; Kumar, Rahul1 <rahul1.kumar@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; H, Krishnaprasad <krishnaprasad.h@intel.com>; Patil, Subhashini <subhashini.patil@intel.com>; Krishnappa, Banuprakash <banuprakash.krishnappa@intel.com> Subject: RE: RE: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. Hi All, Please find the Bugzilla link created for the changes : https://bugzilla.tianocore.org/show_bug.cgi?id=3772 Thanks, Rency From: Reji, RencyX Sent: Friday, December 10, 2021 2:10 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>> Cc: Zhang, Qi1 <qi1.zhang@intel.com<mailto:qi1.zhang@intel.com>>; Kumar, Rahul1 <Rahul1.Kumar@intel.com<mailto:Rahul1.Kumar@intel.com>>; Wang, Jian J <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>; H, Krishnaprasad <krishnaprasad.h@intel.com<mailto:krishnaprasad.h@intel.com>>; Patil, Subhashini <subhashini.patil@intel.com<mailto:subhashini.patil@intel.com>>; Krishnappa, Banuprakash <banuprakash.krishnappa@intel.com<mailto:banuprakash.krishnappa@intel.com>> Subject: RE: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. Hi All, We are developing a feature which will enable users to collect debug traces for all build targets(production & engineering builds). This feature would work even when no debug interfaces are available on systems. To support this feature we are required to extend the capability of the existing DebugLib implementation by supplementing it with a library that has the required extensions. We have done this implementation such that it can work with or without this feature enabled by encapsulating the changes within EXT_DEBUG macro. This way we are ensuring that our changes are not effecting the behavior of the DebugLib functionality in any way .Enabling this feature would require redefinition of the debug macro defined in debuglib while maintaining compatibility on builds without this feature . Since we are extending capability of DebugLib we are required to selectively define/redefine the macro definition based on the target of choice. Please find the below flow chart. [cid:image001.jpg@01D7F1B9.AE91E640] @Yao, Jiewen<mailto:jiewen.yao@intel.com> , We have some changes in Platform package of our Intel folder where we are using ExtDebug null libraries as shown below. So we have to add ExtDebuglib under library section in those inf files. #TPM SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf { <LibraryClasses> DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf !if $(EXT_DBG) == TRUE ExtDebugLib|MdePkg/Library/BaseExtDebugLibNull/BaseExtDebugLibNull.inf !endif } Thanks, Rency -----Original Message----- From: Reji, RencyX rencyx.reji@intel.com<mailto:rencyx.reji@intel.com> Sent: Wednesday, December 8, 2021 5:52 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Reji, RencyX rencyx.reji@intel.com<mailto:rencyx.reji@intel.com>; Zhang, Qi1 qi1.zhang@intel.com<mailto:qi1.zhang@intel.com>; Kumar, Rahul1 rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>; Yao, Jiewen jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>; Wang, Jian J jian.j.wang@intel.com<mailto:jian.j.wang@intel.com> Subject: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. We are introducing a new feature where we will be using a device to collect debug messages to extend capability of debug beyond current scope. We are required to extend capability of debug library by changing debug macro expression and collect debug messages for all target such as Debug, Release and Silent. Cc: Qi Zhang <qi1.zhang@intel.com<mailto:qi1.zhang@intel.com>> Cc: Rahul Kumar <rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>> Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>> Cc: Jian J Wang <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>> Signed-off-by: Rency Reji <RencyX.Reji@intel.com<mailto:RencyX.Reji@intel.com>> --- SecurityPkg/SecurityPkg.dsc | 1 + SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf | 1 + SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf | 1 + SecurityPkg/Tcg/TcgPei/TcgPei.inf | 1 + 4 files changed, 4 insertions(+) diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc index 73a93c2285..0f1b3d62e9 100644 --- a/SecurityPkg/SecurityPkg.dsc +++ b/SecurityPkg/SecurityPkg.dsc @@ -72,6 +72,7 @@ MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf + ExtDebugLib|MdePkg/Library/BaseExtDebugLib/BaseExtDebugLib.inf [LibraryClasses.ARM, LibraryClasses.AARCH64] # diff --git a/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf b/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf index 653dc1f64f..0b8c6af3b0 100644 --- a/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf +++ b/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf @@ -38,6 +38,7 @@ [LibraryClasses] PeimEntryPoint PeiServicesLib + ExtDebugLib [Ppis] gPeiLockPhysicalPresencePpiGuid ## PRODUCES diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf index 06c26a2904..a11cf661ab 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf @@ -55,6 +55,7 @@ ReportStatusCodeLib ResetSystemLib PrintLib + ExtDebugLib [Guids] gTcgEventEntryHobGuid ## PRODUCES ## HOB diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.inf b/SecurityPkg/Tcg/TcgPei/TcgPei.inf index 2e3e7e0575..90d55e7256 100644 --- a/SecurityPkg/Tcg/TcgPei/TcgPei.inf +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.inf @@ -52,6 +52,7 @@ ReportStatusCodeLib Tpm12CommandLib PerformanceLib + ExtDebugLib [Guids] gTcgEventEntryHobGuid ## PRODUCES ## HOB -- 2.34.1.windows.1 [-- Attachment #1.2: Type: text/html, Size: 16337 bytes --] [-- Attachment #2: image001.jpg --] [-- Type: image/jpeg, Size: 25638 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* 回复: [edk2-devel] [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. 2021-12-15 5:43 ` [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets Yao, Jiewen @ 2021-12-15 5:55 ` gaoliming 2021-12-15 8:01 ` Yao, Jiewen 0 siblings, 1 reply; 3+ messages in thread From: gaoliming @ 2021-12-15 5:55 UTC (permalink / raw) To: devel, jiewen.yao, 'Reji, RencyX' Cc: 'Zhang, Qi1', 'Kumar, Rahul1', 'Wang, Jian J', 'H, Krishnaprasad', 'Patil, Subhashini', 'Krishnappa, Banuprakash' [-- Attachment #1.1: Type: text/plain, Size: 7984 bytes --] Rency: I add my comments into BZ. Thanks Liming 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Yao, Jiewen 发送时间: 2021年12月15日 13:43 收件人: Reji, RencyX <rencyx.reji@intel.com>; devel@edk2.groups.io 抄送: Zhang, Qi1 <qi1.zhang@intel.com>; Kumar, Rahul1 <rahul1.kumar@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; H, Krishnaprasad <krishnaprasad.h@intel.com>; Patil, Subhashini <subhashini.patil@intel.com>; Krishnappa, Banuprakash <banuprakash.krishnappa@intel.com> 主题: Re: [edk2-devel] [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. This solution does not make sense to me. Please start a discussion with MdePkg owner at first. Thank you Yao Jiewen From: Reji, RencyX <rencyx.reji@intel.com <mailto:rencyx.reji@intel.com> > Sent: Wednesday, December 15, 2021 1:39 PM To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> ; Yao, Jiewen <jiewen.yao@intel.com <mailto:jiewen.yao@intel.com> > Cc: Zhang, Qi1 <qi1.zhang@intel.com <mailto:qi1.zhang@intel.com> >; Kumar, Rahul1 <rahul1.kumar@intel.com <mailto:rahul1.kumar@intel.com> >; Wang, Jian J <jian.j.wang@intel.com <mailto:jian.j.wang@intel.com> >; H, Krishnaprasad <krishnaprasad.h@intel.com <mailto:krishnaprasad.h@intel.com> >; Patil, Subhashini <subhashini.patil@intel.com <mailto:subhashini.patil@intel.com> >; Krishnappa, Banuprakash <banuprakash.krishnappa@intel.com <mailto:banuprakash.krishnappa@intel.com> > Subject: RE: RE: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. Hi All, Please find the Bugzilla link created for the changes : https://bugzilla.tianocore.org/show_bug.cgi?id=3772 Thanks, Rency From: Reji, RencyX Sent: Friday, December 10, 2021 2:10 PM To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> ; Yao, Jiewen <jiewen.yao@intel.com <mailto:jiewen.yao@intel.com> > Cc: Zhang, Qi1 <qi1.zhang@intel.com <mailto:qi1.zhang@intel.com> >; Kumar, Rahul1 <Rahul1.Kumar@intel.com <mailto:Rahul1.Kumar@intel.com> >; Wang, Jian J <jian.j.wang@intel.com <mailto:jian.j.wang@intel.com> >; H, Krishnaprasad <krishnaprasad.h@intel.com <mailto:krishnaprasad.h@intel.com> >; Patil, Subhashini <subhashini.patil@intel.com <mailto:subhashini.patil@intel.com> >; Krishnappa, Banuprakash <banuprakash.krishnappa@intel.com> Subject: RE: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. Hi All, We are developing a feature which will enable users to collect debug traces for all build targets(production & engineering builds). This feature would work even when no debug interfaces are available on systems. To support this feature we are required to extend the capability of the existing DebugLib implementation by supplementing it with a library that has the required extensions. We have done this implementation such that it can work with or without this feature enabled by encapsulating the changes within EXT_DEBUG macro. This way we are ensuring that our changes are not effecting the behavior of the DebugLib functionality in any way .Enabling this feature would require redefinition of the debug macro defined in debuglib while maintaining compatibility on builds without this feature . Since we are extending capability of DebugLib we are required to selectively define/redefine the macro definition based on the target of choice. Please find the below flow chart. <mailto:jiewen.yao@intel.com> @Yao, Jiewen , We have some changes in Platform package of our Intel folder where we are using ExtDebug null libraries as shown below. So we have to add ExtDebuglib under library section in those inf files. #TPM SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf { <LibraryClasses> DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf !if $(EXT_DBG) == TRUE ExtDebugLib|MdePkg/Library/BaseExtDebugLibNull/BaseExtDebugLibNull.inf !endif } Thanks, Rency -----Original Message----- From: Reji, RencyX rencyx.reji@intel.com <mailto:rencyx.reji@intel.com> Sent: Wednesday, December 8, 2021 5:52 PM To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> Cc: Reji, RencyX rencyx.reji@intel.com <mailto:rencyx.reji@intel.com> ; Zhang, Qi1 qi1.zhang@intel.com <mailto:qi1.zhang@intel.com> ; Kumar, Rahul1 rahul1.kumar@intel.com <mailto:rahul1.kumar@intel.com> ; Yao, Jiewen jiewen. yao@intel.com <mailto:jiewen.yao@intel.com> ; Wang, Jian J jian.j.wang@intel.com <mailto:jian.j.wang@intel.com> Subject: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. We are introducing a new feature where we will be using a device to collect debug messages to extend capability of debug beyond current scope. We are required to extend capability of debug library by changing debug macro expression and collect debug messages for all target such as Debug, Release and Silent. Cc: Qi Zhang < <mailto:qi1.zhang@intel.com> qi1.zhang@intel.com> Cc: Rahul Kumar < <mailto:rahul1.kumar@intel.com> rahul1.kumar@intel.com> Cc: Jiewen Yao < <mailto:jiewen.yao@intel.com> jiewen.yao@intel.com> Cc: Jian J Wang < <mailto:jian.j.wang@intel.com> jian.j.wang@intel.com> Signed-off-by: Rency Reji < <mailto:RencyX.Reji@intel.com> RencyX.Reji@intel.com> --- SecurityPkg/SecurityPkg.dsc | 1 + SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf | 1 + SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf | 1 + SecurityPkg/Tcg/TcgPei/TcgPei.inf | 1 + 4 files changed, 4 insertions(+) diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc index 73a93c2285..0f1b3d62e9 100644 --- a/SecurityPkg/SecurityPkg.dsc +++ b/SecurityPkg/SecurityPkg.dsc @@ -72,6 +72,7 @@ MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull. inf SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVa riableLib.inf SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariableProvisi onLib/SecureBootVariableProvisionLib.inf + ExtDebugLib|MdePkg/Library/BaseExtDebugLib/BaseExtDebugLib.inf [LibraryClasses.ARM, LibraryClasses.AARCH64] # diff --git a/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf b/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf index 653dc1f64f..0b8c6af3b0 100644 --- a/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf +++ b/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf @@ -38,6 +38,7 @@ [LibraryClasses] PeimEntryPoint PeiServicesLib + ExtDebugLib [Ppis] gPeiLockPhysicalPresencePpiGuid ## PRODUCES diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf index 06c26a2904..a11cf661ab 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf @@ -55,6 +55,7 @@ ReportStatusCodeLib ResetSystemLib PrintLib + ExtDebugLib [Guids] gTcgEventEntryHobGuid ## PRODUCES ## HOB diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.inf b/SecurityPkg/Tcg/TcgPei/TcgPei.inf index 2e3e7e0575..90d55e7256 100644 --- a/SecurityPkg/Tcg/TcgPei/TcgPei.inf +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.inf @@ -52,6 +52,7 @@ ReportStatusCodeLib Tpm12CommandLib PerformanceLib + ExtDebugLib [Guids] gTcgEventEntryHobGuid ## PRODUCES ## HOB -- 2.34.1.windows.1 [-- Attachment #1.2: Type: text/html, Size: 21031 bytes --] [-- Attachment #2: image002.jpg --] [-- Type: image/jpeg, Size: 25258 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. 2021-12-15 5:55 ` 回复: [edk2-devel] " gaoliming @ 2021-12-15 8:01 ` Yao, Jiewen 0 siblings, 0 replies; 3+ messages in thread From: Yao, Jiewen @ 2021-12-15 8:01 UTC (permalink / raw) To: devel@edk2.groups.io, Gao, Liming, Reji, RencyX Cc: Zhang, Qi1, Kumar, Rahul1, Wang, Jian J, H, Krishnaprasad, Patil, Subhashini, Krishnappa, Banuprakash [-- Attachment #1.1: Type: text/plain, Size: 8849 bytes --] Thank you liming. Let’s move discussion to Bugzilla. From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming Sent: Wednesday, December 15, 2021 1:56 PM To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>; Reji, RencyX <rencyx.reji@intel.com> Cc: Zhang, Qi1 <qi1.zhang@intel.com>; Kumar, Rahul1 <rahul1.kumar@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; H, Krishnaprasad <krishnaprasad.h@intel.com>; Patil, Subhashini <subhashini.patil@intel.com>; Krishnappa, Banuprakash <banuprakash.krishnappa@intel.com> Subject: 回复: [edk2-devel] [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. Rency: I add my comments into BZ. Thanks Liming 发件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> 代表 Yao, Jiewen 发送时间: 2021年12月15日 13:43 收件人: Reji, RencyX <rencyx.reji@intel.com<mailto:rencyx.reji@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> 抄送: Zhang, Qi1 <qi1.zhang@intel.com<mailto:qi1.zhang@intel.com>>; Kumar, Rahul1 <rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>>; Wang, Jian J <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>; H, Krishnaprasad <krishnaprasad.h@intel.com<mailto:krishnaprasad.h@intel.com>>; Patil, Subhashini <subhashini.patil@intel.com<mailto:subhashini.patil@intel.com>>; Krishnappa, Banuprakash <banuprakash.krishnappa@intel.com<mailto:banuprakash.krishnappa@intel.com>> 主题: Re: [edk2-devel] [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. This solution does not make sense to me. Please start a discussion with MdePkg owner at first. Thank you Yao Jiewen From: Reji, RencyX <rencyx.reji@intel.com<mailto:rencyx.reji@intel.com>> Sent: Wednesday, December 15, 2021 1:39 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>> Cc: Zhang, Qi1 <qi1.zhang@intel.com<mailto:qi1.zhang@intel.com>>; Kumar, Rahul1 <rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>>; Wang, Jian J <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>; H, Krishnaprasad <krishnaprasad.h@intel.com<mailto:krishnaprasad.h@intel.com>>; Patil, Subhashini <subhashini.patil@intel.com<mailto:subhashini.patil@intel.com>>; Krishnappa, Banuprakash <banuprakash.krishnappa@intel.com<mailto:banuprakash.krishnappa@intel.com>> Subject: RE: RE: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. Hi All, Please find the Bugzilla link created for the changes : https://bugzilla.tianocore.org/show_bug.cgi?id=3772 Thanks, Rency From: Reji, RencyX Sent: Friday, December 10, 2021 2:10 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>> Cc: Zhang, Qi1 <qi1.zhang@intel.com<mailto:qi1.zhang@intel.com>>; Kumar, Rahul1 <Rahul1.Kumar@intel.com<mailto:Rahul1.Kumar@intel.com>>; Wang, Jian J <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>>; H, Krishnaprasad <krishnaprasad.h@intel.com<mailto:krishnaprasad.h@intel.com>>; Patil, Subhashini <subhashini.patil@intel.com<mailto:subhashini.patil@intel.com>>; Krishnappa, Banuprakash <banuprakash.krishnappa@intel.com<mailto:banuprakash.krishnappa@intel.com>> Subject: RE: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. Hi All, We are developing a feature which will enable users to collect debug traces for all build targets(production & engineering builds). This feature would work even when no debug interfaces are available on systems. To support this feature we are required to extend the capability of the existing DebugLib implementation by supplementing it with a library that has the required extensions. We have done this implementation such that it can work with or without this feature enabled by encapsulating the changes within EXT_DEBUG macro. This way we are ensuring that our changes are not effecting the behavior of the DebugLib functionality in any way .Enabling this feature would require redefinition of the debug macro defined in debuglib while maintaining compatibility on builds without this feature . Since we are extending capability of DebugLib we are required to selectively define/redefine the macro definition based on the target of choice. Please find the below flow chart. [cid:image002.jpg@01D7F1CD.06C962D0] @Yao, Jiewen<mailto:jiewen.yao@intel.com> , We have some changes in Platform package of our Intel folder where we are using ExtDebug null libraries as shown below. So we have to add ExtDebuglib under library section in those inf files. #TPM SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf { <LibraryClasses> DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf !if $(EXT_DBG) == TRUE ExtDebugLib|MdePkg/Library/BaseExtDebugLibNull/BaseExtDebugLibNull.inf !endif } Thanks, Rency -----Original Message----- From: Reji, RencyX rencyx.reji@intel.com<mailto:rencyx.reji@intel.com> Sent: Wednesday, December 8, 2021 5:52 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Reji, RencyX rencyx.reji@intel.com<mailto:rencyx.reji@intel.com>; Zhang, Qi1 qi1.zhang@intel.com<mailto:qi1.zhang@intel.com>; Kumar, Rahul1 rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>; Yao, Jiewen jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>; Wang, Jian J jian.j.wang@intel.com<mailto:jian.j.wang@intel.com> Subject: [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets. We are introducing a new feature where we will be using a device to collect debug messages to extend capability of debug beyond current scope. We are required to extend capability of debug library by changing debug macro expression and collect debug messages for all target such as Debug, Release and Silent. Cc: Qi Zhang <qi1.zhang@intel.com<mailto:qi1.zhang@intel.com>> Cc: Rahul Kumar <rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>> Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>> Cc: Jian J Wang <jian.j.wang@intel.com<mailto:jian.j.wang@intel.com>> Signed-off-by: Rency Reji <RencyX.Reji@intel.com<mailto:RencyX.Reji@intel.com>> --- SecurityPkg/SecurityPkg.dsc | 1 + SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf | 1 + SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf | 1 + SecurityPkg/Tcg/TcgPei/TcgPei.inf | 1 + 4 files changed, 4 insertions(+) diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc index 73a93c2285..0f1b3d62e9 100644 --- a/SecurityPkg/SecurityPkg.dsc +++ b/SecurityPkg/SecurityPkg.dsc @@ -72,6 +72,7 @@ MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf + ExtDebugLib|MdePkg/Library/BaseExtDebugLib/BaseExtDebugLib.inf [LibraryClasses.ARM, LibraryClasses.AARCH64] # diff --git a/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf b/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf index 653dc1f64f..0b8c6af3b0 100644 --- a/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf +++ b/SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf @@ -38,6 +38,7 @@ [LibraryClasses] PeimEntryPoint PeiServicesLib + ExtDebugLib [Ppis] gPeiLockPhysicalPresencePpiGuid ## PRODUCES diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf index 06c26a2904..a11cf661ab 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf @@ -55,6 +55,7 @@ ReportStatusCodeLib ResetSystemLib PrintLib + ExtDebugLib [Guids] gTcgEventEntryHobGuid ## PRODUCES ## HOB diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.inf b/SecurityPkg/Tcg/TcgPei/TcgPei.inf index 2e3e7e0575..90d55e7256 100644 --- a/SecurityPkg/Tcg/TcgPei/TcgPei.inf +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.inf @@ -52,6 +52,7 @@ ReportStatusCodeLib Tpm12CommandLib PerformanceLib + ExtDebugLib [Guids] gTcgEventEntryHobGuid ## PRODUCES ## HOB -- 2.34.1.windows.1 [-- Attachment #1.2: Type: text/html, Size: 20413 bytes --] [-- Attachment #2: image002.jpg --] [-- Type: image/jpeg, Size: 25095 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-15 8:01 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <DM6PR11MB43775DDB23A9A67DC3AFB4DFEE719@DM6PR11MB4377.namprd11.prod.outlook.com> [not found] ` <DM6PR11MB437710173150A45380A2C6F1EE769@DM6PR11MB4377.namprd11.prod.outlook.com> 2021-12-15 5:43 ` [PATCH] SecurityPkg: Debug trace package integration to enable debug message capture on all targets Yao, Jiewen 2021-12-15 5:55 ` 回复: [edk2-devel] " gaoliming 2021-12-15 8:01 ` Yao, Jiewen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox