From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.92.42.50]) by mx.groups.io with SMTP id smtpd.web11.646.1614884402566043078 for ; Thu, 04 Mar 2021 11:00:02 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@outlook.com header.s=selector1 header.b=asx/zVIO; spf=pass (domain: outlook.com, ip: 40.92.42.50, mailfrom: kun.q@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=joFvRNCpIIXT2uLXAXuAstlbWCj7C9rHk8DuMIoHxAh8NhenrX5Y3DZlyEQNl11y/7LYPsxWqqpmjcO+S3k+ZkFEF0wIEgtEaTQQiM4FnpL8EJuWlZkbrhPFZqUnok/cjyWOH5DAYJKvChNGXOf924+G1CSl8b5HS4G3Ws8a7H7An0uSIdznltZ5/duzt9SirzTtipUn6CwhH51JMyNBlWDnd1O30RnHGpPVTLNMYBdYmiOlcSnw9E9vJFsFxV9CzitLM+Tdf8aEB4FOv3bTjvLrw8hizeAVBE+B+1e5TvWw1nF7KBlur4suP3kXSfpPs4x4wmQVGfHx8/Ic5UEnWg== 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=mZaJCcESTXZN3tHoVS2PSW1vOnyfNF+OmMyG5TRrNE0=; b=EJ2J4cbTKt7lZN6rGy4xALcYQ3W4igIxCmbfrxAz0BcivQmCDAi9LalYsz7hhPk92aEldRkmMu9jPFCRA+mM7TSEklTIQ+ec8YHN/ecz4DtmJQA5CMI0e2b2/yWsYqsPk7TyENwXGhqxJmcIq267kC2NcSoz2X0yimTGvd5kc7x/xjd4RQ3DNqcyUpLyNQS8a4cs0zGFk+hIzSxtLs7pIdIX+9iWsBeWk07UgRY5FV5/XJPpf7EVU2mFVXJU9NDOPeu/cpoUFOqN1SwER8oWkYL+620fBJj+jDRn0CkKGVWD34CSdSOkRnXE1LDwOnXhNcRqa5hBckPyy139HOzrPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mZaJCcESTXZN3tHoVS2PSW1vOnyfNF+OmMyG5TRrNE0=; b=asx/zVIOXphC1GOQx7mnOj9fjPTHOJpokRvvMVE5N3ECuuKxGI4qoKJXBZHGvSjC6DWSNmffXsTxIb2KFeeI2A/VoufxvM1prmaH9M/+he0PYF4EjmSpM6PBmf6CBYj8oQiKVyXSIBIA3aNM7eh307ahTGWrqaQg9zT0RbDOmxxFAHZpy99s7z5YbeipaM8KvUxAnyhsNE9hwaxbZnptmhUnGh3KrCBehNdTrHf/B7c7aYPrrGM8ptx45rFHAcH8WdL5zbMpnYUJNRWHGj20QT8asxKDmRzPpUv0g1FDz1DpSw0fK5Io/U8cYKZ4P3MfikVLvEVLilm9XTIhWm/m4Q== Received: from MW2NAM10FT057.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e87::40) by MW2NAM10HT053.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e87::192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Thu, 4 Mar 2021 19:00:00 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com (2a01:111:e400:7e87::4c) by MW2NAM10FT057.mail.protection.outlook.com (2a01:111:e400:7e87::229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Thu, 4 Mar 2021 19:00:00 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:C28BBD3A9080BCACC949477D4DB4246194E71F3509B0684010878392C4212274;UpperCasedChecksum:EBFFD059A973D255AC7D61C8F3E355249E16A1D6EF50A55689649A935C821128;SizeAsReceived:7520;Count:47 Received: from MWHPR06MB3102.namprd06.prod.outlook.com ([fe80::d4ee:1260:6f53:3f7b]) by MWHPR06MB3102.namprd06.prod.outlook.com ([fe80::d4ee:1260:6f53:3f7b%7]) with mapi id 15.20.3890.028; Thu, 4 Mar 2021 19:00:00 +0000 From: "Kun Qin" To: devel@edk2.groups.io CC: Jiewen Yao , Jian J Wang , Qi Zhang , Rahul Kumar , Jiewen Yao Subject: [PATCH v5 4/7] SecurityPkg: Tcg2Smm: Switching from gSmst to gMmst Date: Thu, 4 Mar 2021 10:59:41 -0800 Message-ID: X-Mailer: git-send-email 2.30.0.windows.1 In-Reply-To: <20210304185944.1716-1-kun.q@outlook.com> References: <20210304185944.1716-1-kun.q@outlook.com> X-TMN: [g/CNMcWw6ijtNBvSCyEQ1CrUu3PlWy5K] X-ClientProxiedBy: CO2PR05CA0054.namprd05.prod.outlook.com (2603:10b6:102:2::22) To MWHPR06MB3102.namprd06.prod.outlook.com (2603:10b6:301:3e::35) Return-Path: kun.q@outlook.com X-Microsoft-Original-Message-ID: <20210304185944.1716-3-kun.q@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (50.35.88.161) by CO2PR05CA0054.namprd05.prod.outlook.com (2603:10b6:102:2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.16 via Frontend Transport; Thu, 4 Mar 2021 19:00:00 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 86032412-8501-4a87-8780-08d8df3fb60f X-MS-TrafficTypeDiagnostic: MW2NAM10HT053: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Mew1AE42n7QabmQsaIRE4VJq+BkGFv0J+77jkplMBhmK029C3ZDmfD/LPi0K6Axp1nL9IeK5ZhJRcuSVOQiGoXPpyjxELRzBA2z7jN87yCpKa4a3aTyf38qgVvML9CXr8LOg/IYECITrSckLF2ksZ8HlMbGIb/u4n/Gyr28Ag6pNGwPfilvYHatWv43bVrwLfrb1ZK9av2PbbxsdcIxHB+lB6HH1+qO4uI5ybUwtOIH10foOnls8imtKsGVqJNkdKBMi72hTWH/vcCKxhIZXHJdZAVhMUCXL7+Xg4WFbqgQWqkxwD8bhBuxA3tTto7fUtVL5SaNLIG6Z3wHZpt2Tg2nZ4tlrsbcVmAKxCEkmcCQZMYHNSPUHB0pMPHPuTZg9 X-MS-Exchange-AntiSpam-MessageData: HIbNBDSq44FavSYEfU7i1ubO0aTCmWAbYBrEDuqAWHS9UUjUEDxUdnJo8b/qs+H3EUd67zQvKbbg4k4pJgn05tUs/LL5xLTOaME1neIIYRcgD2pijeUCyjjCX1DbtszVxVmSNcbQpoQT8VYVT6bJ5w== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86032412-8501-4a87-8780-08d8df3fb60f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2021 19:00:00.5758 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: MW2NAM10FT057.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2NAM10HT053 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain This change replaced gSmst with gMmst to support broader compatibility under MM environment for Tcg2Smm driver. Cc: Jiewen Yao Cc: Jian J Wang Cc: Qi Zhang Cc: Rahul Kumar Signed-off-by: Kun Qin Reviewed-by: Jiewen Yao --- Notes: v5: - Previously reviewed, no change. =20 v4: - Previously reviewed, no change. =20 v3: - Added reviewed-by tag. [Jiewen] =20 v2: - Newly added in v2. 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(-) diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tc= g2Smm.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, NU= LL, (VOID**)&SwDispatch); + Status =3D gMmst->MmLocateProtocol (&gEfiSmmSwDispatch2ProtocolGuid, NUL= L, (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, NULL,= (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/Tc= g2Smm.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 --=20 2.30.0.windows.1