From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.5586.1608703781174470516 for ; Tue, 22 Dec 2020 22:09:42 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=tpKYLTlf; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: hao.a.wu@intel.com) IronPort-SDR: aGLvTEqgHp/cpFSovhzIdFcrPC2CQGZbdQpSfBb1gFVCdAYNrcMlPwyG0C6ZHp/IthkYbb4RxN BwK9zQIT56fg== X-IronPort-AV: E=McAfee;i="6000,8403,9843"; a="240052460" X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208,217";a="240052460" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2020 22:09:40 -0800 IronPort-SDR: krylYn6OMWf5IF53busRqNpZ1aofOf6qtDt39c9zCAgPx3O2nNKinCJBTzK+XQDsM7/2OIa+XB Tz00Yvs/Qctw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208,217";a="417056958" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga001.jf.intel.com with ESMTP; 22 Dec 2020 22:09:39 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 22 Dec 2020 22:09:38 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 22 Dec 2020 22:09:38 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 22 Dec 2020 22:09:38 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bNVwNnYc6D4aueXsdTvL58X+sXtWhDqMnx+AQu3iDkebk1B0pEqDQx1Y+qd4tm0Xb1PonpRbE4kMFo3OVcUrzzOPdYoSOFFlD1fQB2u7lHNGVPOJCCavRFTOH06ziEa4owmmu1i+Xk2uIhOhjm4jCKCUpd/Erhihyf4E4b8pkqdhSD1PaS5ue9sGAviqKgJUhfENApvmb7mdG3C6QdQnaWVo3qtltoMGGW+OLxCyiw1cfRpPklxUOEOcCJuN544E/gRW9F7ZaVlaDMyZTeBfyOzdd72Hubu+wh1oDZoqOJQygx+HbAJV0+vs1MEHdzDW2RLMNH8tMYMlj7C3hQ3bSw== 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=ChUzJjQ+S+RLUy5PumqcIthhuBCRAx9sc2UINtnmNIs=; b=bZU9/M63TgWe6tZOTicYaoNaubL/RT+d/4n3SWEv1yPiv6i0hjZLGF+S2wF6E9h+fHE6cQgC0TXWPPNyutlvlfcUVi9tjffHKz5tQI3x3QhoS4QbHJ5zojgZU+p+BbG/TkX+yJ0duD5ka1CzjrIGIf8+6QqL2OPX8CAp3hhu66UuRHRuHJxcVN3gexAI3DoGNLdNCiIWfo4Wsy57xfWbizF3Azyz+xPYb28RzQN+etFyOSAgGtip6MtP80UFZ1U9gAtMl5bTikwtg4LCBlI+ikSbAkQVOLC3o24VFY06pG/l2GdYBx73tagGTSc/XW3Q2WGHSGjBZdoP9ZFHzuioaQ== 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=ChUzJjQ+S+RLUy5PumqcIthhuBCRAx9sc2UINtnmNIs=; b=tpKYLTlfjIds1uFXBUZNdjnAqM3ETybmIwloOocdBReM1rwPr1isFSqFBq6/6JefeaRYNubG4+v3PZKHZLy/BS5dkLUON8rp0D/fkaX/MBugtz6/m9q0Mogov57xjUokvcOdzUXwvzsNcrGXPBfGnQR9nlK2iNylRWKNZroKJAY= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR1101MB2162.namprd11.prod.outlook.com (2603:10b6:405:50::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27; Wed, 23 Dec 2020 06:09:36 +0000 Received: from BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::4cda:993f:ffc1:f169]) by BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::4cda:993f:ffc1:f169%6]) with mapi id 15.20.3676.033; Wed, 23 Dec 2020 06:09:36 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "kun.q@outlook.com" , Liming Gao , "Yao, Jiewen" CC: "Wang, Jian J" , "Bi, Dandan" Subject: Re: [edk2-devel] [PATCH v1 06/15] MdeModulePkg: SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm Thread-Topic: [edk2-devel] [PATCH v1 06/15] MdeModulePkg: SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm Thread-Index: AQHW1W61ScmL5NLcbUmmc+H0JFMrfKoCdH2ggAEOMYCAALZDgA== Date: Wed, 23 Dec 2020 06:09:36 +0000 Message-ID: References: <20201218185011.1366-1-kun.q@outlook.com> , In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3c9f4fcf-aae9-44f7-e093-08d8a7095341 x-ms-traffictypediagnostic: BN6PR1101MB2162: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OmO4DErd5DaMRaiWU/2NxdEFNqh3Zl5pf95AoZcMzOckTQOsd6LkAXs7FGoII7+fUl/xJyLJ4eLNsMKQ+w+pzgfL8E4opw0lx9XtvakIQS/2FoLDU09IrU/bcJ+VHn90mXZ7Ld4+6zJFNLie5JnToQe7M+U8eJF/Q0BWD00gIWzeZW79aPxGrgBdznCzAd1ph2luwi+5ESCrgxXKzejlQ2+M8g/diItjKL/pVsBRY8xWFtsltERdoKzWT3eQbatx8hWPMyn43Wp6pfCjbvzUOGY01FV/zTv+9Uv42wkqX0itQA+TPdjPW6XzHx3tnShOo5PWoouQK0BOeDpTEwHdko/A2mOsbh4HolC7ayMw4Gj0ue5UttEMXhT7Aultil7HFYCg6/eMRUY+yevrbEBS3VqFHCamlUQdBoa2gsPNU1i9YWQVfVXVJbU0cXb6nVyXPFRvxopHjbcGaCfYHYtfltjKTmJH1Sg4+ibfDmMOKIxnKorogEMBomP3N+3qP2aqFXOPvhWaz5yxjioqxR6zBQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3666.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(366004)(346002)(396003)(39860400002)(136003)(71200400001)(33656002)(66946007)(83380400001)(107886003)(6636002)(86362001)(26005)(5660300002)(186003)(166002)(4326008)(66476007)(7696005)(53546011)(110136005)(8676002)(316002)(30864003)(9686003)(54906003)(8936002)(76116006)(478600001)(76236003)(9326002)(45080400002)(2906002)(52536014)(55016002)(6506007)(64756008)(66556008)(66446008)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?llWNExoeh/gNR3X6xfdOSumKiJspAaF8Qvfa45jLYmnIyFX8uC7VwICwg59X?= =?us-ascii?Q?UoTuR8DkJStaWb5SKaeldlUzbfl0OAiN4BAqPwAoZ3mcFthRomnC+GZOgms3?= =?us-ascii?Q?Td5GoR/M24cFUOJArGkU+WC8sdwXYbJaV9bY0U/mYjMWmJRgEMPmMmvWsn/3?= =?us-ascii?Q?VxkPy10FugfQ2EZEN2NW5AyHQ7bqdt0loAdzzTNBzXF1pxoUVh6nPBsjHCNN?= =?us-ascii?Q?XWh3Le44Wrs4luoRaoR8QrWQOxSyKwgqRdp3Ht29brrEMwq89t9kjCEUOwel?= =?us-ascii?Q?BZiC9etGUNwsF606iD7XZo+TUtL4fXWx9Scy/zkSeebywD8OUjLIMLt5r8eg?= =?us-ascii?Q?cv0QdjFonAVCFBxCf2449Z6PLZVhMtmYEBJgx0zGqPa6Cg91jGurN5i/dMtL?= =?us-ascii?Q?6xQtss+hpN52qvYpXi2l9ZcVMPip/DATo8tFK5Or+J6AP0ga87x1ii2+YZ0L?= =?us-ascii?Q?ylEmCwgNRTpFXto5Dg8MA72WCiV0YbYwyttuaDYPPW+lhFyBPPP3wnMkCBY4?= =?us-ascii?Q?w36lX80sWL8gmzH4Zi9+JWtBIiIiGO89L+KX2wiCuWrf31JDtN3cgE8MIWuO?= =?us-ascii?Q?YmaWOcV50Jorvu5O/Zuz6mk0MrdVqN5o+T/H2QBpxilEhXUSlZK/H+xvbebT?= =?us-ascii?Q?lXCeZ4nWbCsTXNeddNu2fkm/m4sX9HGhvhjtudZI1pyNviTuaEgjhNKx2aKV?= =?us-ascii?Q?XyAt8aXnQNnpfcMQz+bH1WPxvGD+pyqyqpp7Y69RlbFwKC8JuLS+Q9oVAYW3?= =?us-ascii?Q?D8UqKzwyhoKNjMFpQncoOn0rvNA0xweCI4sZOwgag0+QMkdhYhbV+dZEXo//?= =?us-ascii?Q?Re/KM6L9L/ksPonOo7L78oW8K8yaNHtumK5rSshO5AA6J2HgpGo9tVVRlfap?= =?us-ascii?Q?cE5m/EwWEHLUPkqBQGjBA9NuGUbWtRknu3JJg5qS85/Rj4Y1M/YQhenJhEhp?= =?us-ascii?Q?2n7aG7OwJIu4WLEr0muTqVq/b2JmUexknfTz1CVABHnpTznnurEDVIXHAeDb?= =?us-ascii?Q?kHF4?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3666.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c9f4fcf-aae9-44f7-e093-08d8a7095341 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2020 06:09:36.5106 (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: ULKQh9eufBvkqo7ZqH5ChLTdhFsKtnPuDwWKWbuUHKg5zBtnncnX9IuWvDiCOFYeHROwzpaZm+NvhM/FUuoIyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1101MB2162 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BN8PR11MB3666936A465DBD0C219A505ECADE0BN8PR11MB3666namp_" --_000_BN8PR11MB3666936A465DBD0C219A505ECADE0BN8PR11MB3666namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello Kun, Got it, thanks for the explanation. My preference is the same with your cu= rrent proposal in the patch. Hello Liming and Jiewen, Do you have comments for this case? Thanks in advance. Best Regards, Hao Wu From: devel@edk2.groups.io On Behalf Of Kun Qin Sent: Wednesday, December 23, 2020 3:15 AM To: devel@edk2.groups.io; Wu, Hao A Cc: Wang, Jian J ; Bi, Dandan = ; Liming Gao ; Yao, Jiewen Subject: Re: [edk2-devel] [PATCH v1 06/15] MdeModulePkg: SmmReportStatusCo= deLib: ReportStatusCodeLib in StandaloneMm Hi Hao, That was my original plan, but doing it might require a MmServiceTableLib = instance for SMM_CORE type if PiSmmCore links in RSC lib (similar to PiSmmC= oreSmmServicesTableLib). We can create such an instance just like PiSmmCore= SmmServicesTableLib, but the implementation will pull in gSmmCoreSmst as an= external variable and cast it from `EFI_SMM_SYSTEM_TABLE2` to `EFI_MM_SYST= EM_TABLE`, which does not look clean. Thus I just abstract the routine to a= void it. Please let me know if you have better ideas, I can add the change for next= patch series. Thanks, Kun From: Wu, Hao A Sent: Tuesday, December 22, 2020 00:35 To: devel@edk2.groups.io; kun.q@outlook.com Cc: Wang, Jian J; Bi, Dandan; Liming Gao; Yao, Jiewen Subject: Re: [edk2-devel] [PATCH v1 06/15] MdeModulePkg: SmmReportStatusCo= deLib: ReportStatusCodeLib in StandaloneMm > -----Original Message----- > From: devel@edk2.groups.io > On Behalf Of Kun Qin > Sent: Saturday, December 19, 2020 2:50 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J >; = Wu, Hao A >; > Bi, Dandan >; Liming Gao= > > Subject: [edk2-devel] [PATCH v1 06/15] MdeModulePkg: > SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm > > This change added support of StandaloneMm for ReportStatusCodeLib. It > adds a new instance of ReportStatusCodeLib for MM_STANDALONE type, > and abstracts the references of gMmst and gSmst functionalities into > separate files in order to link in proper Service Table for SMM core/dri= vers. Sorry for a question. Do you think it is feasible to use: gMmst->MmLocateProtocol to locate gEfiMmStatusCodeProtocolGuid and avoid introducing 2 separate implementations for internal function Int= ernalLocateProtocol()? Since I found that the definitions for gEfiMmStatusCodeProtocolGuid an gEf= iSmmStatusCodeProtocolGuid are identical. Best Regards, Hao Wu > > Cc: Jian J Wang > > Cc: Hao A Wu > > Cc: Dandan Bi > > Cc: Liming Gao > > > Signed-off-by: Kun Qin > > --- > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c > | 16 ++++---- > > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibSta > ndaloneMm.c | 39 ++++++++++++++++++++ > > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibTra > ditional.c | 39 ++++++++++++++++++++ > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.h > | 37 +++++++++++++++++++ > > MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi > b.inf | 4 +- > > MdeModulePkg/Library/SmmReportStatusCodeLib/{SmmReportStatusCode > Lib.inf =3D> StandaloneMmReportStatusCodeLib.inf} | 17 +++++---- > MdeModulePkg/MdeModulePkg.dsc > | 1 + > 7 files changed, 137 insertions(+), 16 deletions(-) > > diff --git > a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > c > index 3a1772538cdf..fb1769db9223 100644 > --- > a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > c > @@ -1,5 +1,5 @@ > /** @file > - Report Status Code Library for SMM Phase. > + Report Status Code Library for MM Phase. > > Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent @@ -8,7 +8,7 @@ > > #include #include = - > #include > +#include > #include > #include > #include > @@ -16,10 +16,12 @@ > > #include > #include -#include > > +#include > > -EFI_SMM_REPORT_STATUS_CODE mReportStatusCode =3D NULL; > -EFI_SMM_STATUS_CODE_PROTOCOL *mStatusCodeProtocol =3D NULL; > +#include "ReportStatusCodeLib.h" > + > +EFI_MM_REPORT_STATUS_CODE mReportStatusCode =3D NULL; > +EFI_MM_STATUS_CODE_PROTOCOL *mStatusCodeProtocol =3D NULL; > > > /** > @@ -29,14 +31,14 @@ EFI_SMM_STATUS_CODE_PROTOCOL > *mStatusCodeProtocol =3D NULL; > NULL is returned if no status code service is available. > > **/ > -EFI_SMM_REPORT_STATUS_CODE > +EFI_MM_REPORT_STATUS_CODE > InternalGetReportStatusCode ( > VOID > ) > { > EFI_STATUS Status; > > - Status =3D gSmst->SmmLocateProtocol (&gEfiSmmStatusCodeProtocolGuid, > NULL, (VOID**)&mStatusCodeProtocol); > + Status =3D InternalLocateProtocol (&gEfiMmStatusCodeProtocolGuid, NUL= L, > + (VOID**)&mStatusCodeProtocol); > if (!EFI_ERROR (Status) && mStatusCodeProtocol !=3D NULL) { > return mStatusCodeProtocol->ReportStatusCode; > } > diff --git > a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibS > tandaloneMm.c > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibS > tandaloneMm.c > new file mode 100644 > index 000000000000..fc47dffe9ffb > --- /dev/null > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibS > ta > +++ ndaloneMm.c > @@ -0,0 +1,39 @@ > +/** @file > + Abstraction layer for MM service table used by MM ReportStatusCodeLib= . > + > + Copyright (c) Microsoft Corporation. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +#include > + > +/** > + Returns the first protocol instance that matches the given protocol. > + > + @param[in] Protocol Provides the protocol to search for. > + @param[in] Registration Optional registration key returned from > + RegisterProtocolNotify(). > + @param[out] Interface On return, a pointer to the first inter= face that > matches Protocol and > + Registration. > + > + @retval EFI_SUCCESS A protocol instance matching Protocol w= as > found and returned in > + Interface. > + @retval EFI_NOT_FOUND No protocol instances were found that > match Protocol and > + Registration. > + @retval EFI_INVALID_PARAMETER Interface is NULL. > + Protocol is NULL. > + > +**/ > +EFI_STATUS > +EFIAPI > +InternalLocateProtocol ( > + IN EFI_GUID *Protocol, > + IN VOID *Registration, OPTIONAL > + OUT VOID **Interface > + ) > +{ > + return gMmst->MmLocateProtocol (Protocol, Registration, Interface); } > diff --git > a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibT > raditional.c > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibT > raditional.c > new file mode 100644 > index 000000000000..6b3a7c6051c5 > --- /dev/null > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibT > ra > +++ ditional.c > @@ -0,0 +1,39 @@ > +/** @file > + Abstraction layer for SMM service table used by SMM > ReportStatusCodeLib. > + > + Copyright (c) Microsoft Corporation. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +#include > + > +/** > + Returns the first protocol instance that matches the given protocol. > + > + @param[in] Protocol Provides the protocol to search for. > + @param[in] Registration Optional registration key returned from > + RegisterProtocolNotify(). > + @param[out] Interface On return, a pointer to the first inter= face that > matches Protocol and > + Registration. > + > + @retval EFI_SUCCESS A protocol instance matching Protocol w= as > found and returned in > + Interface. > + @retval EFI_NOT_FOUND No protocol instances were found that > match Protocol and > + Registration. > + @retval EFI_INVALID_PARAMETER Interface is NULL. > + Protocol is NULL. > + > +**/ > +EFI_STATUS > +EFIAPI > +InternalLocateProtocol ( > + IN EFI_GUID *Protocol, > + IN VOID *Registration, OPTIONAL > + OUT VOID **Interface > + ) > +{ > + return gSmst->SmmLocateProtocol (Protocol, Registration, Interface); > +} > diff --git > a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > h > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > h > new file mode 100644 > index 000000000000..9a16741e64f6 > --- /dev/null > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > h > @@ -0,0 +1,37 @@ > +/** @file > + Report Status Code Library for MM Phase. > + > + Copyright (c) 2009 - 2018, Intel Corporation. All rights > + reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef _MM_RSC_LIB_H_ > +#define _MM_RSC_LIB_H_ > + > +/** > + Returns the first protocol instance that matches the given protocol. > + > + @param[in] Protocol Provides the protocol to search for. > + @param[in] Registration Optional registration key returned from > + RegisterProtocolNotify(). > + @param[out] Interface On return, a pointer to the first inter= face that > matches Protocol and > + Registration. > + > + @retval EFI_SUCCESS A protocol instance matching Protocol w= as > found and returned in > + Interface. > + @retval EFI_NOT_FOUND No protocol instances were found that > match Protocol and > + Registration. > + @retval EFI_INVALID_PARAMETER Interface is NULL. > + Protocol is NULL. > + > +**/ > +EFI_STATUS > +EFIAPI > +InternalLocateProtocol ( > + IN EFI_GUID *Protocol, > + IN VOID *Registration, OPTIONAL > + OUT VOID **Interface > + ); > + > +#endif // _MM_RSC_LIB_H_ > diff --git > a/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod > eLib.inf > b/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod > eLib.inf > index 72496bfababd..02dce09a199d 100644 > --- > a/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod > eLib.inf > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod > eLib > +++ .inf > @@ -28,6 +28,8 @@ [Defines] > > [Sources] > ReportStatusCodeLib.c > + ReportStatusCodeLib.h > + ReportStatusCodeLibTraditional.c > > [Packages] > MdePkg/MdePkg.dec > @@ -45,7 +47,7 @@ [Guids] > gEfiStatusCodeDataTypeDebugGuid ## SOMETIMES_CONSUMES > ## UNDEFINED > > [Protocols] > - gEfiSmmStatusCodeProtocolGuid ## CONSUMES > + gEfiMmStatusCodeProtocolGuid ## CONSUMES > > [Pcd] > gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask ## > CONSUMES diff --git > a/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod > eLib.inf > b/MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReport > StatusCodeLib.inf > similarity index 64% > copy from > MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi > b.inf > copy to > MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReportSt > atusCodeLib.inf > index 72496bfababd..11ecc67fc4fa 100644 > --- > a/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod > eLib.inf > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReport > Stat > +++ usCodeLib.inf > @@ -12,13 +12,12 @@ > > [Defines] > INF_VERSION =3D 0x00010005 > - BASE_NAME =3D SmmReportStatusCodeLib > - MODULE_UNI_FILE =3D SmmReportStatusCodeLib.uni > - FILE_GUID =3D 67089D19-B3D6-4d9e-A0EB-FEDC1F83A1= EE > - MODULE_TYPE =3D DXE_SMM_DRIVER > + BASE_NAME =3D StandaloneMmReportStatusCodeLib > + FILE_GUID =3D 17C7FC8C-8C5D-497E-9C0E-C21255B30E= 04 > + MODULE_TYPE =3D MM_STANDALONE > VERSION_STRING =3D 1.0 > - PI_SPECIFICATION_VERSION =3D 0x0001000A > - LIBRARY_CLASS =3D ReportStatusCodeLib|DXE_SMM_DRIVER > SMM_CORE > + PI_SPECIFICATION_VERSION =3D 0x00010032 > + LIBRARY_CLASS =3D ReportStatusCodeLib|MM_STANDALONE > > # > # The following information is for reference only and not required by t= he > build tools. > @@ -28,6 +27,8 @@ [Defines] > > [Sources] > ReportStatusCodeLib.c > + ReportStatusCodeLib.h > + ReportStatusCodeLibStandaloneMm.c > > [Packages] > MdePkg/MdePkg.dec > @@ -36,7 +37,7 @@ [Packages] > [LibraryClasses] > PcdLib > BaseMemoryLib > - SmmServicesTableLib > + MmServicesTableLib > DebugLib > MemoryAllocationLib > > @@ -45,7 +46,7 @@ [Guids] > gEfiStatusCodeDataTypeDebugGuid ## SOMETIMES_CONSUMES > ## UNDEFINED > > [Protocols] > - gEfiSmmStatusCodeProtocolGuid ## CONSUMES > + gEfiMmStatusCodeProtocolGuid ## CONSUMES > > [Pcd] > gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask ## > CONSUMES diff --git a/MdeModulePkg/MdeModulePkg.dsc > b/MdeModulePkg/MdeModulePkg.dsc index cd91a70b4fdd..05bf5fe08094 > 100644 > --- a/MdeModulePkg/MdeModulePkg.dsc > +++ b/MdeModulePkg/MdeModulePkg.dsc > @@ -473,6 +473,7 @@ [Components.IA32, Components.X64] > } > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.i > nf > > MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi > b.inf > + > + > MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReportSt > atusCo > + deLib.inf > > MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm > m.inf > > MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCod > eRouterSmm.inf > MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf > -- > 2.28.0.windows.1 > > > > > --_000_BN8PR11MB3666936A465DBD0C219A505ECADE0BN8PR11MB3666namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello Kun,

 

Got it, thanks for the explanation. My preference i= s the same with your current proposal in the patch.

 

 

Hello Liming and Jiewen,

 

Do you have comments for this case? Thanks in advan= ce.

 

Best Regards,

Hao Wu

 

From: devel@edk2.groups.io <devel@edk2.gr= oups.io> On Behalf Of Kun Qin
Sent: Wednesday, December 23, 2020 3:15 AM
To: devel@edk2.groups.io; Wu, Hao A <hao.a.wu@intel.com>
Cc: Wang, Jian J <jian.j.wang@intel.com>; Bi, Dandan <dand= an.bi@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Yao, Jiew= en <jiewen.yao@intel.com>
Subject: Re: [edk2-devel] [PATCH v1 06/15] MdeModulePkg: SmmReportS= tatusCodeLib: ReportStatusCodeLib in StandaloneMm

 

Hi Hao,

 

That was my original plan, but doing it might requi= re a MmServiceTableLib instance for SMM_CORE type if PiSmmCore links in RSC= lib (similar to PiSmmCoreSmmServicesTableLib). We can create such an insta= nce just like PiSmmCoreSmmServicesTableLib, but the implementation will pull in gSmmCoreSmst as an external variable = and cast it from `EFI_SMM_SYSTEM_TABLE2` to `EFI_MM_SYSTEM_TABLE`, which do= es not look clean. Thus I just abstract the routine to avoid it.=

 

Please let me know if you have better ideas, I can = add the change for next patch series.

 

Thanks,

Kun

 

From: = Wu, Hao A
Sent: Tuesday, December 22, 2020 00:35
To: devel@edk2.groups.io; kun.q@outlook.com
Cc: Wang, Jian J; Bi, Dandan; Liming Gao= ; Yao, Jiewen
Subject: Re: [edk2-devel] [PATCH v1 06/15] MdeModulePkg: SmmReportS= tatusCodeLib: ReportStatusCodeLib in StandaloneMm

 

> -----Original M= essage-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> = On Behalf Of Kun Qin
> Sent: Saturday, December 19, 2020 2:50 AM
> To: devel@edk2.groups.io<= br> > Cc: Wang, Jian J <jian.j.= wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>;
> Bi, Dandan <dandan.bi@intel= .com>; Liming Gao <ga= oliming@byosoft.com.cn>
> Subject: [edk2-devel] [PATCH v1 06/15] MdeModulePkg:
> SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm
>
> This change added support of StandaloneMm for ReportStatusCodeLib. It=
> adds a new instance of ReportStatusCodeLib for MM_STANDALONE type, > and abstracts the references of gMmst and gSmst functionalities into<= br> > separate files in order to link in proper Service Table for SMM core/= drivers.


Sorry for a question.

Do you think it is feasible to use:
gMmst->MmLocateProtocol to locate gEfiMmStatusCodeProtocolGuid
and avoid introducing 2 separate implementations for internal function Int= ernalLocateProtocol()?

Since I found that the definitions for gEfiMmStatusCodeProtocolGuid an gEf= iSmmStatusCodeProtocolGuid are identical.

Best Regards,
Hao Wu


>
> Cc: Jian J Wang <jian.j.w= ang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel= .com>
> Cc: Dandan Bi <dandan.bi@in= tel.com>
> Cc: Liming Gao <gaolim= ing@byosoft.com.cn>
>
> Signed-off-by: Kun Qin <kun.q= @outlook.com>
> ---
>  MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib= .c
> | 16 ++++----
>
> MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibSta > ndaloneMm.c         &nbs= p;            &= nbsp;            | 3= 9 ++++++++++++++++++++
>
> MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibTra > ditional.c          = ;            &n= bsp;            = ; | 39 ++++++++++++++++++++
>  MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib= .h
> | 37 +++++++++++++++++++
>
> MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi
> b.inf          &nbs= p;            &= nbsp;           &nbs= p;      |  4 +-
>
> MdeModulePkg/Library/SmmReportStatusCodeLib/{SmmReportStatusCode
> Lib.inf =3D> StandaloneMmReportStatusCodeLib.inf} | 17 +++++---- >  MdeModulePkg/MdeModulePkg.dsc
> |  1 +
>  7 files changed, 137 insertions(+), 16 deletions(-)
>
> diff --git
> a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > c
> index 3a1772538cdf..fb1769db9223 100644
> ---
> a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c > +++
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > c
> @@ -1,5 +1,5 @@
>  /** @file
> -  Report Status Code Library for SMM Phase.
> +  Report Status Code Library for MM Phase.
>
>    Copyright (c) 2009 - 2018, Intel Corporation. All r= ights reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent @@ -8,= 7 +8,7 @@
>
>  #include <Library/ReportStatusCodeLib.h>  #include &= lt;Library/DebugLib.h> -
> #include <Library/SmmServicesTableLib.h>
> +#include <Library/MmServicesTableLib.h>
>  #include <Library/BaseLib.h>
>  #include <Library/BaseMemoryLib.h>
>  #include <Library/PcdLib.h>
> @@ -16,10 +16,12 @@
>
>  #include <Guid/StatusCodeDataTypeId.h>
>  #include <Guid/StatusCodeDataTypeDebug.h> -#include
> <Protocol/SmmStatusCode.h>
> +#include <Protocol/MmStatusCode.h>
>
> -EFI_SMM_REPORT_STATUS_CODE     mReportStatusCode= =3D NULL;
> -EFI_SMM_STATUS_CODE_PROTOCOL   *mStatusCodeProtocol =3D NU= LL;
> +#include "ReportStatusCodeLib.h"
> +
> +EFI_MM_REPORT_STATUS_CODE     mReportStatusCode = = =3D NULL;
> +EFI_MM_STATUS_CODE_PROTOCOL   *mStatusCodeProtocol =3D NUL= L;
>
>
>  /**
> @@ -29,14 +31,14 @@ EFI_SMM_STATUS_CODE_PROTOCOL
> *mStatusCodeProtocol =3D NULL;
>           &nbs= p;  NULL is returned if no status code service is available.
>
>  **/
> -EFI_SMM_REPORT_STATUS_CODE
> +EFI_MM_REPORT_STATUS_CODE
>  InternalGetReportStatusCode (
>    VOID
>    )
>  {
>    EFI_STATUS       = ;             S= tatus;
>
> -  Status =3D gSmst->SmmLocateProtocol (&gEfiSmmStatusCod= eProtocolGuid,
> NULL, (VOID**)&mStatusCodeProtocol);
> +  Status =3D InternalLocateProtocol (&gEfiMmStatusCodeProto= colGuid, NULL,
> + (VOID**)&mStatusCodeProtocol);
>    if (!EFI_ERROR (Status) && mStatusCodeProto= col !=3D NULL) {
>      return mStatusCodeProtocol->ReportSt= atusCode;
>    }
> diff --git
> a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibS > tandaloneMm.c
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibS > tandaloneMm.c
> new file mode 100644
> index 000000000000..fc47dffe9ffb
> --- /dev/null
> +++
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibS > ta
> +++ ndaloneMm.c
> @@ -0,0 +1,39 @@
> +/** @file
> +  Abstraction layer for MM service table used by MM ReportStatu= sCodeLib.
> +
> +  Copyright (c) Microsoft Corporation.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include <PiMm.h>
> +
> +#include <Library/MmServicesTableLib.h>
> +
> +/**
> +  Returns the first protocol instance that matches the given pr= otocol.
> +
> +  @param[in]  Protocol      =     Provides the protocol to search for.
> +  @param[in]  Registration      O= ptional registration key returned from
> +           &n= bsp;            = ;        RegisterProtocolNotify().
> +  @param[out]  Interface     &nbs= p;  On return, a pointer to the first interface that
> matches Protocol and
> +           &n= bsp;            = ;        Registration.
> +
> +  @retval EFI_SUCCESS       =     A protocol instance matching Protocol was
> found and returned in
> +           &n= bsp;            = ;        Interface.
> +  @retval EFI_NOT_FOUND      &nbs= p;  No protocol instances were found that
> match Protocol and
> +           &n= bsp;            = ;        Registration.
> +  @retval EFI_INVALID_PARAMETER Interface is NULL.
> +           &n= bsp;            = ;        Protocol is NULL.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +InternalLocateProtocol (
> +  IN  EFI_GUID  *Protocol,
> +  IN  VOID      *Registration, OP= TIONAL
> +  OUT VOID      **Interface
> +  )
> +{
> +  return gMmst->MmLocateProtocol (Protocol, Registration, In= terface); }
> diff --git
> a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibT > raditional.c
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibT > raditional.c
> new file mode 100644
> index 000000000000..6b3a7c6051c5
> --- /dev/null
> +++
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibT > ra
> +++ ditional.c
> @@ -0,0 +1,39 @@
> +/** @file
> +  Abstraction layer for SMM service table used by SMM
> ReportStatusCodeLib.
> +
> +  Copyright (c) Microsoft Corporation.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include <PiMm.h>
> +
> +#include <Library/SmmServicesTableLib.h>
> +
> +/**
> +  Returns the first protocol instance that matches the given pr= otocol.
> +
> +  @param[in]  Protocol      =     Provides the protocol to search for.
> +  @param[in]  Registration      O= ptional registration key returned from
> +           &n= bsp;            = ;        RegisterProtocolNotify().
> +  @param[out]  Interface     &nbs= p;  On return, a pointer to the first interface that
> matches Protocol and
> +           &n= bsp;            = ;        Registration.
> +
> +  @retval EFI_SUCCESS       =     A protocol instance matching Protocol was
> found and returned in
> +           &n= bsp;            = ;        Interface.
> +  @retval EFI_NOT_FOUND      &nbs= p;  No protocol instances were found that
> match Protocol and
> +           &n= bsp;            = ;        Registration.
> +  @retval EFI_INVALID_PARAMETER Interface is NULL.
> +           &n= bsp;            = ;        Protocol is NULL.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +InternalLocateProtocol (
> +  IN  EFI_GUID  *Protocol,
> +  IN  VOID      *Registration, OP= TIONAL
> +  OUT VOID      **Interface
> +  )
> +{
> +  return gSmst->SmmLocateProtocol (Protocol, Registration, I= nterface);
> +}
> diff --git
> a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > h
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > h
> new file mode 100644
> index 000000000000..9a16741e64f6
> --- /dev/null
> +++
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > h
> @@ -0,0 +1,37 @@
> +/** @file
> +  Report Status Code Library for MM Phase.
> +
> +  Copyright (c) 2009 - 2018, Intel Corporation. All rights
> + reserved.<BR>
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _MM_RSC_LIB_H_
> +#define _MM_RSC_LIB_H_
> +
> +/**
> +  Returns the first protocol instance that matches the given pr= otocol.
> +
> +  @param[in]  Protocol      =     Provides the protocol to search for.
> +  @param[in]  Registration      O= ptional registration key returned from
> +           &n= bsp;            = ;        RegisterProtocolNotify().
> +  @param[out]  Interface     &nbs= p;  On return, a pointer to the first interface that
> matches Protocol and
> +           &n= bsp;            = ;        Registration.
> +
> +  @retval EFI_SUCCESS       =     A protocol instance matching Protocol was
> found and returned in
> +           &n= bsp;            = ;        Interface.
> +  @retval EFI_NOT_FOUND      &nbs= p;  No protocol instances were found that
> match Protocol and
> +           &n= bsp;            = ;        Registration.
> +  @retval EFI_INVALID_PARAMETER Interface is NULL.
> +           &n= bsp;            = ;        Protocol is NULL.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +InternalLocateProtocol (
> +  IN  EFI_GUID  *Protocol,
> +  IN  VOID      *Registration, OP= TIONAL
> +  OUT VOID      **Interface
> +  );
> +
> +#endif // _MM_RSC_LIB_H_
> diff --git
> a/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod
> eLib.inf
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod
> eLib.inf
> index 72496bfababd..02dce09a199d 100644
> ---
> a/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod
> eLib.inf
> +++
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod
> eLib
> +++ .inf
> @@ -28,6 +28,8 @@ [Defines]
>
>  [Sources]
>    ReportStatusCodeLib.c
> +  ReportStatusCodeLib.h
> +  ReportStatusCodeLibTraditional.c
>
>  [Packages]
>    MdePkg/MdePkg.dec
> @@ -45,7 +47,7 @@ [Guids]
>    gEfiStatusCodeDataTypeDebugGuid   &n= bsp;           ## SOMETIM= ES_CONSUMES
> ## UNDEFINED
>
>  [Protocols]
> -  gEfiSmmStatusCodeProtocolGuid     &n= bsp;           ## CONSUME= S
> +  gEfiMmStatusCodeProtocolGuid     &nb= sp;            ## CO= NSUMES
>
>  [Pcd]
>    gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropert= yMask  ##
> CONSUMES diff --git
> a/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod
> eLib.inf
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReport
> StatusCodeLib.inf
> similarity index 64%
> copy from
> MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi
> b.inf
> copy to
> MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReportSt
> atusCodeLib.inf
> index 72496bfababd..11ecc67fc4fa 100644
> ---
> a/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod
> eLib.inf
> +++
> b/MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReport
> Stat
> +++ usCodeLib.inf
> @@ -12,13 +12,12 @@
>
>  [Defines]
>    INF_VERSION      &nbs= p;             = = =3D 0x00010005
> -  BASE_NAME        &nbs= p;             = = =3D SmmReportStatusCodeLib
> -  MODULE_UNI_FILE       &nbs= p;        =3D SmmReportStatusCodeLib.uni=
> -  FILE_GUID        &nbs= p;             = = =3D 67089D19-B3D6-4d9e-A0EB-FEDC1F83A1EE
> -  MODULE_TYPE        &n= bsp;           =3D DXE_SM= M_DRIVER
> +  BASE_NAME        &nbs= p;             = = =3D StandaloneMmReportStatusCodeLib
> +  FILE_GUID        &nbs= p;             = = =3D 17C7FC8C-8C5D-497E-9C0E-C21255B30E04
> +  MODULE_TYPE        &n= bsp;           =3D MM_STA= NDALONE
>    VERSION_STRING      &= nbsp;          =3D 1.0
> -  PI_SPECIFICATION_VERSION       = = =3D 0x0001000A
> -  LIBRARY_CLASS        =           =3D ReportStatusCode= Lib|DXE_SMM_DRIVER
> SMM_CORE
> +  PI_SPECIFICATION_VERSION       = = =3D 0x00010032
> +  LIBRARY_CLASS        =           =3D ReportStatusCode= Lib|MM_STANDALONE
>
>  #
>  # The following information is for reference only and not requi= red by the
> build tools.
> @@ -28,6 +27,8 @@ [Defines]
>
>  [Sources]
>    ReportStatusCodeLib.c
> +  ReportStatusCodeLib.h
> +  ReportStatusCodeLibStandaloneMm.c
>
>  [Packages]
>    MdePkg/MdePkg.dec
> @@ -36,7 +37,7 @@ [Packages]
>  [LibraryClasses]
>    PcdLib
>    BaseMemoryLib
> -  SmmServicesTableLib
> +  MmServicesTableLib
>    DebugLib
>    MemoryAllocationLib
>
> @@ -45,7 +46,7 @@ [Guids]
>    gEfiStatusCodeDataTypeDebugGuid   &n= bsp;           ## SOMETIM= ES_CONSUMES
> ## UNDEFINED
>
>  [Protocols]
> -  gEfiSmmStatusCodeProtocolGuid     &n= bsp;           ## CONSUME= S
> +  gEfiMmStatusCodeProtocolGuid     &nb= sp;            ## CO= NSUMES
>
>  [Pcd]
>    gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropert= yMask  ##
> CONSUMES diff --git a/MdeModulePkg/MdeModulePkg.dsc
> b/MdeModulePkg/MdeModulePkg.dsc index cd91a70b4fdd..05bf5fe08094
> 100644
> --- a/MdeModulePkg/MdeModulePkg.dsc
> +++ b/MdeModulePkg/MdeModulePkg.dsc
> @@ -473,6 +473,7 @@ [Components.IA32, Components.X64]
>    }
>
> MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.i > nf
>
> MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi
> b.inf
> +
> +
> MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReportSt
> atusCo
> + deLib.inf
>
> MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm
> m.inf
>
> MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCod
> eRouterSmm.inf
>    MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBo= x.inf
> --
> 2.28.0.windows.1
>
>
>
>
>




 

--_000_BN8PR11MB3666936A465DBD0C219A505ECADE0BN8PR11MB3666namp_--