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.web09.3074.1609903469329000846 for ; Tue, 05 Jan 2021 19:24:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=L0GV8w1C; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: hao.a.wu@intel.com) IronPort-SDR: BqeqXiWWJMjdtENdRZX6uEMIBBi8aF4BFaiL0IOvyWHunT1qZKZjZLkAcLND6ncNDmzINmZL5Y ZbzSk3+yqZQA== X-IronPort-AV: E=McAfee;i="6000,8403,9855"; a="177321366" X-IronPort-AV: E=Sophos;i="5.78,478,1599548400"; d="scan'208";a="177321366" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 19:24:28 -0800 IronPort-SDR: Cv221XJOAOfxXaXnUv821rekBRBtMs96aAbbN+TGqXEVPvXIWN+uuhiSe2sQwmtr/N0gjPnnB2 HUM6DwvLtXAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,478,1599548400"; d="scan'208";a="422013818" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga001.jf.intel.com with ESMTP; 05 Jan 2021 19:24:28 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 5 Jan 2021 19:24:27 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx605.amr.corp.intel.com (10.18.126.85) 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, 5 Jan 2021 19:24:27 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.41) 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, 5 Jan 2021 19:24:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BFuolgrHN5RWH1zl/1je8kj85eTE3j7+Mzz8eVhu2QfN33ORXnYTMyHtQGG4eUpmsxoB7GamRzhQduyDDSOQ4ZID1hT3rPqK1YaIO4mjivJrshydMEdi1YI51Oo/5BggS4M+WXpaGoYSBLLukbhDnm6EZBzhwccJXnWuinXhvWhV3obKmyjYC3+zX+UuTMRybds0QzU5sDoAh5KduyxMhdESbXOu/RXSKctQkU2Km12vHCxAjYDd7ee7D6JBDnaRX6gI9E8s3+mhOkjonqAw2G4FJemtulhC7vMgeKdqqnyNWFESqUkLDtNFwuZ/fzE4ec44ja0cP/J2Gg5BC24qYA== 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=jq0f9LARDV0Zac0jc4e/ybIdu34w7To2SZa4zly2asE=; b=KqkoYJX0B0E9JyDrm1X6F2bKYmVNeUbhcR6yoTIvH3Y8eBQ8C8ZBPxCsbSTJOzuOR+WzCc+ypbgy8L8HimKMJKl2/Uq15JD/PWye4s11no6hWEYJpaExrPCZyqCOzkwyEIB0IS9MT41WYjioOhaYOADsjW4UCUmwWO1TWXrKqSM0v7MSDBPUS/yf/gxYRvvGqCsM7n7L0xhuH681N4Zr0q6+Og/P9pfjrBy0jWFct2oR8dfwNJbifNxKG0Mtu7nnn/KrTtMbLJJeThEltZLPaDRtEUTZxKS+SdhewTFnpSZA/WD2jGb/1UWZCKzeS54SDEb+VWWX+iQQWhatzjaAUQ== 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=jq0f9LARDV0Zac0jc4e/ybIdu34w7To2SZa4zly2asE=; b=L0GV8w1Cem3UNrnvsyrc4RtbxEkuccv60iq/QLMUNlS0oulS4uB08LU6jlxIyhKRIat+oFxUbnbLCCLUPZHb7ei9PEo7L5nfaiBa77nT8jqjKJ/rSR9t6xtx6zMKKeH3sp82vHys5jE87NkdfOpYp6Z+27q7+Mx72nf7WwSSYZ0= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN7PR11MB2721.namprd11.prod.outlook.com (2603:10b6:406:ba::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Wed, 6 Jan 2021 03:24:25 +0000 Received: from BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::d11e:3b2:e34f:7f0f]) by BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::d11e:3b2:e34f:7f0f%5]) with mapi id 15.20.3742.006; Wed, 6 Jan 2021 03:24:25 +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 v2 06/16] MdeModulePkg: SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm Thread-Topic: [edk2-devel] [PATCH v2 06/16] MdeModulePkg: SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm Thread-Index: AQHW45UF9KT8S08gDUON5Z2nl/Ql7qoZ0tew Date: Wed, 6 Jan 2021 03:24:24 +0000 Message-ID: References: <20210105185935.3769-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: 32eded5b-748b-4ab3-1bc7-08d8b1f29147 x-ms-traffictypediagnostic: BN7PR11MB2721: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3276; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 62IVoE3HS87bTrvDsLy8cv/e4aBzSl3sGAPAyZimjJcz0CJV4fjwKIU97Now5qZ213BgA650treKyJ0qIX/iMlOzSv9UGnQkQHJ6JomxzJMkNG9nUgJRwx+kBntjSsZC3Ukw5/nZvwHlMPTbtRUgnoJ7T+BSE/b6IN7mnKv74uvUYn2ITtUPkOHAxcYXloXGE+eTZK5Au4TlvDi45XLNPxMC1MjtX52gD9Hw4d/vj0NY2EvNjy/Eaj4MG3FEGH2sx/50JXHkqtBv5VGT8z3+6D/AtczUL7HMfVSI3HvIlJrirNi6yl8EW29PQSH5qIlmCN45wY0MvclK5QlCbYyHwwh1R7FG2WG1BKhyQcxZehRsgpQ+c2jC9T1aZKGEQg7Y8o4Ar+iKR7+ETBO2Wq+xb51UA6hMId5bFQh8DBV3ImWaGNjaT6Lo/2mQ0g0aoc7HacRZhVfrcOFsit/FKsDwR/WmcSsBz2cQAszXcQ9Z7KZtHy14CO1bQgYiEDIQ1SMzp+EJlWnXmuQWfGM2ORME/A== 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)(136003)(39860400002)(346002)(396003)(376002)(366004)(2906002)(316002)(76116006)(54906003)(66476007)(4326008)(52536014)(66556008)(110136005)(64756008)(966005)(33656002)(7696005)(478600001)(45080400002)(66446008)(5660300002)(71200400001)(30864003)(8676002)(8936002)(83380400001)(26005)(53546011)(107886003)(6506007)(186003)(55016002)(9686003)(86362001)(66946007)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Suon3ecLoQY9azo+WPUbKvhMLgq5UxVq2BeqJqKWznrgsoD5RpMmmKtQ6Az0?= =?us-ascii?Q?7qPyby4ibQhxlTdhos0ZsaFou2UKTr9oiI6ChCpE/xNn1lJUQ/8gvgMNXMvn?= =?us-ascii?Q?nBdck9tRrzHJe608fLWvV8l/bU7BUIK7PTGUYAjBQG07GpUjhfee2zZJG2+F?= =?us-ascii?Q?qK5L1ZaFNlMrr47R1Zatl4KqqKHeLNLY0/Y0hE13+p5MCErucJk8IHdlQPIg?= =?us-ascii?Q?/hmgr7XexEQIcjlBVQTvLs+Ag695jAU0F7HkbOrJXQiQawRwVEB/PeYSbNsx?= =?us-ascii?Q?mmG7+YZ6vAee4AqoYkYojQMDHLBhm94TNvs1+qze4n7Nkt/KUS8ia+T7ch9E?= =?us-ascii?Q?L0vRnuCopESC6klSwdINyAeHZNwQLsbhPHpJHQbebFjjUXHVnj2J00mOSBOp?= =?us-ascii?Q?DO9LtiXIPm6UenxuyzkEbK6NjAFpD0l8DqQd0AtqoAv/F0xFmt7T1Fyc3UKz?= =?us-ascii?Q?MQbmp2BIu1awJSlATtRqCEhzYn5gIEiFSiV7At+zTT0ZMN7kTF2rQKpp6I55?= =?us-ascii?Q?rEK2QeF02ddrLNZdOCawFCVeEcjgNC3fZu1JzOvlvqQdECx76HxiX5Itfb+Q?= =?us-ascii?Q?slcDc3FXBNWJHn/oIq6za3218o8cy776R7NJMX1EOPknXyD5B1tBd2qFztUH?= =?us-ascii?Q?7tEd/JPariiCq7jETGru+m9oc3C3IAft5UCkEYZ2VXouuI7ZCLNekogxCEXt?= =?us-ascii?Q?QeWY0rzltP5b0AXKlUu/HvDQXD7siurYAxmO/ya5TqTXY1Z4QQXsJkOMe1oH?= =?us-ascii?Q?vNLDQ7Kvck3hacO8gDgepxDPMoTYMY0AwFPrReqk6JUJaLYd1OtsQrYeZBuj?= =?us-ascii?Q?sYHjOhl4dPeyIErROZD7G0B9LnhwmWObLYwa0Xbh3nXjKRnHpqTsc8syd2KD?= =?us-ascii?Q?dpa425EirpAuTpUHVSblY7O+75uBoyXIjUNORGtJffPS61xOCKDNhKlQy9kc?= =?us-ascii?Q?GJQ7lqoUG8deaYn00b3kZUl0mX2T1+cQT+Nf2A5NfDo=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: 32eded5b-748b-4ab3-1bc7-08d8b1f29147 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jan 2021 03:24:24.9164 (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: 30QluYZYH3lPk37T2J0XmC9d0al6Y94K7pXtB0jLTStEcVd0JDRGvKcFUPNwpp5RW+7iLXzEYNwfGuDUVIphjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2721 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: Wednesday, January 6, 2021 2:59 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Wu, Hao A = ; > Bi, Dandan ; Liming Gao > ; Yao, Jiewen > Subject: [edk2-devel] [PATCH v2 06/16] 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. Reviewed-by: Hao A Wu Best Regards, Hao Wu >=20 > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Dandan Bi > Cc: Liming Gao > Cc: Jiewen Yao >=20 > Signed-off-by: Kun Qin > --- >=20 > Notes: > v2: > - Removed "EFIAPI" for internal functions. > - Minor new file description update. >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c > | 16 +++++---- >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibSta > ndaloneMm.c | 38 ++++++++++++++++++++ >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibTra > ditional.c | 38 ++++++++++++++++++++ > MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.h > | 36 +++++++++++++++++++ >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi > b.inf | 4 ++- >=20 > MdeModulePkg/Library/SmmReportStatusCodeLib/{SmmReportStatusCode > Lib.inf =3D> StandaloneMmReportStatusCodeLib.inf} | 22 ++++++------ > MdeModulePkg/MdeModulePkg.dsc > | 1 + > 7 files changed, 137 insertions(+), 18 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..a4c428dc88a9 > --- /dev/null > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibS > ta > +++ ndaloneMm.c > @@ -0,0 +1,38 @@ > +/** @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 > +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..603e222f5508 > --- /dev/null > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLibT > ra > +++ ditional.c > @@ -0,0 +1,38 @@ > +/** @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 > +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..2820e40dde19 > --- /dev/null > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib. > h > @@ -0,0 +1,36 @@ > +/** @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 > +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 56% > copy from > MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLi > b.inf > copy to > MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReportSt > atusCodeLib.inf > index 72496bfababd..866e09249a6a 100644 > --- > a/MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCod > eLib.inf > +++ > b/MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReport > Stat > +++ usCodeLib.inf > @@ -1,9 +1,10 @@ > ## @file > -# SMM report status code library. > +# Standalone MM report status code library. > # > -# Retrieve status code and report status code in SMM phase. > +# Retrieve status code and report status code in MM phase. > # > # Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. > +# Copyright (c) Microsoft Corporation. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -12,13 +13,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 +28,8 @@ [Defines] >=20 > [Sources] > ReportStatusCodeLib.c > + ReportStatusCodeLib.h > + ReportStatusCodeLibStandaloneMm.c >=20 > [Packages] > MdePkg/MdePkg.dec > @@ -36,7 +38,7 @@ [Packages] > [LibraryClasses] > PcdLib > BaseMemoryLib > - SmmServicesTableLib > + MmServicesTableLib > DebugLib > MemoryAllocationLib >=20 > @@ -45,7 +47,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 9afd40eeed46..200fbcc18a18 > 100644 > --- a/MdeModulePkg/MdeModulePkg.dsc > +++ b/MdeModulePkg/MdeModulePkg.dsc > @@ -474,6 +474,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.30.0.windows.1 >=20 >=20 >=20 >=20 >=20