From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.92.22.109]) by mx.groups.io with SMTP id smtpd.web10.1464.1612920315803490036 for ; Tue, 09 Feb 2021 17:25:16 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@outlook.com header.s=selector1 header.b=rCo6XJGU; spf=pass (domain: outlook.com, ip: 40.92.22.109, mailfrom: kun.q@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MhGP8dEhpKtS06f2590KqReYrKckJARvP/gl8Rd65JVbsd5HsUJLXdK6dwfL0EBamsC+AA3FK/nDts0tFsJWpdqYUsOMF8wRirRkW5rAx+VSyjBnPWJwCZeEuAZJJR83D+QYq651EycYf7OevNquROsR8CrfhMxVGDiEbexiCUcZsNSUKG3V25NqAgcCK6ZlP4nz0SKLd/8B8He9psh9TLYRlxfy4QOh4XWvuF56HTCyDyiQv0BuL58l7ceqyIVxam/RY59bKggEHPKKs2AUCgi6qQVr1qdrl4vBxPSPd17E1eNvYJgngYpf2OpkidfcBYhoxFA6BHPIEvftpEFGFg== 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=QfYhZhvojPcFjIyv60Iw/Qj+ZMaA7n3jryjoqM3BpKg=; b=lSkp0m20BCBbJsoF7TlV13NTS0IkcarnEXq3yXNO4gZ7iw7kLwE5zytw7fePrkNDoShQQBjzTRLU5iVlxBWiuOgkOAwvRhPdCSub+kspxvJIN720ycA5urSaXOOaj2bOqxdkTSt4KO4BwJOhINk7B9A6JovMx2KB9lFYqyr0KANrcuji/GIs9uKhz46zyuuOaI6jvPDGIjPXFC0Z5em6oBH8mzI3IuqgSlSu57MYBVvQ6RnTYpWEjy8h2gCcmtnEaiK+drQL1mtnmLNkJBbGxk+4ayD9bTY3d2xQiVxC4D/RqbUJ+13BPMMjXihP2mPzRC9aLeAkGBCqF445O08t0A== 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=QfYhZhvojPcFjIyv60Iw/Qj+ZMaA7n3jryjoqM3BpKg=; b=rCo6XJGUZe39TTmvc0au/14Hnjfff/vYWs9/i2hulnmdEHGd6YMBf1FhUKSop58Bw4+wCk7EPRerYZO3a9NW2lnJwvqZa93hoxG/yb0Qi7WJWG2cBTQrkWbEOAELKC8tlfm1JnlhFCXevtdvxW/PH7tB43gXybuG0lQxn9E43ZJO2+xJyPJ9+LvAYkS596xeznqngLmtofed/7B7dL+F0yQOJc2ZQwKvnAlVCZCG+KAA4RKj/k6lqBQSqZMjv6MyNBMMb70YL7lU5Wku51Sdnlo2x+Z4xjEjcwqzs+FkznVIXDkumVVao1h6rbXzkg9hG+/2C31G27lvMsF5b84l6g== Received: from MW2NAM12FT030.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::42) by MW2NAM12HT251.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::326) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.11; Wed, 10 Feb 2021 01:25:14 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com (2a01:111:e400:fc65::4b) by MW2NAM12FT030.mail.protection.outlook.com (2a01:111:e400:fc65::278) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.25 via Frontend Transport; Wed, 10 Feb 2021 01:25:14 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2719077D7A21F6ECDBA6E2218178EA64AA3034C5072841C8102C1BA34ACA7526;UpperCasedChecksum:A04C5702152BB2F29F7CC9BDDBFF1AC959E1DC4008C924644B12BFFF0360DF66;SizeAsReceived:7470;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.3825.024; Wed, 10 Feb 2021 01:25:14 +0000 From: "Kun Qin" To: devel@edk2.groups.io CC: Jiewen Yao , Jian J Wang , Qi Zhang , Rahul Kumar Subject: [PATCH v2 3/6] SecurityPkg: Tcg2Smm: Switching from gSmst to gMmst Date: Tue, 9 Feb 2021 17:24:54 -0800 Message-ID: X-Mailer: git-send-email 2.30.0.windows.1 In-Reply-To: <20210210012457.315-1-kun.q@outlook.com> References: <20210210012457.315-1-kun.q@outlook.com> X-TMN: [6sbuTRYc/UqKE9LHbESrdYAT5Vsq591c] X-ClientProxiedBy: MW4PR04CA0051.namprd04.prod.outlook.com (2603:10b6:303:6a::26) To MWHPR06MB3102.namprd06.prod.outlook.com (2603:10b6:301:3e::35) Return-Path: kun.q@outlook.com X-Microsoft-Original-Message-ID: <20210210012457.315-4-kun.q@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (50.35.88.161) by MW4PR04CA0051.namprd04.prod.outlook.com (2603:10b6:303:6a::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20 via Frontend Transport; Wed, 10 Feb 2021 01:25:14 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: f8db435d-3835-4db8-664d-08d8cd62b787 X-MS-TrafficTypeDiagnostic: MW2NAM12HT251: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vq0qoMeKAX0OTLRPTmLVs53Df9kDnIJ0rzgdOqJVTaBODA2ELOT7ugBVYcLKsJRxFtaoR1vDKyKx7TABvEWn0P+8omnAJy+Y+p71Nq+wZ6gbUDbCrQs8ckj/FRtm6NiLPvqQBp43ixmIve0EJXB6T4T6F2txfnjSP4UILPGdNBzYM1cQCll9shCuPoQbhL692kg7VLDRYcKq0pE4wU53oifG5fxSM1wp0lZwvdPkexUiJ+XNahUrJ8p/Fptp4kZboQvrBTFvduBD/Oiy54OlP7D5wyWWkj0CMFms8N1TEQQuMY8h9BqM0UJ/c3Y2jWZ1xE11Efve2p1GdSkBlkyhQ4RJEjXtoUgUIWeZPueThJubSpZhgV6xVDy/Nnjhkk4xsw0i8w30r1AIOuRF/vEEAQ== X-MS-Exchange-AntiSpam-MessageData: b6gfuZzmRTJI+aQtqQFxuGH40ufnM1MhFG8It4vXIvvuUdK7K4mTl+Ec8x03uEDG0HZsChFgUukPLiyUiXG8CX8gKc2/Ov868HfRUahSTPuvhCCnR1b+9zXMhKbsR/4lSzNq5jVzhCztpFXD6yiy4A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8db435d-3835-4db8-664d-08d8cd62b787 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2021 01:25:14.4325 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT030.eop-nam12.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: MW2NAM12HT251 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 --- Notes: 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