From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.92.41.74]) by mx.groups.io with SMTP id smtpd.web08.1480.1614715501219677070 for ; Tue, 02 Mar 2021 12:05:01 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@outlook.com header.s=selector1 header.b=XOTfKJ3S; spf=pass (domain: outlook.com, ip: 40.92.41.74, mailfrom: kun.q@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eN7tUUxoMNYi451jfY9ZBmxXvqHD6aV06vstlR3um1ue2EntZ1PFbcDTjkxdBMZPAtdzMuj1BlH5Djw/nzzCOky88lVldzGGInkK2ZzNKL7Mvctd9fvK8WgNpplljc+uI+eEaE7laB5xxW2uwFAaWMP0ke654mAKLgIQrbudCidTpj1xrg+/d9zfi70cBfxWjZEdFXH5+Y+Hwp7ZNYAju+zzHmMIIs6g2akCqAAZFKjN8XhupkM4B8eDe9m4yS7qTEgP7e/iG08WFMwSy6yuLM6nTBDPDnRBhg5HYBVnq0uiQWrPYm206PrTm3PWZ9Om6wiV2Bx1EDFv8+YNeEr9Ww== 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=/f16YH4MvdaVGpWH/0H2kdye9wy3ejE82D80PP+MJNg=; b=UCGZjQkUbsRQcwWTO8cAWrM8jd3y0FVvuM010ffhXUB4APYbAwvT8ZaAEdjBM0jaxKIIKF2Hof4utbB5WLgc5ynNS7Z3irye4hlYu45C9qdsclvt4PbZDdwlVPiPsspG6PbJNQyjB/X/BQisJbxyPvTzBXzGBcYqbBsbxHbF2+KVtNyolhnWLGXb/4KYx8wq6cCJ+m+o09HncRskxJ/Gl21j6EzzRuPZKciLSALxLix3TcNd3fa0XvHx9J5BiRAPykFs8V5zIFhOP5xsCSCJwOUeTLle6vyPShIUUUUcyBwmCz4OwOKA56sH0P/q850CoF8pX5j8iczWxKrPUM6HzA== 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=/f16YH4MvdaVGpWH/0H2kdye9wy3ejE82D80PP+MJNg=; b=XOTfKJ3SCJ4VvAMWNdvCWl9HxtMoaImGF48cty1xaytfj/QKGi+STkdu6mMSaK9Mez5hRsF5pdK3P66ZpEMEUgt0dsYdEOOVyTOIEMb060m9uKZlwu3JHHUhf5dPeCJ4adBZKuDbXm0u83VBY+jvYFsZloDUV6giB5p8AfhHDnetVGDchN/Ju8RGfUk1v57U9VTmM3FHkFM9F1hiLKwnW0PUsfXEHd5BO2mVEMEe2q6Dc3M8kn4LagVVBTbXVi81d5sGkDnx286LWu41qWj96aJjXrtMVaJjzIQEAbcBNXyVFFAeda2xQAySMU8OzblS7jZiw5DiYSuhqaW2Qvaqxg== Received: from BN7NAM10FT040.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::41) by BN7NAM10HT113.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Tue, 2 Mar 2021 20:05:00 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com (2a01:111:e400:7e8f::49) by BN7NAM10FT040.mail.protection.outlook.com (2a01:111:e400:7e8f::238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Tue, 2 Mar 2021 20:04:59 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:424366219762C1465C77BCFA90DA9CD7CDA5341DACBF46C15985384032B02887;UpperCasedChecksum:ECFE31B581963056AF2E40C0C71130DEEEAEDC3E5CA114D339909D85BCD7C613;SizeAsReceived:7533;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; Tue, 2 Mar 2021 20:04:59 +0000 From: "Kun Qin" To: devel@edk2.groups.io CC: Jiewen Yao , Jian J Wang , Qi Zhang , Rahul Kumar , Jiewen Yao Subject: [PATCH v4 4/7] SecurityPkg: Tcg2Smm: Switching from gSmst to gMmst Date: Tue, 2 Mar 2021 12:04:35 -0800 Message-ID: X-Mailer: git-send-email 2.30.0.windows.1 In-Reply-To: <20210302200438.1901-1-kun.q@outlook.com> References: <20210302200438.1901-1-kun.q@outlook.com> X-TMN: [7NGoLTw8n6fT8RGE7Q6631W/yaQeP8fg] X-ClientProxiedBy: MWHPR19CA0063.namprd19.prod.outlook.com (2603:10b6:300:94::25) To MWHPR06MB3102.namprd06.prod.outlook.com (2603:10b6:301:3e::35) Return-Path: kun.q@outlook.com X-Microsoft-Original-Message-ID: <20210302200438.1901-5-kun.q@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (50.35.88.161) by MWHPR19CA0063.namprd19.prod.outlook.com (2603:10b6:300:94::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Tue, 2 Mar 2021 20:04:57 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: a5061981-4c24-4bf6-85a5-08d8ddb67443 X-MS-TrafficTypeDiagnostic: BN7NAM10HT113: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 673/N8eZ5bMR+z8palIWASwu/9e+uSdmbLOhSkeoJPKzlQlbPRzJJAArx2uLU0OeXFczrKB5HQSDz/DOu7Jfl4YlNZwO2NXcWrN+dd11pgCMYLa2ejXpP3GbjYMXNbGBIEumtuLlQj8UoCiXmlIBG5Qu3uGEIa9c17VRHD7Hwoy1r6NLbgSWdKA4BteSLa5ew9qJgy7q/ow8vzGhdUrfk+jyprduAAanFMBzs7GfG7xZe5hlbtPxZTuuFzZ3Ljrwc4eqa8gIa1etMUE3II9pn+5cQK/0iI1n14kCH4sqEGxZAXAurljArtAS6dOwBTzhAmZcJfSkXpByl82qnhKyz5l9U0MjtZ4scK4OVOBwB2s9WH3hnOwzXkAu0aRiBBQJ X-MS-Exchange-AntiSpam-MessageData: UYYmuGeVK40F7gaLj4dsmrvGfcsy0QPEeW8Gd7EIg7KcddVdM5zAGh38zm/N0H5CQMbnSpzISI+OzYV5XoE82kDV6hhuP+74GsVycHWA6Dw8Lew4fCB1z4JZOSo5odcrPkaKiM7imjubQXwEnEITwQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5061981-4c24-4bf6-85a5-08d8ddb67443 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2021 20:04:57.9782 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: BN7NAM10FT040.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: BN7NAM10HT113 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: 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