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.web08.8973.1608626157297379340 for ; Tue, 22 Dec 2020 00:35:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Y8THXPgO; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: hao.a.wu@intel.com) IronPort-SDR: MBZIFiwGBWfbILnJMpZ6bJ4koLkdWFqw9PX3c6yY+y465txXUTbGrcesXXA0dFe5Xu4os7OoVJ HQBq9oB1VRKA== X-IronPort-AV: E=McAfee;i="6000,8403,9842"; a="175937644" X-IronPort-AV: E=Sophos;i="5.78,438,1599548400"; d="scan'208";a="175937644" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2020 00:35:56 -0800 IronPort-SDR: EHv26LstblimEQPQQ51oYBL3Es2rvDg4qO22jYShvGOwRvAuuNque0l90DbjFq925giE8spKpN e/Ee7jFX1h4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,438,1599548400"; d="scan'208";a="373200571" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga008.jf.intel.com with ESMTP; 22 Dec 2020 00:35:56 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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; Tue, 22 Dec 2020 00:35:55 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 00:35:55 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 00:35:55 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) by edgegateway.intel.com (192.55.55.71) 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 00:35:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aH5I4ib1BNmfUEh3H4N3LqzE2EMrnIL3Hhbq/OB+mEOEhy69kJcpdxMK4yj6sakO4CzZ+tRrOMoeXDpxmmKSxfMUxzgEpwCCrOD/fN1gAaoZ8N+4Hk7VfEt29zKddCgnZe5r5oKp+yWNXAjZh508Y1CxaGOSa4PSxOJThfOu+AI7jQ2stpbYme/Vdjnmaq4yIHlOGls9pILT3IPPcGNXZFrAJRZ33TrAZ276BV/kGSOqb8jEfij2IJnasLMhI1YRPIUsg9FyGhC+y4Ksi9ae8FaL7Hpp57Az4HUjPccn9Pclu8RTivo7ZJMG9e5gaPmGsAVziO1gEd2ATaBc2CQ4tw== 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=tBmRyFGkdlHXEr1sxeomrqBjivtvLMnXRjV7nlPbdrc=; b=aPYrdzpyBF91ucEHBFaL7wh8j6t6jSIpFe2f7iOJryPv7zFAxTEkZrn4lIGPoIV5bhpSn++tM4jjT5wEM0GGrwbqv9cKj8m8Nfley9kcLUNCLn8RUyNPOuf8era8KEMWnT3bY4PnTRZZ5N9xlrotY8Ed3JaxSkG7AVZyRHQeXEob4Dxh8m60b7fBFlCUBGhYIUCql/u+Y+jMkvl9wq4pR17TYDyoorS1Xyd7GH2KhWaL8dq2dZQa94I13cUw0i/aA/Ln4F5VGTz7w90i6j5xtamj4bDlEwsivot6HJhaTfCvaDv2Ur1bvdF355cVzxD52nXC5Ow1tJz65nx4L4Mt8A== 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=tBmRyFGkdlHXEr1sxeomrqBjivtvLMnXRjV7nlPbdrc=; b=Y8THXPgOWbrBL33drTm/5ZPKEqweh32rZq8WJ3yUvEkn9vLsbNhfu0LxxBcg5B5iSSizxAGYihEintTtdk5yDqxnfTgg8Sdii9NxzutiFee0gk5I5o5IseNCOCUHtBEpKU18iKa0IHIz884V7BzIAJ26fu9Ylr3uYEq3oWnHdIA= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR1101MB2354.namprd11.prod.outlook.com (2603:10b6:404:9b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.25; Tue, 22 Dec 2020 08:35:54 +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; Tue, 22 Dec 2020 08:35:54 +0000 From: "Wu, Hao A" 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: SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm Thread-Topic: [edk2-devel] [PATCH v1 06/15] MdeModulePkg: SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm Thread-Index: AQHW1W61ScmL5NLcbUmmc+H0JFMrfKoCdH2g Date: Tue, 22 Dec 2020 08:35:53 +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: 5ff6d5bc-ca49-4235-54c9-08d8a6549892 x-ms-traffictypediagnostic: BN6PR1101MB2354: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +qn825Jy7he9PUtYXbb08O2FUspzAoeGB1NlPGuu8Fpr+j/UqJzaWWGKd8H+Sd1BCK6uMuOejc5ijW9caniQ+x0j9qmrrLhzgWT/xgjARKAJnNNVNTJ1oA+q7F+9o/SxZIcbbecyrcDtZudZcFx5CXSqq589nU8jBxmVt8VRpSZvRiPPq2P2vojT/NKucaNd2ZPk/8m4TKLlTOoTVPOJG9v8sfBKn9JMQFY+rS84Olu+qaxKsN5/Pmed0sZPS1++vR0xaBy5+epOD0RF5ZdcXFqfa6aBKdbl5YZe/MNCz/zVcVPV5byS+80seiij4n5FGNQEK0V4tOi4PaiimdsXheI8DTd2+2pTiIbvTnu4gbQSf8TOJ+d8Ozk88eIR+sTUkalS0Cg2C8hxTa3du32gCApKG3lhweTsr+NBgauWqKphUWKRIIFPTnxVCJH6Mb07Vs5QBkj0bHk1XVrsfq0nnn5haxyqumg5TBouxd/iXQo3uZ4PDCNoPf6vY7BryM+h/K899RsskG1CV+uI0TBruA== 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)(346002)(136003)(376002)(39860400002)(366004)(396003)(110136005)(76116006)(9686003)(186003)(66946007)(54906003)(55016002)(30864003)(83380400001)(107886003)(53546011)(5660300002)(316002)(478600001)(4326008)(8676002)(966005)(52536014)(45080400002)(2906002)(8936002)(86362001)(7696005)(6506007)(71200400001)(26005)(66556008)(66446008)(66476007)(33656002)(64756008)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?tJc+2zr6U2j/dguoWmiEh1kyTckkFTsF+Ovw8slDItm263LI8fZSfbE6WKtn?= =?us-ascii?Q?cfXnCBC0D7wLPVVGfmWDqFVHVrGYLZvwW319pNCKPnMkdWifIJ5yMiNqlYHV?= =?us-ascii?Q?Nfo2cCkTJE/YPRZzksYCDZbj20KwnNngTAk+UfkMbugljAYlETwZ7MjF4fhZ?= =?us-ascii?Q?Yp+yD4/8BZudQ+C//e69nXSDkgsfHGeI194t8a7eyiHTL5p3hpdsmcVduPmj?= =?us-ascii?Q?5bcQdGnJSTMEnRwwRhKMFKIUlMeaqfFXO7/mSZ26i1C/FQzFRkaOVeEjY7v8?= =?us-ascii?Q?InjS863hha83XiN+XoIqbZGPbHB8WU4m7npecnSJ1j6Xp5QtRCGlzKVu2A67?= =?us-ascii?Q?Iu+c1uWljRjtrHhMu3hJIscoWz5uHugXtccmd2V7Tlgn+HZtXqX/+gDkSAQ2?= =?us-ascii?Q?Q3YA8Oug7TtFkRkjjZA5E89YOvUwVZ5/E4o3Pgnw8qkBGipGJRwCUgPR3vYq?= =?us-ascii?Q?qmZT+Sv+WROuQgQyRBF8JWUeU2CE8rjHP9oM/M+J1oTG5ermRjF+VHyXfn13?= =?us-ascii?Q?eXP4u7NMG2Ch4/x/hXw9LKEGK5Nn23RB7zHqqSvACmLs+fGn1TfyQL0qf/P0?= =?us-ascii?Q?JlxkNfR4W0Ps63MrtKnny4YibmBhfd6aM5w8gR2jV04FHca4Ru3jrhShHadL?= =?us-ascii?Q?aJk+2HjnENKiKg0VBxTrVObjyp5wMTCOyEcotbMPYWKaCj7FgG2rcH/GkbSY?= =?us-ascii?Q?rKmf9uHNuHS/Evrc+NVSqiApVy3r/wpnZXnYPBAGF0KDbK3GSKl0ZVfmtjOt?= =?us-ascii?Q?yZ3bCYcI2S/OUkHeJD0abDvbvKTYqQoj2u6tY1PAP6/2eklUs9ML53np9CMd?= =?us-ascii?Q?HIQWi0L6Oai2Dt1NiWMjCW3fnms4gVnxH936wmK9vg/blmjWm+6X+HZivTWe?= =?us-ascii?Q?kTL5A+5+UlKmSbWqLK1CBbGk4jVwxeoKyQyHzuBf+CVUoqEU6rjXYFOra1S+?= =?us-ascii?Q?FAynxZtdnrYJ6Y7O7G5qmXQzy2EyLWHAOZ+hTEgzvjw=3D?= 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: 5ff6d5bc-ca49-4235-54c9-08d8a6549892 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Dec 2020 08:35:53.8796 (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: FurGEw/vQpKi/a95SPoeN4lOCD60isd45neCvz9CYPvDyfoUngExR1xKYW3jRRKvl+AczjPxQG2yZ5uOI6g/Bg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1101MB2354 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----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 >=20 > 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 >=20 > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Dandan Bi > Cc: Liming Gao >=20 > Signed-off-by: Kun Qin > --- > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c > | 16 ++++---- >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibSta > ndaloneMm.c | 39 ++++++++++++++++++++ >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibTra > ditional.c | 39 ++++++++++++++++++++ > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.h > | 37 +++++++++++++++++++ >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi > b.inf | 4 +- >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/{SmmReportStatusCode > Lib.inf =3D> StandaloneMmReportStatusCodeLib.inf} | 17 +++++---- > MdeModulePkg/MdeModulePkg.dsc > | 1 + > 7 files changed, 137 insertions(+), 16 deletions(-) >=20 > 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. >=20 > Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent @@ -8,7 +8,7 @@ >=20 > #include #include = - > #include > +#include > #include > #include > #include > @@ -16,10 +16,12 @@ >=20 > #include > #include -#include > > +#include >=20 > -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; >=20 >=20 > /** > @@ -29,14 +31,14 @@ EFI_SMM_STATUS_CODE_PROTOCOL > *mStatusCodeProtocol =3D NULL; > NULL is returned if no status code service is available. >=20 > **/ > -EFI_SMM_REPORT_STATUS_CODE > +EFI_MM_REPORT_STATUS_CODE > InternalGetReportStatusCode ( > VOID > ) > { > EFI_STATUS Status; >=20 > - 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] >=20 > [Sources] > ReportStatusCodeLib.c > + ReportStatusCodeLib.h > + ReportStatusCodeLibTraditional.c >=20 > [Packages] > MdePkg/MdePkg.dec > @@ -45,7 +47,7 @@ [Guids] > gEfiStatusCodeDataTypeDebugGuid ## SOMETIMES_CONSUMES > ## UNDEFINED >=20 > [Protocols] > - gEfiSmmStatusCodeProtocolGuid ## CONSUMES > + gEfiMmStatusCodeProtocolGuid ## CONSUMES >=20 > [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 @@ >=20 > [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 >=20 > # > # The following information is for reference only and not required by t= he > build tools. > @@ -28,6 +27,8 @@ [Defines] >=20 > [Sources] > ReportStatusCodeLib.c > + ReportStatusCodeLib.h > + ReportStatusCodeLibStandaloneMm.c >=20 > [Packages] > MdePkg/MdePkg.dec > @@ -36,7 +37,7 @@ [Packages] > [LibraryClasses] > PcdLib > BaseMemoryLib > - SmmServicesTableLib > + MmServicesTableLib > DebugLib > MemoryAllocationLib >=20 > @@ -45,7 +46,7 @@ [Guids] > gEfiStatusCodeDataTypeDebugGuid ## SOMETIMES_CONSUMES > ## UNDEFINED >=20 > [Protocols] > - gEfiSmmStatusCodeProtocolGuid ## CONSUMES > + gEfiMmStatusCodeProtocolGuid ## CONSUMES >=20 > [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] > } >=20 > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.i > nf >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi > b.inf > + > + > MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReportSt > atusCo > + deLib.inf >=20 > MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm > m.inf >=20 > MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCod > eRouterSmm.inf > MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf > -- > 2.28.0.windows.1 >=20 >=20 >=20 >=20 >=20