From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.92.23.69]) by mx.groups.io with SMTP id smtpd.web09.7592.1614917671812225277 for ; Thu, 04 Mar 2021 20:14:31 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@outlook.com header.s=selector1 header.b=hoIsTtjl; spf=pass (domain: outlook.com, ip: 40.92.23.69, mailfrom: kun.q@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hsqPKou/eY23JQs5CC7AKvz2tec8fatmfI/M1W9ZCO7ULphZv8EABnTvE5mOLZPcV+FShFaOCrS6bQK1/Edji69Cx3nbA0FI5rcGBBIRT3aeFetPz14q18aFmrEzhEsz5e2A8/sXaw+2R9ELmC4SxK9GTOyjvDK2vIL9r/sfZYZ6/TfD4ZzNXA3AvZf11sIGpcKHyJDQBF4au62BtY+mOWGxKaFlolGdyRPkmwCGQcv5CecFhfl3+JrwTti8qPtb7Q41B9qaLjTv2extB38ZLZLgDxXEBzKcmUUgj9N/FwHA/KsBQx/HCDObJfwIEcR9Fj1U++Xvi7QTSuqDOf29DQ== 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=MKrhnyASTKXTwcf+XbpCWYXmlTjDd3QdZTy8vYMRmnY=; b=VDDVTYll4S2/basVdcEuL19+MMjzYksei2TauXOyBqLKBJaf07oxREbGEBaJqhqvNk/RjTPI5VeEBaoJ2tdJ7bJh+UDkG9n807RnnfJ6wgB5PmHPKEJ98Err4DkmgatU6aknhiP36G9SAUtZsqO8W81kfWc9JEZ07RPW8WGcS+VAlfpfeDdige7R2WOWf72KxkhmZgycT9Lgdp1q/yasOsN4QGsvZwbC37qKazDCI7atZyDUiV5n5Q2eqeXN+fVWavl2Gu/2eGzxTSa35JHw72oPGXcZOUrw7SjqjaVw1rOc4lOWKkG5kK1+mpNGzgwl1evBZQwejQiruLiMQGtfpw== 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=MKrhnyASTKXTwcf+XbpCWYXmlTjDd3QdZTy8vYMRmnY=; b=hoIsTtjl4JxeELuqq2fdgGzb3ySJjUKbPePvmBqVLDLBDImXqU4xAGhPpV9LqWvUs6zgTEbFWu+mC3M+IgI/3zaAT1BNLqlmOS8w1orakiqSS4AADnDKqfLnVdxaaRptD+OgYtaCRWlw9NTQ0hCV0mOg2QsjUnIRvDCrZB1zgiC20B/vGsOrFGIuRYGC9Kfkqe9KUq3nEdl/tBuKpgxPgL1HWbO6jp4YU6JQm8m6OtV4yYUJTbauIkjTSXME0fA3q3zbpoyQUKTmxueHmhb6myAGirTAvPFacmL7ZmzUebqpLGtfqAzHUiz5QSAiXzADnivGVtxGuZoEvei3C1xWZw== Received: from DM6NAM12FT067.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc64::4b) by DM6NAM12HT220.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc64::466) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.9; Fri, 5 Mar 2021 04:14:30 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com (2a01:111:e400:fc64::40) by DM6NAM12FT067.mail.protection.outlook.com (2a01:111:e400:fc64::397) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.9 via Frontend Transport; Fri, 5 Mar 2021 04:14:30 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:623C885225804A737F8A7FD87D89869ED5B69BA10DC55360206D3EC1B0D1DF21;UpperCasedChecksum:A86D0781AD42608CFBD0372AB8207A729ABF4FC62FCD52260D8F85ABC635F0D4;SizeAsReceived:7523;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; Fri, 5 Mar 2021 04:14:30 +0000 From: "Kun Qin" To: devel@edk2.groups.io CC: Jiewen Yao , Jian J Wang , Qi Zhang , Rahul Kumar , Jiewen Yao Subject: [PATCH v6 4/7] SecurityPkg: Tcg2Smm: Switching from gSmst to gMmst Date: Thu, 4 Mar 2021 20:14:12 -0800 Message-ID: X-Mailer: git-send-email 2.30.0.windows.1 In-Reply-To: <20210305041415.1733-1-kun.q@outlook.com> References: <20210305041415.1733-1-kun.q@outlook.com> X-TMN: [qgCrQibSMcBPffS3Ee8OlhXbEvW8Jo6H] X-ClientProxiedBy: MWHPR04CA0046.namprd04.prod.outlook.com (2603:10b6:300:ee::32) To MWHPR06MB3102.namprd06.prod.outlook.com (2603:10b6:301:3e::35) Return-Path: kun.q@outlook.com X-Microsoft-Original-Message-ID: <20210305041415.1733-2-kun.q@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (50.35.88.161) by MWHPR04CA0046.namprd04.prod.outlook.com (2603:10b6:300:ee::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Fri, 5 Mar 2021 04:14:30 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 874806fe-cba1-4390-5fc2-08d8df8d2cb0 X-MS-TrafficTypeDiagnostic: DM6NAM12HT220: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vOdRukbkk6kEpuAUiXxHYobNpFFTSAovPT0rBTAqQy9MsuFup6VVyVaavLExQysCeqSOSWiOubtlpuiNUKgtG6SJnn+srKYYnRrt41cTUaySLl3nrw0Sw+rzm8L1fCBFqbed28oJgv9BKHp/BAENksjnCD37Rbas/8ljR8vRJkzoV2GEMJk4kuxJWQm3Ge0pmBlVzXs9yB7N3VU2wq6YF1SMKi20+5LYHTTyLy4VipT9Y9X2Wz13K7OM57v34OxPBs0V3U1uRJCGUKTZBLN9pvbggl660vWzBLSd1lAVrUiLVRKhPWyVFLc6XkcLoaxJeyiQW0T/VUQvuA1paETtMXBWAeO5YIFLn9uUDznXONPGOnoCwB1LG3xlkgEk/UYw X-MS-Exchange-AntiSpam-MessageData: ILuJGNb5sew3hGwj0k0RXcD/+MhYQsV7tlxW1e5JABNLSkFEzlBqShJoBnXCVGJbJFVjE7qUVfTxNpyItJsY9hd7O/ZcNle/+pmNEROUpcK9wRD5e0xjoADZBZwkCrLNUE6LjA3W645QuhKXKLASkQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 874806fe-cba1-4390-5fc2-08d8df8d2cb0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2021 04:14:30.8572 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT067.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: DM6NAM12HT220 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: v6: - Previously reviewed, no change. =20 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