From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web12.9210.1592404964361979648 for ; Wed, 17 Jun 2020 07:42:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=mPSpEMMw; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: jian.j.wang@intel.com) IronPort-SDR: kVZPcsyI1XbARCHWbGm7Fp9+L9S0FpfZ04tPD4ltx+QcuViVZYRmL1N8MoDNftwA0vxDiwpO+J XoiTT4fbFycA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2020 07:42:42 -0700 IronPort-SDR: 2eI1NiVS8PpTFs06RTLSkrV+Fbarll634uRU6nRhzhVF42wjgTp0rjpwSGtRyvH71WgWEi5/nh CktGiOdwgYYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,522,1583222400"; d="scan'208";a="263337617" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by fmsmga008.fm.intel.com with ESMTP; 17 Jun 2020 07:42:42 -0700 Received: from orsmsx121.amr.corp.intel.com (10.22.225.226) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 07:42:42 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX121.amr.corp.intel.com (10.22.225.226) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 07:42:42 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.107) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 07:42:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cvINmJCQQm+fOY3qJBMY/rlombb6EPV0cT8HDx4jGeJeDQ0yN8bOqRwjuy0SzF75LRRtRdopEJ/8FVdSZ7h1Ypc4d3/RByzGw504BfvoJ+y0puiY5+QqlckyzvqCQ3gTILgpL+6JK9TDVpYTX6VeQS7jTHieVYuqMSV6Ah43gIp9AJO09IEkxIFVxZEs7Rm3/ZDvhJwU2pztT3ghLnqVP0o/rMWX6y2NQb7wKlvTO+ZMvHPvnVXMbKXjlpu9rMmS0RIg4ecYl0NcwBYPYiswUulKgSBpKCTOtjzg3sstM555ETf1TJonEz+QtSNbFAOrkNNB3OAV8HaLPADQ9kStdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kEqZNaD2QLa45jTyxnLY4Wr+AG7wGwwyp4MVoyU09k0=; b=KuX3zOD+Ir1Ig7GOQw7gjnPubYsN7z95/eaFbEioHi6Gyvs3Jio6VRFTpNmXow4kuOIXkIXe+2OF5IGl/kzuJFVY/iLLHiasrymJbcEumy6fAjfXOFDdjsYz9RorgzAhv3H7+qzqHRW4y0eCjW/FpCOxAa1Q7Dr8VBTEYRTtOziJh16nAn1zBSWicqKZzhzizS25SG/Q31dbcDmQnQhPKzHtZt0scsSxQWDPdqhDedH7WSmkMMX5m1UHAd0zSE9o9DEJIcfLKUQD10r+YyaQznROrvfLbNkufQastlF8HUQtT0tTxRB2ooCLpWaP5JUKgnex6AMyOrcfOM57E9WwcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kEqZNaD2QLa45jTyxnLY4Wr+AG7wGwwyp4MVoyU09k0=; b=mPSpEMMwwZ887RyjrvHH63Ek4/d+IxQmOwrwl2SiTiIX3/WJD0XU6sg333CG0ceOqCrJeXUQnJAQqco6kFaFWlXLJZU1lbDVyeygsEo80bwnDKn0OxgP3IFLlnLC7yuHbITKCJlrX+twWfYnDPbCTAHaPfd3uMgz2CwCox+qWXA= Received: from SN6PR11MB3312.namprd11.prod.outlook.com (2603:10b6:805:c8::14) by SA0PR11MB4671.namprd11.prod.outlook.com (2603:10b6:806:9f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Wed, 17 Jun 2020 14:42:40 +0000 Received: from SN6PR11MB3312.namprd11.prod.outlook.com ([fe80::31f6:24c6:99f0:33d2]) by SN6PR11MB3312.namprd11.prod.outlook.com ([fe80::31f6:24c6:99f0:33d2%6]) with mapi id 15.20.3109.021; Wed, 17 Jun 2020 14:42:40 +0000 From: "Wang, Jian J" To: "Tan, Ming" , "devel@edk2.groups.io" CC: "Wu, Hao A" Subject: Re: [PATCH v5 1/1] MdeModulePkg.dec: Change PCDs for status code. Thread-Topic: [PATCH v5 1/1] MdeModulePkg.dec: Change PCDs for status code. Thread-Index: AQHWRHn62P5UhdZsTUWyJbpaTG6+Lqjc4hkg Date: Wed, 17 Jun 2020 14:42:40 +0000 Message-ID: References: <20200617073556.54429-1-ming.tan@intel.com> In-Reply-To: <20200617073556.54429-1-ming.tan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.211] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 02563443-1165-41f3-0034-08d812ccafe1 x-ms-traffictypediagnostic: SA0PR11MB4671: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 04371797A5 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +9IxBOe9+iB0U3Bo4zlYO01EshbssfcL30FDsBCCRSw1TqyO3O8Yh6gWu8n6yXMqKHlS1WyQnyg7CcjXaQjNYX5UBlowqA8moiWm0VmnQFuR9VqDgrD0QqBwdO/N/jdfJuzskJhylgB93dlfDBGB3SrwCpwVML2rw5c37829CS4hnsQYT+Emm2Q2llyxEmfb4K1ATDfAY9QJvERyjXS52viGcQvN+rYVq9TQEJeJ2zOP5m7BpfqGUBW+yuWZwFAr4w4znfC0mZlpq+bgF1mmEB5pjYsdcXjsDXzCCgiUE5QUB68+rI6cZ8ZhOVyuBk3EY3xz2DeUZpnSuk1KOiBKAirDitv4cw/GBIV/11wtCsjhtYDU6zbQfclm/lKXkY525zSBlH04Tt00sL35bPqtdA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB3312.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(346002)(376002)(396003)(366004)(39860400002)(136003)(6506007)(7696005)(53546011)(110136005)(316002)(76116006)(86362001)(26005)(71200400001)(66946007)(64756008)(66574015)(66446008)(66556008)(186003)(83380400001)(30864003)(66476007)(2906002)(8936002)(52536014)(8676002)(33656002)(55016002)(5660300002)(966005)(107886003)(478600001)(9686003)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: hh64NpJUbWVE+zyNumSBL/ozqvBU/zIUvQwn+s0qg++iFZF0YFF9ou243FE4PhjQhsLh4DXyM4MROdRB5tkCxoIIFQjEbwGSGc9GUYOYTTwDiXy4HAL3qxeo3mDUFwecXem941s6bFkQnRRdX1VFN0qdaJDao+WVvwXgJnb6P16/H0rr/50aUDarQN2SmLjL9UGH3lxx7H6a7LDnuQUKvkMlGibAzfm73gM4x51pZ9PpxHykP/ujgp8y3NNO1RD+oLqg8UC9E2+U0mwhDSJvmJD7fl0CmXfkBHNmBakau020M/MQ9lp8rVX7VKbdEERbKJ8dVv+WfN/H03v2cNhJoFBGq9QY+ddlZ4vp+dHipi6duE17JC7UV2bmOZy4htYouAQyYuLUmTNI6PSN8kNDrZJYQTf5cZ8QOWHNdVeY7jy28J80XjYD2eywO/1biWyTmKc1n7oOPiwHGk8TL3oigGHqEZkmmSpjBvdqe/rYWaYNTN//+rT2I5A1ycE9/bYe MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 02563443-1165-41f3-0034-08d812ccafe1 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2020 14:42:40.5402 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KPqAkcCdYJd7pXIaAmFumdSbUd9C769MRZsJBZaVM5ESNlTLek7ilymlRLEdu6bdyY2UUy8u6fak5ATsaNsxBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4671 Return-Path: jian.j.wang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jian J Wang Regards, Jian > -----Original Message----- > From: Tan, Ming > Sent: Wednesday, June 17, 2020 3:36 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Wu, Hao A > Subject: [PATCH v5 1/1] MdeModulePkg.dec: Change PCDs for status code. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2786 >=20 > In order to support enable/disable report status code through memory > or serial dynamic, change the following PCDs from [PcdsFeatureFlag] to > [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]: > PcdStatusCodeUseSerial > PcdStatusCodeUseMemory > The original plaforms can use PcdsFixedAtBuild in .dsc files to save size= . > Currently do not remove the old pcd type to keep compatible. >=20 > Cc: Jian J Wang > Cc: Hao A Wu > Signed-off-by: Ming Tan > --- > V5: Do not remove th old pcd type to keep compatible, and change to > standalone patch. > V4: No change for this 1/4 patch, just modify the 2-4/4 patchs. > V3: Split one patch to several patchs, each Pkg has one patch. > V2: Change the new type from [PcdsDynamic] to [PcdsFixedAtBuild, > PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] > And set to PcdsFixedAtBuild in the original platform .dsc files. >=20 > MdeModulePkg/MdeModulePkg.dec | 13 +++++++++++++ > .../StatusCodeHandler/Pei/StatusCodeHandlerPei.c | 6 +++--- > .../Pei/StatusCodeHandlerPei.inf | 6 ++---- > .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c | 16 ++++++++-------- > .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf | 6 ++---- > .../StatusCodeHandler/Smm/StatusCodeHandlerSmm.c | 10 +++++----- > .../Smm/StatusCodeHandlerSmm.inf | 6 ++---- > 7 files changed, 35 insertions(+), 28 deletions(-) >=20 > diff --git a/MdeModulePkg/MdeModulePkg.dec > b/MdeModulePkg/MdeModulePkg.dec > index 4f44af694862..bd369d1f230e 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -2001,6 +2001,19 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, > PcdsDynamic, PcdsDynamicEx] > # @Prompt TCG Platform Firmware Profile revision. >=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdTcgPfpMeasurementRevision|0|UINT3 > 2|0x00010077 >=20 > + ## Indicates if StatusCode is reported via Serial port.

> + # TRUE - Reports StatusCode via Serial port.
> + # FALSE - Does not report StatusCode via Serial port.
> + # @Prompt Enable StatusCode via Serial port. > + > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN| > 0x00010022 > + > + ## Indicates if StatusCode is stored in memory. > + # The memory is boot time memory in PEI Phase and is runtime memory i= n > DXE Phase.

> + # TRUE - Stores StatusCode in memory.
> + # FALSE - Does not store StatusCode in memory.
> + # @Prompt Enable StatusCode via memory. > + > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE|BOOLEA > N|0x00010023 > + > [PcdsPatchableInModule] > ## Specify memory size with page number for PEI code when > # Loading Module at Fixed Address feature is enabled. > diff --git > a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c > b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c > index 1b07f92f3ce8..9b2ea4ee84d9 100644 > --- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c > +++ > b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c > @@ -2,7 +2,7 @@ > Report Status Code Handler PEIM which produces general handlers and ho= ok > them > onto the PEI status code router. >=20 > - Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
> + Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -45,13 +45,13 @@ StatusCodeHandlerPeiEntry ( > // If enable UseSerial, then initialize serial port. > // if enable UseMemory, then initialize memory status code worker. > // > - if (FeaturePcdGet (PcdStatusCodeUseSerial)) { > + if (PcdGetBool (PcdStatusCodeUseSerial)) { > Status =3D SerialPortInitialize(); > ASSERT_EFI_ERROR (Status); > Status =3D RscHandlerPpi->Register (SerialStatusCodeReportWorker); > ASSERT_EFI_ERROR (Status); > } > - if (FeaturePcdGet (PcdStatusCodeUseMemory)) { > + if (PcdGetBool (PcdStatusCodeUseMemory)) { > Status =3D MemoryStatusCodeInitializeWorker (); > ASSERT_EFI_ERROR (Status); > Status =3D RscHandlerPpi->Register (MemoryStatusCodeReportWorker); > diff --git > a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > index 8aef9af34a05..64380ddfaccc 100644 > --- > a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > +++ > b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > @@ -53,11 +53,9 @@ [Guids] > [Ppis] > gEfiPeiRscHandlerPpiGuid ## CONSUMES >=20 > -[FeaturePcd] > - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## > CONSUMES > - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES > - > [Pcd] > + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES > + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## > CONSUMES >=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|gEfiMdeMod > ulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## > SOMETIMES_CONSUMES >=20 > [Depex] > diff --git > a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl > erRuntimeDxe.c > b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl > erRuntimeDxe.c > index 79cc48fa55a4..a8c0fe5b7149 100644 > --- > a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl > erRuntimeDxe.c > +++ > b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl > erRuntimeDxe.c > @@ -2,7 +2,7 @@ > Status Code Handler Driver which produces general handlers and hook th= em > onto the DXE status code router. >=20 > - Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> + Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -29,7 +29,7 @@ UnregisterBootTimeHandlers ( > IN VOID *Context > ) > { > - if (FeaturePcdGet (PcdStatusCodeUseSerial)) { > + if (PcdGetBool (PcdStatusCodeUseSerial)) { > mRscHandlerProtocol->Unregister (SerialStatusCodeReportWorker); > } > } > @@ -80,14 +80,14 @@ InitializationDispatcherWorker ( > // If enable UseSerial, then initialize serial port. > // if enable UseRuntimeMemory, then initialize runtime memory status c= ode > worker. > // > - if (FeaturePcdGet (PcdStatusCodeUseSerial)) { > + if (PcdGetBool (PcdStatusCodeUseSerial)) { > // > // Call Serial Port Lib API to initialize serial port. > // > Status =3D SerialPortInitialize (); > ASSERT_EFI_ERROR (Status); > } > - if (FeaturePcdGet (PcdStatusCodeUseMemory)) { > + if (PcdGetBool (PcdStatusCodeUseMemory)) { > Status =3D RtMemoryStatusCodeInitializeWorker (); > ASSERT_EFI_ERROR (Status); > } > @@ -115,7 +115,7 @@ InitializationDispatcherWorker ( > // > // Dispatch records to devices based on feature flag. > // > - if (FeaturePcdGet (PcdStatusCodeUseSerial)) { > + if (PcdGetBool (PcdStatusCodeUseSerial)) { > SerialStatusCodeReportWorker ( > Record[Index].CodeType, > Record[Index].Value, > @@ -124,7 +124,7 @@ InitializationDispatcherWorker ( > NULL > ); > } > - if (FeaturePcdGet (PcdStatusCodeUseMemory)) { > + if (PcdGetBool (PcdStatusCodeUseMemory)) { > RtMemoryStatusCodeReportWorker ( > Record[Index].CodeType, > Record[Index].Value, > @@ -171,10 +171,10 @@ StatusCodeHandlerRuntimeDxeEntry ( > // > InitializationDispatcherWorker (); >=20 > - if (FeaturePcdGet (PcdStatusCodeUseSerial)) { > + if (PcdGetBool (PcdStatusCodeUseSerial)) { > mRscHandlerProtocol->Register (SerialStatusCodeReportWorker, > TPL_HIGH_LEVEL); > } > - if (FeaturePcdGet (PcdStatusCodeUseMemory)) { > + if (PcdGetBool (PcdStatusCodeUseMemory)) { > mRscHandlerProtocol->Register (RtMemoryStatusCodeReportWorker, > TPL_HIGH_LEVEL); > } >=20 > diff --git > a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl > erRuntimeDxe.inf > b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl > erRuntimeDxe.inf > index d74c2a55dcaf..faadfd9578fe 100644 > --- > a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl > erRuntimeDxe.inf > +++ > b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl > erRuntimeDxe.inf > @@ -58,12 +58,10 @@ [Guids] > [Protocols] > gEfiRscHandlerProtocolGuid ## CONSUMES >=20 > -[FeaturePcd] > +[Pcd] > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeReplayIn ## CONSUMES > - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## > CONSUMES > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES > - > -[Pcd] > + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## > CONSUMES > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## > SOMETIMES_CONSUMES >=20 > [Depex] > diff --git > a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm. > c > b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm. > c > index f54991ed3f67..20271571ded4 100644 > --- > a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm. > c > +++ > b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm. > c > @@ -2,7 +2,7 @@ > Status Code Handler Driver which produces general handlers and hook th= em > onto the SMM status code router. >=20 > - Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
> + Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -28,14 +28,14 @@ InitializationDispatcherWorker ( > // If enable UseSerial, then initialize serial port. > // if enable UseRuntimeMemory, then initialize runtime memory status c= ode > worker. > // > - if (FeaturePcdGet (PcdStatusCodeUseSerial)) { > + if (PcdGetBool (PcdStatusCodeUseSerial)) { > // > // Call Serial Port Lib API to initialize serial port. > // > Status =3D SerialPortInitialize (); > ASSERT_EFI_ERROR (Status); > } > - if (FeaturePcdGet (PcdStatusCodeUseMemory)) { > + if (PcdGetBool (PcdStatusCodeUseMemory)) { > Status =3D MemoryStatusCodeInitializeWorker (); > ASSERT_EFI_ERROR (Status); > } > @@ -73,10 +73,10 @@ StatusCodeHandlerSmmEntry ( > // > InitializationDispatcherWorker (); >=20 > - if (FeaturePcdGet (PcdStatusCodeUseSerial)) { > + if (PcdGetBool (PcdStatusCodeUseSerial)) { > mRscHandlerProtocol->Register (SerialStatusCodeReportWorker); > } > - if (FeaturePcdGet (PcdStatusCodeUseMemory)) { > + if (PcdGetBool (PcdStatusCodeUseMemory)) { > mRscHandlerProtocol->Register (MemoryStatusCodeReportWorker); > } >=20 > diff --git > a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.i > nf > b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.i > nf > index 47d0545f9591..4e24d87e55d1 100644 > --- > a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.i > nf > +++ > b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.i > nf > @@ -53,11 +53,9 @@ [Guids] > [Protocols] > gEfiSmmRscHandlerProtocolGuid ## CONSUMES >=20 > -[FeaturePcd] > - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## > CONSUMES > - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES > - > [Pcd] > + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES > + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## > CONSUMES > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## > SOMETIMES_CONSUMES >=20 > [Depex] > -- > 2.24.0.windows.2