From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web08.953.1614129632117115353 for ; Tue, 23 Feb 2021 17:20:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=ErJSZYWO; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: jiewen.yao@intel.com) IronPort-SDR: iNZOK1ir+QqWphTaYShZIJWDYmq8R/gK1X33mr3VqMVz2UTIu7pW8TL4lebWhElhAixlPbR9vS yN2rEZHNy1Jw== X-IronPort-AV: E=McAfee;i="6000,8403,9904"; a="181579286" X-IronPort-AV: E=Sophos;i="5.81,201,1610438400"; d="scan'208";a="181579286" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2021 17:20:31 -0800 IronPort-SDR: 46P+wD4JUd7MZBgJZR0ZNYbxL2hoXOMKvmB48/5xIdSXCVtmF5FI861QQZERSGI8vjNqPJzWOD M93Mpjp60SNg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,201,1610438400"; d="scan'208";a="499376488" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga001.fm.intel.com with ESMTP; 23 Feb 2021 17:20: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.2106.2; Tue, 23 Feb 2021 17:20:13 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.2106.2 via Frontend Transport; Tue, 23 Feb 2021 17:20:13 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) 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.2106.2; Tue, 23 Feb 2021 17:20:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eG9jGJ8EniETIgDlLSmjH//+oXU3icl/DCSgG5o0lV6DcDEBgpBY481I2o3NkDaMJOzt7tFQB/KhmbQE2bd6W8AyUzzDeq/Cm6qx8zGrKKmoJCoSFCKfmOo7OFk1tUy324sFoJbXd8orwuCeCVtQUoBJw2t0yH4k1kxRcyZAD2PRj/5Cz5L9Ed/oyIxQJoGWYptfDZZAPMy0yxMGjjJ6kZw665f693ETjuxSbfh31ptybeVQEq1HrsYLv+gvr/KuvcQQIgjyFlrOmRD/QQfnONwD+6Gq+UTLiH3ApyJQTEyP3Bao0Y7nAevnL4BYz8CmrJcIqhGJvGbOMFxsfyL/Tg== 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=SwU5z5tKVDt/wAcTS28tpIWSJrjJ1LCZNogfMX+oIwc=; b=AcMPxr89j4rsQf56LQnFg8u9NrxT6dnhYJnMIXDAd4Zf9DNGGNPo/PNOwjqBOiJ4/CZ6QZiZDiBP6aZN9fqVxnWH804tMp9IRnOlCXafL0D1WMlCWeKtxg4VSNUtSpmTKuzY2Ha3VuwGNEyOlPLXa5kmoMLappvUYuuR/I38p/9JDTeRV/LGAgQ05iJP2JQphwX7tvnBnH6JkEVY2iKBZ4LCgTXNx0td+K9m6sVB2BADh1PmSV9ZFyJBv4mVnz8/itKWagOUyIb/XrGpusRBRUHY6LJubBufUgewoN0UQQuvFVOGgq4GZIcaNe6q4luhtgSvtb9Zh3wVkOpqCf1aNw== 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=SwU5z5tKVDt/wAcTS28tpIWSJrjJ1LCZNogfMX+oIwc=; b=ErJSZYWOo79gX1YZ/Bft6CeZDIGEFiG9InHCrMgOm13inSKMnORQQMTCms8lA09Uhjf6dTHdhjcAvomBrq1eisyw7yNbPiTI9eylqy3s8BX0MzByheNP/hLlFd7lps8et7MpZAnPWm7YxTQkOORsULQDxfLujFAh/Ugty8Ga4F4= Received: from BY5PR11MB4166.namprd11.prod.outlook.com (2603:10b6:a03:191::25) by BY5PR11MB3989.namprd11.prod.outlook.com (2603:10b6:a03:191::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.33; Wed, 24 Feb 2021 01:20:12 +0000 Received: from BY5PR11MB4166.namprd11.prod.outlook.com ([fe80::5983:f233:56d6:8132]) by BY5PR11MB4166.namprd11.prod.outlook.com ([fe80::5983:f233:56d6:8132%4]) with mapi id 15.20.3868.033; Wed, 24 Feb 2021 01:20:12 +0000 From: "Yao, Jiewen" To: Kun Qin , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Zhang, Qi1" , "Kumar, Rahul1" Subject: Re: [PATCH v2 3/6] SecurityPkg: Tcg2Smm: Switching from gSmst to gMmst Thread-Topic: [PATCH v2 3/6] SecurityPkg: Tcg2Smm: Switching from gSmst to gMmst Thread-Index: AQHW/0uiqqygNXIqUUejS0u/8U92wapml7bQ Date: Wed, 24 Feb 2021 01:20:12 +0000 Message-ID: References: <20210210012457.315-1-kun.q@outlook.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action 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: [101.87.139.49] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a7e62dce-fc13-40ed-4818-08d8d8625591 x-ms-traffictypediagnostic: BY5PR11MB3989: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:397; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MfoBKYYZJRpzHwS418SGaTx6CAJq/2sWqVi4IzdT77hCKB2UUfMkbLqgXn5cANgOBfI4QWztZyH/omyuGBbfMhPBYxIdpKxch2ND595vyQ1vHPUeNhXoz5UUJ4FApjnjIa2+xSa3jh396OSTmownMPTFvW9nylB7b2AuiQh/IJVGn3Lku6deYRzq9cE3bmbKmsalCDDuURyvtsl8n/gXAGaLjJDe6Rv1N1TOhsnj2Hou8ZKGjV5vcI6RpcYIoIpNw2t5k7llC2l1CshB3rE0RcTby9wvxFngTqpsKKzo+Z68Uv4meo4/QGnrYzC5wuWWr+C+ida6vGq8s6u11S9GxSNi7qebX8m3iVOEfiVo8MK71WFv4XaQ0dD2vltDpLshs/nC2ooYlWFb82Gw/9ABwj1xIunFJ4IMH2EYSzU88nHRvhCsz/8HsDUFTCfta2btI4CywUl/Nq8TzamU2CNy6A3PTpE1jAlKE0RHiwtbFsl4hFfl/ujV/uZ9WyrUvQQwpYB4QTefS6GtoULqJsxgUg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR11MB4166.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(366004)(396003)(346002)(39860400002)(136003)(8936002)(19627235002)(8676002)(66446008)(110136005)(86362001)(7696005)(6506007)(54906003)(316002)(53546011)(33656002)(55016002)(9686003)(186003)(4326008)(66556008)(2906002)(478600001)(107886003)(15650500001)(71200400001)(66946007)(26005)(83380400001)(64756008)(5660300002)(76116006)(66476007)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ecyHxDBF48+SEFQGDPDoBTe7d9Yey4EuaVpCywExieZpnR2xUrT/tGM4bz/B?= =?us-ascii?Q?WuLG1pnZxd3lBmfVVtZ3LXNcO36e1Hgr9GhssRbalJ8swRvxgu4+3fS7Cp2S?= =?us-ascii?Q?vcn+0PSqL9Ix3Cc2fV46aHQZECRlWUBdm2eobNILhCYVNpfq0mPkJTaE9o+a?= =?us-ascii?Q?NgvHtdUU+nwejwfAUknzowBQqdLZ5ttQSwMzjqBtwCfH8qBFQyfJpwvCdPQ5?= =?us-ascii?Q?OOtFQGCgS8CjQInFqY95uiys35vCtWvEEi93+eK2ZgYfRsp+xp8tmCZJFds/?= =?us-ascii?Q?y6shBThkgGgoFKvnTpc2YOZ+SzLGcsVcgM6C5NQpNR/DlebTv4AdfLiOkiYD?= =?us-ascii?Q?56KoYAMabGAQo7zsotWPlmqqw0F+IbI+ulF3JYjmiuY2nP8c5KaIUfUuMqI0?= =?us-ascii?Q?er/if3AsC71b3hcO2W3nWGo5RcYV2swPBp4KiUka0UyQDeICIxr2LSDj4MaJ?= =?us-ascii?Q?Hn3DOUQsaIkBZYq4q5RlLKKOx8Ak8nZeBuMcvoxXhe/9byUj0jEtcjwZwKkp?= =?us-ascii?Q?PH5IY0Xk6GRfs3+AHS8wEcC7kbfmfKcerZ0u7r/SehfCwDTLKMv3bBSurGfp?= =?us-ascii?Q?Fi623Ijfh/u5w8+9jxpi92bTrLiVRGv8cwSHkkd+GlyGd+rQ5Xjxj3vrDZeO?= =?us-ascii?Q?NgKgTWpTYq0bYqMnhUVHkgueZkls69W1rA3imRxL4yR9w1C8lUsttiFn50P1?= =?us-ascii?Q?JiCIeuX1HX12OS1U0b/DSs7Wras+qYO9zb6FXjue9sV6hpY2WTD53AmnGZb2?= =?us-ascii?Q?Lwdq53mD5zSnQ7fSCxvzotvcg8sH6jfRUkzrhlZWCns0APUg9Y3JYRgfTaj5?= =?us-ascii?Q?yM4kwU/HykUoF7lrZV8sFXBrTqCPGqzhn59fUtzffUCSUoA323MXlazO0f7m?= =?us-ascii?Q?vbGpam2VWt0z+gD8JnLqq8ZXTSX0Pp1gpHVwcFQGs0IO8mIgN8EgkjnsNx1j?= =?us-ascii?Q?7DJ2JS/KnrqYpkdore+zJ2peItTfkYT+bivTpi2p+6XNvPWVBFblYKTaIF2r?= =?us-ascii?Q?LolsCN4njLfj4G/ICnaXjZAllf9fXtvX6GjlVAuWRFn4d3YNmGDwzal3jj2+?= =?us-ascii?Q?5dN8ypExMKe9aVy+1smnTuj9YJ8M7s08YkMYfZURyFsbQ1w7g5K7SOdcx9i9?= =?us-ascii?Q?2puPaTCKw4J+w1cYKWu+x5veflcPZ/Ez3J7pFJyDQJFbhNNykFMCQuZ8pr/m?= =?us-ascii?Q?+KoWzJVh6FhcZwEXNfbJlYTn54efGaUlAXzdkhVwKaFsBvfuyXSMMRxk5FH4?= =?us-ascii?Q?glmE6M2SWsn62N2FJx5Ox/60MLiumCMmA1Q5mSd8W1ifZp1y2Da/h11hosX9?= =?us-ascii?Q?MON5YNaMeXTDKDBrtWxNnFwV?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB4166.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7e62dce-fc13-40ed-4818-08d8d8625591 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Feb 2021 01:20:12.5115 (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: 77hX0Gjs3fjl1TgV4CYeipzekfM94TSypyJY4tnnoUK89uAovHDwLxO3X059noE6AN9pRXSqkYMOJihWLc+31A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB3989 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen Yao > -----Original Message----- > From: Kun Qin > Sent: Wednesday, February 10, 2021 9:25 AM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Wang, Jian J ; > Zhang, Qi1 ; Kumar, Rahul1 > Subject: [PATCH v2 3/6] SecurityPkg: Tcg2Smm: Switching from gSmst to gMm= st >=20 > This change replaced gSmst with gMmst to support broader compatibility > under MM environment for Tcg2Smm driver. >=20 > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Qi Zhang > Cc: Rahul Kumar >=20 > Signed-off-by: Kun Qin > --- >=20 > Notes: > v2: > - Newly added in v2. >=20 > SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 4 ++-- > SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h | 2 +- > SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > index 91aebb62b8bf..08105c3692ba 100644 > --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c > @@ -870,7 +870,7 @@ InitializeTcgSmm ( > // > // Get the Sw dispatch protocol and register SMI callback functions. > // > - Status =3D gSmst->SmmLocateProtocol (&gEfiSmmSwDispatch2ProtocolGuid, > NULL, (VOID**)&SwDispatch); > + Status =3D gMmst->MmLocateProtocol (&gEfiSmmSwDispatch2ProtocolGuid, > NULL, (VOID**)&SwDispatch); > ASSERT_EFI_ERROR (Status); > SwContext.SwSmiInputValue =3D (UINTN) -1; > Status =3D SwDispatch->Register (SwDispatch, PhysicalPresenceCallback, > &SwContext, &SwHandle); > @@ -891,7 +891,7 @@ InitializeTcgSmm ( > // > // Locate SmmVariableProtocol. > // > - Status =3D gSmst->SmmLocateProtocol (&gEfiSmmVariableProtocolGuid, NUL= L, > (VOID**)&mSmmVariable); > + Status =3D gMmst->MmLocateProtocol (&gEfiSmmVariableProtocolGuid, NULL= , > (VOID**)&mSmmVariable); > ASSERT_EFI_ERROR (Status); >=20 > // > diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h > b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h > index fd19e7dc0553..d7328c8f2ac9 100644 > --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h > +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h > @@ -24,7 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > #include > -#include > +#include > #include > #include > #include > diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf > b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf > index 2ebf2e05f2ea..872ed27cbe71 100644 > --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf > +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf > @@ -50,7 +50,7 @@ [LibraryClasses] > BaseLib > BaseMemoryLib > UefiDriverEntryPoint > - SmmServicesTableLib > + MmServicesTableLib > UefiBootServicesTableLib > DebugLib > DxeServicesLib > -- > 2.30.0.windows.1