From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.7493.1576745638244995394 for ; Thu, 19 Dec 2019 00:53:58 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: rangasai.v.chaganty@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2019 00:53:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,331,1571727600"; d="scan'208";a="206134721" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga007.jf.intel.com with ESMTP; 19 Dec 2019 00:53:57 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Dec 2019 00:53:57 -0800 Received: from fmsmsx104.amr.corp.intel.com ([169.254.3.117]) by fmsmsx156.amr.corp.intel.com ([169.254.13.211]) with mapi id 14.03.0439.000; Thu, 19 Dec 2019 00:53:56 -0800 From: "Chaganty, Rangasai V" To: "Kubacki, Michael A" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , "Dong, Eric" , "Gao, Liming" Subject: Re: [edk2-platforms][PATCH V1 1/1] Features/Intel/AcpiDebugFeaturePkg: Add feature active PCD Thread-Topic: [edk2-platforms][PATCH V1 1/1] Features/Intel/AcpiDebugFeaturePkg: Add feature active PCD Thread-Index: AQHVtkIToGJBgz58/kSXEx0/wngbjKfBJpow Date: Thu, 19 Dec 2019 08:53:56 +0000 Message-ID: References: <20191219075748.31380-1-michael.a.kubacki@intel.com> In-Reply-To: <20191219075748.31380-1-michael.a.kubacki@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjE1YTAwNmUtOWYwZS00NzMzLWFiMjYtZTA3MDFiYjUzMzI2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMGIrQXUwdERUTWNOMERJUm9DQWZsOUtEV0Q3MSt2R1hKSjVlQnZFVTVwVnZid2hrXC9MWE91ZDNsOWZLcVE2YmkifQ== x-ctpclassification: CTP_NT x-originating-ip: [10.1.200.106] MIME-Version: 1.0 Return-Path: rangasai.v.chaganty@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Sai Chaganty -----Original Message----- From: Kubacki, Michael A=20 Sent: Wednesday, December 18, 2019 11:58 PM To: devel@edk2.groups.io Cc: Chaganty, Rangasai V ; Chiu, Chasel ; Dong, Eric ; Gao, Liming Subject: [edk2-platforms][PATCH V1 1/1] Features/Intel/AcpiDebugFeaturePkg:= Add feature active PCD Adds a dynamic PCD that specifies whether the feature is active. This is useful because the feature might be enabled via FeatureFlag PCD Pcd= AcpiDebugFeatureEnable meaning it is built and included in the flash image = but the board might need to control whether the feature is active based on = input such as a Setup menu option. A deactivated feature will be dispatched but simply exit in the entry point= . Cc: Sai Chaganty Cc: Chasel Chiu Cc: Eric Dong Cc: Liming Gao Signed-off-by: Michael Kubacki --- Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec = | 14 +++++++++++++- Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.= inf | 5 +++-- Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSm= m/AcpiDebugSmm.inf | 5 +++-- Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebug.c = | 4 ++++ Features/Intel/Debugging/AcpiDebugFeaturePkg/Readme.md = | 1 + 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeatureP= kg.dec b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d= ec index a74ee3e084..c3bd89fe2b 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d +++ ec @@ -34,6 +34,18 @@ gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize|0x10000|UINT32= |0xF0000001 =20 [PcdsDynamic, PcdsDynamicEx] + ## This PCD specifies whether the feature is active. + # + # The PCD value can be modified at boot time to activate and deactivate= the feature functionality. + # + # Note that this differs from PcdFeatureEnable which=20 + determines whether the feature is included # as an advanced feature=20 + in the flash image. If enabled, the feature is then eligible to be activa= ted/deactivated # via this PCD. + # + # An enabled but deactivated feature will be dispatched but exit in=20 + its entry point without performing any # feature actions. + =20 + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureActive|TRUE|BOOL + EAN|0xD0000001 + ## This PCD specifies ACPI debug message buffer address. # The PCD value will be updated during boot time when the buffer is all= ocated. - gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugAddress|0|UINT32|0xD00000= 01 + =20 + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugAddress|0|UINT32|0xD000 + 0002 diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/A= cpiDebugDxe.inf b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxe= Smm/AcpiDebugDxe.inf index dfcee0a842..b293d83cd9 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebu= gDxe.inf +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD +++ ebugDxe.inf @@ -35,8 +35,9 @@ Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec =20 [Pcd] - gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize ## CONSUMES - gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugAddress ## PRODUCES + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureActive ## CONSUME= S + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize ## CONSUME= S + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugAddress ## PRODUCE= S =20 [Sources] AcpiDebug.c diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/A= cpiDebugSmm.inf b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxe= Smm/AcpiDebugSmm.inf index 089bb57707..dbb33e4ae2 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebu= gSmm.inf +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD +++ ebugSmm.inf @@ -36,8 +36,9 @@ Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec =20 [Pcd] - gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize ## CONSUMES - gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugAddress ## PRODUCES + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureActive ## CONSUME= S + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize ## CONSUME= S + gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugAddress ## PRODUCE= S =20 [Sources] AcpiDebug.c diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/A= cpiDebug.c b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/A= cpiDebug.c index 42428d8005..4caeffc7de 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebu= g.c +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD +++ ebug.c @@ -289,6 +289,10 @@ InitializeAcpiDebugDxe ( EFI_STATUS Status; EFI_EVENT EndOfDxeEvent; =20 + if (!PcdGetBool (PcdAcpiDebugFeatureActive)) { + return EFI_SUCCESS; + } + // // Register EndOfDxe notification // that point could ensure the Acpi Debug related PCDs initialized. diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Readme.md b/Featu= res/Intel/Debugging/AcpiDebugFeaturePkg/Readme.md index bc0dce9348..bbd7675c11 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Readme.md +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Readme.md @@ -78,6 +78,7 @@ instance assigned to `AcpiDebugSmm`. =20 ## Configuration * PcdAcpiDebugEnable - Enables this feature. +* PcdAcpiDebugFeatureActive - Activates this feature. * PcdAcpiDebugAddress - The address of the ACPI debug message buffer. * PcdAcpiDebugBufferSize - The size of the ACPI debug message buffer. =20 -- 2.16.2.windows.1