From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (NAM02-SN1-obe.outbound.protection.outlook.com [40.92.5.66]) by mx.groups.io with SMTP id smtpd.web12.17490.1614379959920757439 for ; Fri, 26 Feb 2021 14:52:40 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@outlook.com header.s=selector1 header.b=huvRepe2; spf=pass (domain: outlook.com, ip: 40.92.5.66, mailfrom: kun.q@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=grcPxkOqKPSgNOaYdtxLkKJ5BqF/yaHUpZuQOzX7nlNW8fJgmpw1k351v/8GRR1+2VPpn9RdTcBE+Dw4zEOwC0m+fbMVu+59SlRHJJPVLnDMFLRwI/KcqqaMCktYVf8zA6SF2nU5tFbCjwKBXnNdIJapbobXZmKDd/dTbltFhwsewyPRPo5+bu1oIJrell7QJ3KsbEs1TpIsnx5VZ4c6jYON/PSu1LoxHhyRtO/j/UE3nIOiYd4dufnvXaURt6sVJKEJuH/YmpbzstjjAHq/7y90Hyt+yjbjzM9GevydKtLGjFDTfIilBnIeiLp6WyuLHR2/9LZiWodB33zT9HWBdg== 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=BYNMJNnT+sXQPsX1uNRZZnkJQa2NDovMWbAHV8jmX1Y=; b=HiFCTm2n93NuZFKaIrTfUshqBn7HuqM/Q9BHnt4G8oSE2kOyBtd4j5xtZjkkIu1vlPNU/B1BUHvI+kTNUp/XQNCyYJDFqfvzf4BhtSp2YPbG3AZwefiHzyXzc/WgpZ60YaAIEeUivtzCLdi98EdgRyBso9fO0eDLORGy4BUQ1AG2Smxn04jcPTvb0jjm+1vgYipPvV9Eq+HAMQoFSKuKUDzJB4RGm4lHqDTH6SZP8vriS2HHKFaQrVwMZdfCA2/hMAHKJbZZ2kyfDce6xpuDIgPaDJM0hBPJN7Fbt1K9Us8yDo6HKN7MHYiQGSr9MxYkFqQhhVOb/zmgb/HYCf+mVQ== 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=BYNMJNnT+sXQPsX1uNRZZnkJQa2NDovMWbAHV8jmX1Y=; b=huvRepe2n1BXtFfmTFTWKCgP88OrZIRPT+dh0xJyJZyvUtWlfGcBbNkBjM8U+IlS+9lWZFaOeQ4VaaHT9Bvgu/9zXdY+VA/YnH6EMPb04E+ZR3PuQKRCsLZMpp2RQk1kcflQitTw5QvXCim/OddU/tXFr7C04Ub6zWUqtvFArDoBntUI3+HUu9RdyE7dLOVIFlaWwnovoGnwgYBUuqT5+VNsKvZ9wG9EVh7ODZDRTqsRgh1nI1uDLTR0zNjb+M5O1TUqRj6vSnmNsZtBKVQ/Q4wlHGRCuftMw+/Jes+MOBWAUvJ79RmnudXUhBEnzrG7R7g1ke5yoaHSmqLdcr21lg== Received: from BL2NAM02FT003.eop-nam02.prod.protection.outlook.com (10.152.76.55) by BL2NAM02HT173.eop-nam02.prod.protection.outlook.com (10.152.77.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Fri, 26 Feb 2021 22:52:38 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com (2a01:111:e400:7e46::4a) by BL2NAM02FT003.mail.protection.outlook.com (2a01:111:e400:7e46::204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Fri, 26 Feb 2021 22:52:38 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:EBED37367C141CE262BD352D1C7ACE73B43B5673AFF3A1896EB2732BE4323ECB;UpperCasedChecksum:AB7F227FB65E1138374E8AC1813F172DACE76C60D8FCA214F5DC19086F3DC751;SizeAsReceived:7539;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.3868.032; Fri, 26 Feb 2021 22:52:38 +0000 From: "Kun Qin" To: devel@edk2.groups.io CC: Jiewen Yao , Jian J Wang , Qi Zhang , Rahul Kumar , Jiewen Yao Subject: [PATCH v3 4/7] SecurityPkg: Tcg2Smm: Switching from gSmst to gMmst Date: Fri, 26 Feb 2021 14:51:55 -0800 Message-ID: X-Mailer: git-send-email 2.30.0.windows.1 In-Reply-To: <20210226225158.1378-1-kun.q@outlook.com> References: <20210226225158.1378-1-kun.q@outlook.com> X-TMN: [Pxj9AQ3LqLoCA6e4FbSjm3dg5M2VUb4O] X-ClientProxiedBy: MWHPR12CA0053.namprd12.prod.outlook.com (2603:10b6:300:103::15) To MWHPR06MB3102.namprd06.prod.outlook.com (2603:10b6:301:3e::35) Return-Path: kun.q@outlook.com X-Microsoft-Original-Message-ID: <20210226225158.1378-5-kun.q@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (50.35.88.161) by MWHPR12CA0053.namprd12.prod.outlook.com (2603:10b6:300:103::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20 via Frontend Transport; Fri, 26 Feb 2021 22:52:36 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 19390cdd-e45e-49ce-c0e2-08d8daa93671 X-MS-TrafficTypeDiagnostic: BL2NAM02HT173: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VzNCydUQ+AvgqkffKqIml1v2sDzHheZOclcPV9DJgtmTm3DiuwvPoIXJhb6LtpnQVjfk91AAWNmIm0YsGVcNnQIsdbNDVH4h07AEWeUb8sMJStnkwJZUavFKRXq9Dmeaz7KThV1wQEnTQMH5+JZbJ/PAp9RZtrDkYQlAzVYlFK6FWZomYyvcq0PVfpwvhz2QcvnFkaqpRPxvc9VguslJGapJHjJuZhjKL36UP1s044DNjF2ZsFBQhhYsjo75ax8hI+19tZwJhFfrpWeFPKLh2I3Iz0f7g1X5Mt38Fv8YmRKxSMYPHHHbZdJZxt4Gd66ohtxBSZJo8Ljte0nSWD2e5Mt3q3VjR5nkal5dkTWe44iPsSAa0F2ozMXriDJphDaxCy+F5WynqiaPWfQ7Q8qzvg== X-MS-Exchange-AntiSpam-MessageData: PEkua64wLnj/bVNESLJQQfOxD8m0cnzc43xFpGhYPvxIKoqQVGWVAzmnp0hysLyAuJ74bU+RNpCh9Xwcpg7wKOeMLyvDJ7S2SKPFCE8sMmPNXNTs/8CxwXTnsXhCvPkvMY4T49TXTzQtLv+W7BSlWw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19390cdd-e45e-49ce-c0e2-08d8daa93671 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2021 22:52:37.2769 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: BL2NAM02FT003.eop-nam02.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: BL2NAM02HT173 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: 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