From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.1519.1611708998479692231 for ; Tue, 26 Jan 2021 16:56:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=dM8Ch78n; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: hao.a.wu@intel.com) IronPort-SDR: IsmN8Dczj3UZrCF2Wui5UYCfklmOVPLdK5T56VihYfIBDV5+SVqIKOKLY84slwJx9yUqAIWPoU b50ReQcHtBVA== X-IronPort-AV: E=McAfee;i="6000,8403,9876"; a="159773297" X-IronPort-AV: E=Sophos;i="5.79,378,1602572400"; d="scan'208";a="159773297" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 16:56:37 -0800 IronPort-SDR: voYqDnJ36vxaqTIFTGGVuoikt8YZ3WtdDujV+29nQk0cojOnd7jhx17nHE97gUxIO48SZKrWtH ld5fnvuy+muA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,378,1602572400"; d="scan'208";a="472959284" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 26 Jan 2021 16:56:37 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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.2106.2; Tue, 26 Jan 2021 16:56:36 -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.2106.2 via Frontend Transport; Tue, 26 Jan 2021 16:56:36 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.103) 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, 26 Jan 2021 16:56:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OA5+xIexUxa4elxcQodM3K72t11USTcN9+O8U4BU0irgSu0e1WJtL2rt88YbKbBthuAB4+XB0mYfEBxbhrFzpv/Sna++jN6sDpW8/iUBKh6kkO/EOXtT287hoL7hgSH4sSf23qEHtA8o7Mre7XnB+MxhfDG2XwN8QEMPy6b/Bund88rQdg9OOAATUnzJ+ZPg6jYrBy+5Gx/d5qYyWBPprBvTIwU61XNVv9hUSGQmF65zDyUdxQzClxoVOB+R4B6DuYqzWKdDsRCzyjRGzhC8fD3HRXWt94t/AfbyYpmSb28/Cy5iDOr9U9AEEvEq4DuSVfkQAjlp82uz3mOeI+Rl7Q== 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=wJdq9SDzMg1q6Cnbtm/LWy/P3W12M/vdJi7bdWq3dUc=; b=NNRZJhcbDLss/9OJAsrV9nAf957cNedxbAKy7ACwnEoKBVITebxl2ICbRNOVqxD+sjIqbQaXqzDBhsHWQN4MER3aihXQi51aJlLQDEa4uESN9vXxW/9rCk9gEiHQwZ7d3QEcB4Q4EDuw+vvLdVpDhLsW7GgVePtsv4junS80KGXDGTzm6R+OLj+ebv+8lyUeXwhCe9PyIGc0482QzOt+kk5uLf7pxp1r036NvLKuuFGqUVMTAWR/1XYdUaVx0x5N1QGuHE9kRIQ6F7jGG9+HMKBAvTFhqZYbmKEGAo3WWORxy8KCmu2rIxdyosKXyhDiVt1kqCXXyCEiP9R+Eve93A== 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=wJdq9SDzMg1q6Cnbtm/LWy/P3W12M/vdJi7bdWq3dUc=; b=dM8Ch78njI7GaOTHSIU/AOndjqS0VpjEB0sVet57hLtPwGTmUpHjpv/DvGfndsdm3EgsOQVr9nh43d6pG//NcBku081bAPv+3F3JwdNtOQcRGHOtz1yWVLCfUWdQTHLViZTAX0KlMU8cxzR+bsjKQ1c9I/t6KT8qVVOTjMEJ+K4= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR11MB4020.namprd11.prod.outlook.com (2603:10b6:405:7d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12; Wed, 27 Jan 2021 00:56:35 +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.3784.017; Wed, 27 Jan 2021 00:56:35 +0000 From: "Wu, Hao A" To: Kun Qin , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Dong, Eric" , "Ni, Ray" Subject: Re: [PATCH v4 11/20] MdeModulePkg: SmmSmiHandlerProfileLib: Support StandaloneMm Instance Thread-Topic: [PATCH v4 11/20] MdeModulePkg: SmmSmiHandlerProfileLib: Support StandaloneMm Instance Thread-Index: AQHW9Bwfy9FyZGlLck+zhXcp/EUpcqo6pjYQ Date: Wed, 27 Jan 2021 00:56:34 +0000 Message-ID: References: <20210126194710.2248-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: outlook.com; dkim=none (message not signed) header.d=none;outlook.com; 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: f44b011b-96b2-4a65-959e-08d8c25e650c x-ms-traffictypediagnostic: BN6PR11MB4020: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2657; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qlEp2xZ5cmI2Re1GHXfRVBfyL9V1/U0lMicpnvQ9qm1p51C8i51A0ijltTfTfOwjr4ww9Kzks8ckrgZC33EAUDG/xKlxnoJmS1w3qYbqxgNclQZJs/bu8uTLUI5YTkbeLKwx9Mza/UBKHOLvwmU3YH32YskZdQqMByogJHm83LNZIU1l+Z7iQrxGE1TvnssonQnfPLTi6c3+As9D/brd0sQvuRjQWuHDtYQH1XGcd9zHwRIgAJLogn1w4Am8rj9DvGhiBnxk9rsMjyExN1L0xSv3qdTPNJ7X44Cjvqwivdg5BaIaN2dfVvFk5GIDHGc4FX3QC23Ra3Ki+3jOu8IIIhKymaqHiNwN6r/QooXcNMFqB8CUosfAbDHxryRIjlGHVGsSPIDj/d4xDoWmEF7N26oaPOLPwQsbhCrRmoJmV8hQfJ7HvU+YJDkNzhkOHnBHsI5ltUhiv1WBdzrSQ65e1IbYuBC67WDyfSmTcJ5H9nxKJ33ZjewJG3/4zwfzxyjHZ3zzXdsrR2F1KND8ItlHKNaBiVPYOn24Hvyj2wIKoqBHidrJlfGLYS6Dp5kObJMeavHhRmwOP6lYJ6p9jdg6lwohoqoYP+H16LffS8qw7C+hi5PgTQeOCHO3ssmf/k9YmKcT223/G68tzPZOLW8C1g== 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)(39860400002)(396003)(136003)(376002)(366004)(346002)(66446008)(33656002)(64756008)(8936002)(478600001)(66946007)(6506007)(66476007)(4326008)(8676002)(5660300002)(66574015)(186003)(9686003)(30864003)(55016002)(66556008)(71200400001)(110136005)(107886003)(966005)(86362001)(83380400001)(45080400002)(316002)(26005)(53546011)(52536014)(76116006)(2906002)(54906003)(7696005)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ODOEzml3jwsyTM+OeWGfln6S/6++o/MoX6diaQRxz0aN4YMs7RKUKAPdSQjF?= =?us-ascii?Q?m3BlnfJOtnwlrBW2iLyQBFZSiT/YDfhX/SaaDS2viHJUjdkmi5nEn82wwUN5?= =?us-ascii?Q?foXPOc+M/98ww++4Jq8ZSxD9t4pL/4YKiYZWBb0Z27NjA6WI7yv8/DRWEz6G?= =?us-ascii?Q?/yDLz4N8EDysz9JAMa4PRncaS8PzfVF8+7QgSq5y8Vq2spQ+MhUCqatieAn9?= =?us-ascii?Q?moWhHJ65VW1hre/hmx90aB4P++IglVRxICeMRRKqcsg7Q54nnexvIVH1IuEY?= =?us-ascii?Q?yqSVtyB9CISF6s0mjhQd9JmxTUyJj92sxeJl89L+gy0iwXPni/rwdpm3ploK?= =?us-ascii?Q?hDB3OIcssAaxJIrzEXBdkQH4yVDEElvDIdU9DjdR8IUNJ/apfdFrNnsjOqrd?= =?us-ascii?Q?hPWIaRXyHE5ZSIDX+Ag38VPmXiZifaWLBDYw6hrKG13LjGoES6qhgBYsDsAm?= =?us-ascii?Q?cEoUdfGwOk8TaZgYehev86iwLIf6yO5C6vqfjW2nvq8zk4UyW4EWwxRKryEJ?= =?us-ascii?Q?pxeFlKhG3r/qBxcCkzC54HPvdPb7NrfpSC2c/6lNjIxyK8he4gs+QkJjzJvZ?= =?us-ascii?Q?oVVjS06CjaBAVRMT2ed39LUDOF8FpOPmKLRZzhoyMIo+Z6S5mpLmK1j7vrKz?= =?us-ascii?Q?d6nFEOzgCZ+3AMnToR9czSaKZzfdxc4WhETQDP+47OXECYbn5k9PppzEhVMX?= =?us-ascii?Q?oD3dg/5RrOgZDPhuuEfxeF4cAV4C8IHb9TXOyFmMENBAdOerwsuAqo7m+BGl?= =?us-ascii?Q?ZkAQ32RtFNNcwUKSRFrI4Ae7ug0gCIdzVC4vSNMJ/de4oQIVOUvOeoc1NZYN?= =?us-ascii?Q?NtBH/VfuVaMHkPoq/fLYzWBdEFjJlEhn1KyU3N95UDfPuBpIu1/zwQzn1bw4?= =?us-ascii?Q?6vgpgWnE7b78lsfONohfWMwRm3T23K5EZ8FAd+LRxJQbwoEubHwRgi/WCm1r?= =?us-ascii?Q?Ohi6jibOs4mu5c0dUjn6aCMqvO5MH/Wokt6WTQBoWC35JXTW87i2gD87NMb1?= =?us-ascii?Q?ElnRjvevNOSClZOfwMHVCQQofi3bhybFgRc/tWZohElCvDef0ls/gvVSeN4R?= =?us-ascii?Q?Dsq85SsX?= 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: f44b011b-96b2-4a65-959e-08d8c25e650c X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2021 00:56:34.9284 (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: xzdBatgYb8ztCrR0F/GurG3CHHS2XdzhC+HvpqknMQoGsnekr9eVXaT+Yel1huzEj5JvryhuP2IfD2tqptZ+EA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB4020 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: Kun Qin > Sent: Wednesday, January 27, 2021 3:47 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Wu, Hao A ; > Dong, Eric ; Ni, Ray > Subject: [PATCH v4 11/20] MdeModulePkg: SmmSmiHandlerProfileLib: > Support StandaloneMm Instance >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3185 >=20 > This change added support of SMI handler profile library router under > StandaloneMm. This change replaces gSmst with gMmst. It also abstracts > standalone and traditional MM driver entrypoints into separate files to a= llow > maximal common implementations. >=20 > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Eric Dong > Cc: Ray Ni >=20 > Signed-off-by: Kun Qin > --- >=20 > Notes: > v4: > - Newly created for SmmSmiHandlerProfileLib coverage. Reviewed-by: Hao A Wu Best Regards, Hao Wu >=20 >=20 > MdeModulePkg/Library/SmmSmiHandlerProfileLib/{SmmSmiHandlerProfileL > ib.c =3D> MmSmiHandlerProfileLib.c} | 20 ++--- >=20 > MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLi > b.c | 90 ++------------------ >=20 > MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandl > erProfileLib.c | 31 +++++++ >=20 > MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib > .h | 23 +++++ >=20 > MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLi > b.inf | 4 +- >=20 > MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandl > erProfileLib.inf | 44 ++++++++++ > MdeModulePkg/MdeModulePkg.dsc = | 1 > + > 7 files changed, 117 insertions(+), 96 deletions(-) >=20 > diff --git > a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfile > Lib.c > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfile > Lib.c > similarity index 86% > copy from > MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLi > b.c > copy to > MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileLib > .c > index b76e8f0dc132..f800220b549c 100644 > --- > a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfile > Lib.c > +++ > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfile > Li > +++ b.c > @@ -1,14 +1,15 @@ > /** @file > - SMM driver instance of SmiHandlerProfile Library. > + MM driver instance of SmiHandlerProfile Library. >=20 > Copyright (c) 2017, Intel Corporation. All rights reserved.
> + Copyright (c) Microsoft Corporation. > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ >=20 > -#include > +#include > #include -#include > > +#include > #include >=20 > SMI_HANDLER_PROFILE_PROTOCOL *mSmiHandlerProfile; @@ -82,21 > +83,16 @@ SmiHandlerProfileUnregisterHandler ( } >=20 > /** > - The constructor function for SMI handler profile. > - > - @param ImageHandle The firmware allocated handle for the EFI image. > - @param SystemTable A pointer to the EFI System Table. > + The common constructor function for SMI handler profile. >=20 > @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. > **/ > EFI_STATUS > -EFIAPI > -SmmSmiHandlerProfileLibConstructor ( > - IN EFI_HANDLE ImageHandle, > - IN EFI_SYSTEM_TABLE *SystemTable > +MmSmiHandlerProfileLibInitialization ( > + VOID > ) > { > - gSmst->SmmLocateProtocol ( > + gMmst->MmLocateProtocol ( > &gSmiHandlerProfileGuid, > NULL, > (VOID **) &mSmiHandlerProfile diff --git > a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfile > Lib.c > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfil > eLib.c > index b76e8f0dc132..0167d81b880d 100644 > --- > a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfile > Lib.c > +++ > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfil > eL > +++ ib.c > @@ -2,87 +2,17 @@ > SMM driver instance of SmiHandlerProfile Library. >=20 > Copyright (c) 2017, Intel Corporation. All rights reserved.
> + Copyright (c) Microsoft Corporation. > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ >=20 > -#include > -#include -#include > -#include > +#include >=20 > -SMI_HANDLER_PROFILE_PROTOCOL *mSmiHandlerProfile; > +#include "MmSmiHandlerProfileLib.h" >=20 > /** > - This function is called by SmmChildDispatcher module to report > - a new SMI handler is registered, to SmmCore. > - > - @param HandlerGuid The GUID to identify the type of the handler. > - For the SmmChildDispatch protocol, the HandlerG= uid > - must be the GUID of SmmChildDispatch protocol. > - @param Handler The SMI handler. > - @param CallerAddress The address of the module who registers the SMI > handler. > - @param Context The context of the SMI handler. > - For the SmmChildDispatch protocol, the Context > - must match the one defined for SmmChildDispatch= protocol. > - @param ContextSize The size of the context in bytes. > - For the SmmChildDispatch protocol, the Context > - must match the one defined for SmmChildDispatch= protocol. > - > - @retval EFI_SUCCESS The information is recorded. > - @retval EFI_UNSUPPORTED The feature is unsupported. > - @retval EFI_OUT_OF_RESOURCES There is no enough resource to record > the information. > -**/ > -EFI_STATUS > -EFIAPI > -SmiHandlerProfileRegisterHandler ( > - IN EFI_GUID *HandlerGuid, > - IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, > - IN PHYSICAL_ADDRESS CallerAddress, > - IN VOID *Context, OPTIONAL > - IN UINTN ContextSize OPTIONAL > - ) > -{ > - if (mSmiHandlerProfile !=3D NULL) { > - return mSmiHandlerProfile->RegisterHandler (mSmiHandlerProfile, > HandlerGuid, Handler, CallerAddress, Context, ContextSize); > - } > - return EFI_UNSUPPORTED; > -} > - > -/** > - This function is called by SmmChildDispatcher module to report > - an existing SMI handler is unregistered, to SmmCore. > - > - @param HandlerGuid The GUID to identify the type of the handler. > - For the SmmChildDispatch protocol, the HandlerG= uid > - must be the GUID of SmmChildDispatch protocol. > - @param Handler The SMI handler. > - @param Context The context of the SMI handler. > - If it is NOT NULL, it will be used to check wha= t is registered. > - @param ContextSize The size of the context in bytes. > - If Context is NOT NULL, it will be used to chec= k what is > registered. > - > - @retval EFI_SUCCESS The original record is removed. > - @retval EFI_UNSUPPORTED The feature is unsupported. > - @retval EFI_NOT_FOUND There is no record for the HandlerGuid a= nd > handler. > -**/ > -EFI_STATUS > -EFIAPI > -SmiHandlerProfileUnregisterHandler ( > - IN EFI_GUID *HandlerGuid, > - IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, > - IN VOID *Context, OPTIONAL > - IN UINTN ContextSize OPTIONAL > - ) > -{ > - if (mSmiHandlerProfile !=3D NULL) { > - return mSmiHandlerProfile->UnregisterHandler (mSmiHandlerProfile, > HandlerGuid, Handler, Context, ContextSize); > - } > - return EFI_UNSUPPORTED; > -} > - > -/** > - The constructor function for SMI handler profile. > + The constructor function for traditional MM SMI handler profile. >=20 > @param ImageHandle The firmware allocated handle for the EFI image. > @param SystemTable A pointer to the EFI System Table. > @@ -92,15 +22,9 @@ SmiHandlerProfileUnregisterHandler ( EFI_STATUS > EFIAPI SmmSmiHandlerProfileLibConstructor ( > - IN EFI_HANDLE ImageHandle, > - IN EFI_SYSTEM_TABLE *SystemTable > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > ) > { > - gSmst->SmmLocateProtocol ( > - &gSmiHandlerProfileGuid, > - NULL, > - (VOID **) &mSmiHandlerProfile > - ); > - return EFI_SUCCESS; > + return MmSmiHandlerProfileLibInitialization (); > } > - > diff --git > a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHan > dlerProfileLib.c > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHan > dlerProfileLib.c > new file mode 100644 > index 000000000000..a7714390e5b1 > --- /dev/null > +++ > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHan > dle > +++ rProfileLib.c > @@ -0,0 +1,31 @@ > +/** @file > + Standalone MM driver instance of SmiHandlerProfile Library. > + > + Copyright (c) 2017, Intel Corporation. All rights reserved.
> + Copyright (c) Microsoft Corporation. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +#include "MmSmiHandlerProfileLib.h" > + > +/** > + The constructor function for standalone MM SMI handler profile. > + > + @param ImageHandle The firmware allocated handle for the EFI image. > + @param SystemTable A pointer to the EFI System Table. > + > + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. > +**/ > +EFI_STATUS > +EFIAPI > +StandaloneMmSmiHandlerProfileLibConstructor ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_MM_SYSTEM_TABLE *SystemTable > + ) > +{ > + return MmSmiHandlerProfileLibInitialization (); } > + > diff --git > a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfileL > ib.h > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfile > Lib.h > new file mode 100644 > index 000000000000..8e390590ee7b > --- /dev/null > +++ > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/MmSmiHandlerProfile > Li > +++ b.h > @@ -0,0 +1,23 @@ > +/** @file > + MM driver instance of SmiHandlerProfile Library. > + > + Copyright (c) 2017, Intel Corporation. All rights reserved.
> + Copyright (c) Microsoft Corporation. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef _MM_SMI_HANDLER_PROFILE_LIB_H_ > +#define _MM_SMI_HANDLER_PROFILE_LIB_H_ > + > +/** > + The common constructor function for SMI handler profile. > + > + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. > +**/ > +EFI_STATUS > +MmSmiHandlerProfileLibInitialization ( > + VOID > + ); > + > +#endif //_SMM_SMI_HANDLER_PROFILE_LIB_H_ > diff --git > a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfile > Lib.inf > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfil > eLib.inf > index 1d738c7087c6..56007d502134 100644 > --- > a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfile > Lib.inf > +++ > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfil > eL > +++ ib.inf > @@ -27,6 +27,8 @@ [Defines] > # >=20 > [Sources] > + MmSmiHandlerProfileLib.c > + MmSmiHandlerProfileLib.h > SmmSmiHandlerProfileLib.c >=20 > [Packages] > @@ -34,7 +36,7 @@ [Packages] > MdeModulePkg/MdeModulePkg.dec >=20 > [LibraryClasses] > - SmmServicesTableLib > + MmServicesTableLib >=20 > [Guids] > gSmiHandlerProfileGuid ## CONSUMES ## GUID # Locate protocol > diff --git > a/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHan > dlerProfileLib.inf > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHan > dlerProfileLib.inf > new file mode 100644 > index 000000000000..a885cc2b2ae1 > --- /dev/null > +++ > b/MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHan > dle > +++ rProfileLib.inf > @@ -0,0 +1,44 @@ > +## @file > +# Standalone MM driver instance of SmiHandlerProfile Library. > +# > +# This library instance provides real functionality for SmmChildDispatch= er > module. > +# > +# Copyright (c) 2017, Intel Corporation. All rights reserved.
# > +Copyright (c) Microsoft Corporation. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent # # ## > + > +[Defines] > + INF_VERSION =3D 0x00010005 > + BASE_NAME =3D StandaloneMmSmiHandlerProfileLib > + FILE_GUID =3D 1F2ED27B-A01D-4867-B993-9B710E5926C= 5 > + MODULE_TYPE =3D MM_STANDALONE > + VERSION_STRING =3D 1.0 > + PI_SPECIFICATION_VERSION =3D 0x10000032 > + LIBRARY_CLASS =3D SmiHandlerProfileLib|MM_STANDALONE > + CONSTRUCTOR =3D > StandaloneMmSmiHandlerProfileLibConstructor > + > +# > +# The following information is for reference only and not required by th= e > build tools. > +# > +# VALID_ARCHITECTURES =3D IA32 X64 > +# > + > +[Sources] > + MmSmiHandlerProfileLib.c > + MmSmiHandlerProfileLib.h > + StandaloneMmSmiHandlerProfileLib.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + > +[LibraryClasses] > + MmServicesTableLib > + > +[Guids] > + gSmiHandlerProfileGuid ## CONSUMES ## GUID # Locate protocol > + > diff --git a/MdeModulePkg/MdeModulePkg.dsc > b/MdeModulePkg/MdeModulePkg.dsc index f95c7cd69ee1..7ca4a1bb3080 > 100644 > --- a/MdeModulePkg/MdeModulePkg.dsc > +++ b/MdeModulePkg/MdeModulePkg.dsc > @@ -492,6 +492,7 @@ [Components.IA32, Components.X64] >=20 > MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxStandaloneMmLib.inf >=20 > MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformH > ookLibNull.inf >=20 > MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLi > b.inf > + > + > MdeModulePkg/Library/SmmSmiHandlerProfileLib/StandaloneMmSmiHandl > erPro > + fileLib.inf >=20 > MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaArchCustomDeco > mpressLib.inf >=20 > MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutor > Dxe.inf > MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf > -- > 2.30.0.windows.1