From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.125]) by mx.groups.io with SMTP id smtpd.web11.676.1586298924324827400 for ; Tue, 07 Apr 2020 15:35:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=PMi+0Mq/; spf=pass (domain: microsoft.com, ip: 40.107.237.125, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dhhxlfd0EZum7qlpW0lD2y6fSJ0nmvBPXcRxpuKWqhYibDcouxeMEZj5HXHc90WPg/iwHnJhY+GrN5rbSJSm+oYcX96vcH8si7xArpkLSmqq6EQA1VDzWgbjRO/jNYc6gPGSFTY3HYV5WonVDqa8HRJr9Np+CB0kvpx8Qs2D2HjcbuvK0SFc3xh0BD6q03GJW7LwE6/eIW4GRfKWHNCcKmv6A0XhBPogFaXhMseRG0c9wBWJ3dO7nfENuZH33UlZuioOiLd1zVj8uvRpOoYhP9cy020fz2/xYDXDdyrencenUPrwohq2I6yKvdUFATvvrPvisTnN1T0UHZQKt8Da8A== 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=NtsWBKzVf1JLzjVDSctBQ7q0QwQyXa3ZwmTQwPhcnT4=; b=BEc61GZ3+GF66uq4quHyN3Uumr0kGB/hdVLNehmEVLKxgOE26lQvGVuj8FLv1VE0KZF9Nwqa6UuZMy3o4+BY31kidOJUzQmVlGoUGcpjqOdgIDo+ACauI3nXAeH9wRawOHxZ4e4CNQuQk8MIdp91zGn8gfMSAU3NpzUy4YWUgnaF5ZRXU9My71SoctkFELOLiyI1eO32d8Bwb0lH5/CUzuLanRhpA9YPFyYHz4XDGqAoSygV041vujx9C4G4lYqVP9CwI0kntkKofb0mpb+X7fRy6kpQJQ0w22fsh/avmCPv40B54r69ifinPyE+WlZ2n9mf/mO42bpkkxdt52uK2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NtsWBKzVf1JLzjVDSctBQ7q0QwQyXa3ZwmTQwPhcnT4=; b=PMi+0Mq/V7geTTt1IcI9G6dug5iMQ5q8mkePspiXx90iUx+cqOxpTsUt+lo06bXR/rHiNiVMwWgqU8iYVhCr7VftW69BfefNFfdwQWGnEGBpWacfWwmn8zzgfVlL8b7CkgPLBV/Fql5IVfFA3j1hNJOkCz4W3b5Z7W0YaEIX0Hs= Received: from BN6PR21MB0739.namprd21.prod.outlook.com (2603:10b6:404:93::9) by BN6PR21MB0849.namprd21.prod.outlook.com (2603:10b6:404:9e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.4; Tue, 7 Apr 2020 22:35:22 +0000 Received: from BN6PR21MB0739.namprd21.prod.outlook.com ([fe80::8d95:26f7:2c1e:e80a]) by BN6PR21MB0739.namprd21.prod.outlook.com ([fe80::8d95:26f7:2c1e:e80a%13]) with mapi id 15.20.2921.000; Tue, 7 Apr 2020 22:35:22 +0000 From: "Bret Barkelew" To: "devel@edk2.groups.io" , "michael.kubacki@outlook.com" CC: Kun Qin , Jian J Wang , Jiewen Yao , Chao Zhang Subject: Re: [EXTERNAL] [edk2-devel] [PATCH v1 2/2] SecurityPkg Tcg: Use SW SMI IO port PCD in Tpm.asl Thread-Topic: [EXTERNAL] [edk2-devel] [PATCH v1 2/2] SecurityPkg Tcg: Use SW SMI IO port PCD in Tpm.asl Thread-Index: AQHWDEImrjxTBW+nHkqtvtb6brTcnahuQRpq Date: Tue, 7 Apr 2020 22:35:22 +0000 Message-ID: References: <20200406183422.37140-1-michael.kubacki@outlook.com>, In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-04-07T22:35:15.8834098Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bret.Barkelew@microsoft.com; x-originating-ip: [71.212.145.195] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a181398f-1cbf-48d4-cd34-08d7db43f5bf x-ms-traffictypediagnostic: BN6PR21MB0849:|BN6PR21MB0849: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3173; x-forefront-prvs: 036614DD9C x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR21MB0739.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(4636009)(39860400002)(136003)(396003)(376002)(346002)(366004)(110136005)(10290500003)(8990500004)(52536014)(33656002)(316002)(53546011)(478600001)(71200400001)(5660300002)(966005)(7696005)(186003)(86362001)(19627235002)(6506007)(82950400001)(9686003)(64756008)(15650500001)(55016002)(66476007)(8936002)(76116006)(54906003)(82960400001)(81156014)(81166006)(4326008)(66556008)(91956017)(26005)(66946007)(66446008)(8676002)(2906002);DIR:OUT;SFP:1102; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0mgzEA59z+WoKJGunCV5LGi560EDU9w7Pfzr7yUBupYdYFpPgwfxfBqLYjZiMcCXYjntjUV3/tnRSbA4pIgx2TL4wTS2qdYdRcgQz1lEqlAN2JjwDDZp+HYQCtOW7Ayz4tFg1HE3vYYuzoqaivqISxmT7Mq9X92BgNtYYv63LDCQmS1JNa3Icw1B4BOeEDKBlMa2r4579AQs08ov6dDxcWj79OLUjF4GKy5X+JLCo8WqF2MrAjEZXIAmjs6c8ViseFpMYURir1RrjjffK0/qoev/eI5TvTIYpr+BFCsKrYSWqqqQhpaIgU+k5SDwnv023kcCuVRc9TKWOp0JHuNslkPDcMjYJBmTxJ4+xd9UCjyysben6HRrV5PqnBQL0VDmLixtubCvU/7Baqlm7rIC6imPn3/6TW3IK//SjDIhLd1mBzI9Dfmvau7JLEcC142uhe66hQ29AAOEWuhStxXajoWNsBB3qdTuh1PA/N5uOcEfcQbmJ7bLekV0LaP+tc9J6WLLkmDnupYiIq9UqiHB5g== x-ms-exchange-antispam-messagedata: 0+5VZ4nKKodC9SiIcG9kZO8d7It0sAYI0s+ABWqvrWSEjjNyi/S+aoAycaKYEqNO7n30hS+on7KBd8O83on7YvY0rSz64jpVgLxs6TbqU+XDcHRrNjAsCQ6BHlYwXL6PQEzaV5gXB8Ro+Xj/+D7cQg== MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: a181398f-1cbf-48d4-cd34-08d7db43f5bf X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2020 22:35:22.6804 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VacmUqwUTEJMVOLzksLjRJSWFh+pur8ikxtZuCMnPEgamZsUx+aUFICi9mQGyqC8Bpu7lfNfXrsgJWrJE+mQEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR21MB0849 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BN6PR21MB0739E86217E785E93D98AAA2EFC30BN6PR21MB0739namp_" --_000_BN6PR21MB0739E86217E785E93D98AAA2EFC30BN6PR21MB0739namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bret Barkelew - Bret ________________________________ From: devel@edk2.groups.io on behalf of Michael Kub= acki via groups.io Sent: Monday, April 6, 2020 11:34:22 AM To: devel@edk2.groups.io Cc: Kun Qin ; Jian J Wang ; = Jiewen Yao ; Chao Zhang Subject: [EXTERNAL] [edk2-devel] [PATCH v1 2/2] SecurityPkg Tcg: Use SW SM= I IO port PCD in Tpm.asl From: Michael Kubacki REF:https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbu= gzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2416&data=3D02%7C01%7CBret.B= arkelew%40microsoft.com%7Cf33af41d885e42621c3408d7da59482e%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637217949309605866&sdata=3DThsbHop%2BGLThn= YPKprw1c3DOGgGxKUIaMPVSSxNXGII%3D&reserved=3D0 Replaces the hardcoded value of 0xB2 with a PCD for the SMI port access operation region. This allows platforms to customize the IO port value if necessary. Cc: Kun Qin Cc: Jian J Wang Cc: Jiewen Yao Cc: Chao Zhang Signed-off-by: Michael Kubacki --- SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf | 4 ++++ SecurityPkg/Tcg/Tcg2Smm/Tpm.asl | 18 +++++++++--------- SecurityPkg/Tcg/TcgSmm/TcgSmm.inf | 4 ++++ SecurityPkg/Tcg/TcgSmm/Tpm.asl | 17 +++++++++-------- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf b/SecurityPkg/Tcg/Tcg2Smm= /Tcg2Smm.inf index e33cbcc49152..2ebf2e05f2ea 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf @@ -21,6 +21,7 @@ # This external input must be validated carefully to avoid security issu= e. # # Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -70,6 +71,9 @@ gEfiSmmVariableProtocolGuid ## CONSUM= ES gEfiAcpiTableProtocolGuid ## CONSUM= ES +[FixedPcd] + gEfiSecurityPkgTokenSpaceGuid.PcdSmiCommandIoPort ## CONSUM= ES + [Pcd] gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid ## CONSUM= ES gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId ## SOMETI= MES_CONSUMES diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl b/SecurityPkg/Tcg/Tcg2Smm/Tpm= .asl index 7a91708a1a34..95f9d7eae841 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl +++ b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl @@ -4,7 +4,7 @@ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
(c)Copyright 2016 HP Development Company, L.P.
-Copyright (c) 2017, Microsoft Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -41,10 +41,10 @@ DefinitionBlock ( // // Operational region for Smi port access // - OperationRegion (SMIP, SystemIO, 0xB2, 1) + OperationRegion (SMIP, SystemIO, FixedPcdGet16 (PcdSmiCommandIoPort= ), 1) Field (SMIP, ByteAcc, NoLock, Preserve) { - IOB2, 8 + IOPN, 8 } // @@ -258,7 +258,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (MCIN, IOB2) + Store (MCIN, IOPN) } } Return (0) @@ -359,7 +359,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (PPIN, IOB2) + Store (PPIN, IOPN) Return (FRET) @@ -390,7 +390,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (PPIN, IOB2) + Store (PPIN, IOPN) Store (LPPR, Index (TPM3, 0x01)) Store (PPRP, Index (TPM3, 0x02)) @@ -422,7 +422,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (PPIN, IOB2) + Store (PPIN, IOPN) Return (FRET) } Case (8) @@ -436,7 +436,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (PPIN, IOB2) + Store (PPIN, IOPN) Return (FRET) } @@ -475,7 +475,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (MCIN, IOB2) + Store (MCIN, IOPN) Return (MRET) } Default {BreakPoint} diff --git a/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf b/SecurityPkg/Tcg/TcgSmm/Tc= gSmm.inf index 29f9c15b0e02..9fac896dde8b 100644 --- a/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf +++ b/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf @@ -10,6 +10,7 @@ # This external input must be validated carefully to avoid security issu= e. # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -63,6 +64,9 @@ gEfiSmmVariableProtocolGuid ## CONSUMES gEfiAcpiTableProtocolGuid ## CONSUMES +[FixedPcd] + gEfiSecurityPkgTokenSpaceGuid.PcdSmiCommandIoPort ## CONSUMES + [Pcd] gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId ## SOMETIMES_CONS= UMES diff --git a/SecurityPkg/Tcg/TcgSmm/Tpm.asl b/SecurityPkg/Tcg/TcgSmm/Tpm.a= sl index 739067dbec03..9d5e6ddc110b 100644 --- a/SecurityPkg/Tcg/TcgSmm/Tpm.asl +++ b/SecurityPkg/Tcg/TcgSmm/Tpm.asl @@ -3,6 +3,7 @@ and MemoryClear. Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -41,10 +42,10 @@ DefinitionBlock ( // // Operational region for Smi port access // - OperationRegion (SMIP, SystemIO, 0xB2, 1) + OperationRegion (SMIP, SystemIO, FixedPcdGet16 (PcdSmiCommandIoPort= ), 1) Field (SMIP, ByteAcc, NoLock, Preserve) { - IOB2, 8 + IOPN, 8 } // @@ -96,7 +97,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (MCIN, IOB2) + Store (MCIN, IOPN) } } Return (0) @@ -196,7 +197,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (PPIN, IOB2) + Store (PPIN, IOPN) Return (FRET) @@ -227,7 +228,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (PPIN, IOB2) + Store (PPIN, IOPN) Store (LPPR, Index (TPM3, 0x01)) Store (PPRP, Index (TPM3, 0x02)) @@ -255,7 +256,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (PPIN, IOB2) + Store (PPIN, IOPN) Return (FRET) } Case (8) @@ -269,7 +270,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (PPIN, IOB2) + Store (PPIN, IOPN) Return (FRET) } @@ -308,7 +309,7 @@ DefinitionBlock ( // // Trigger the SMI interrupt // - Store (MCIN, IOB2) + Store (MCIN, IOPN) Return (MRET) } Default {BreakPoint} -- 2.16.3.windows.1 --_000_BN6PR21MB0739E86217E785E93D98AAA2EFC30BN6PR21MB0739namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Reviewed-by: Bret Barkelew <bret.barkelew@micros= oft.com>

 

- Bret

 


From: devel@edk2.groups.io= <devel@edk2.groups.io> on behalf of Michael Kubacki via groups.io &l= t;michael.kubacki=3Doutlook.com@groups.io>
Sent: Monday, April 6, 2020 11:34:22 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Kun Qin <Kun.Qin@microsoft.com>; Jian J Wang <jian.j.w= ang@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Chao Zhang <= chao.b.zhang@intel.com>
Subject: [EXTERNAL] [edk2-devel] [PATCH v1 2/2] SecurityPkg Tcg: Us= e SW SMI IO port PCD in Tpm.asl
 
From: Michael Kubacki <michael.kubacki@microso= ft.com>

REF:https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbu= gzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2416&amp;data=3D02%7C01%7CBr= et.Barkelew%40microsoft.com%7Cf33af41d885e42621c3408d7da59482e%7C72f988bf86= f141af91ab2d7cd011db47%7C1%7C0%7C637217949309605866&amp;sdata=3DThsbHop= %2BGLThnYPKprw1c3DOGgGxKUIaMPVSSxNXGII%3D&amp;reserved=3D0

Replaces the hardcoded value of 0xB2 with a PCD for the SMI port access operation region. This allows platforms to customize the IO port value if<= br> necessary.

Cc: Kun Qin <Kun.Qin@microsoft.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---
 SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf |  4 ++++  SecurityPkg/Tcg/Tcg2Smm/Tpm.asl     | 18 +&#= 43;+++++++---------
 SecurityPkg/Tcg/TcgSmm/TcgSmm.inf   |  4 ++&#= 43;+
 SecurityPkg/Tcg/TcgSmm/Tpm.asl      | 17 &#= 43;++++++++--------
 4 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf b/SecurityPkg/Tcg/Tcg2Smm= /Tcg2Smm.inf
index e33cbcc49152..2ebf2e05f2ea 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
@@ -21,6 +21,7 @@
 #  This external input must be validated carefully to avoid sec= urity issue.
 #
 # Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.= <BR>
+# Copyright (c) Microsoft Corporation.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -70,6 +71,9 @@
   gEfiSmmVariableProtocolGuid     &nbs= p;            &= nbsp;           &nbs= p;    ## CONSUMES
   gEfiAcpiTableProtocolGuid      =             &nb= sp;            =       ## CONSUMES
 
+[FixedPcd]
+  gEfiSecurityPkgTokenSpaceGuid.PcdSmiCommandIoPort  &= nbsp;          ## CONSUMES
+
 [Pcd]
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid  &= nbsp;           ## CONSUM= ES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId  = ;          ## SOMETIMES_CONSUM= ES
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl b/SecurityPkg/Tcg/Tcg2Smm/Tpm= .asl
index 7a91708a1a34..95f9d7eae841 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
@@ -4,7 +4,7 @@
 
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.&l= t;BR>
 (c)Copyright 2016 HP Development Company, L.P.<BR>
-Copyright (c) 2017, Microsoft Corporation.  All rights reserved. <= ;BR>
+Copyright (c) Microsoft Corporation.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -41,10 +41,10 @@ DefinitionBlock (
       //
       // Operational region for Smi port ac= cess
       //
-      OperationRegion (SMIP, SystemIO, 0xB2, 1)<= br> +      OperationRegion (SMIP, SystemIO, Fixed= PcdGet16 (PcdSmiCommandIoPort), 1)
       Field (SMIP, ByteAcc, NoLock, Preserv= e)
       {
-          IOB2, 8
+          IOPN, 8
       }
 
       //
@@ -258,7 +258,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (MCIN, IOB2)
+            St= ore (MCIN, IOPN)
           }
         }
         Return (0)
@@ -359,7 +359,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (PPIN, IOB2)
+            St= ore (PPIN, IOPN)
             R= eturn (FRET)
 
 
@@ -390,7 +390,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (PPIN, IOB2)
+            St= ore (PPIN, IOPN)
 
             S= tore (LPPR, Index (TPM3, 0x01))
             S= tore (PPRP, Index (TPM3, 0x02))
@@ -422,7 +422,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (PPIN, IOB2)
+            St= ore (PPIN, IOPN)
             R= eturn (FRET)
           }
           Case (8)
@@ -436,7 +436,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (PPIN, IOB2)
+            St= ore (PPIN, IOPN)
 
             R= eturn (FRET)
           }
@@ -475,7 +475,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (MCIN, IOB2)
+            St= ore (MCIN, IOPN)
             R= eturn (MRET)
           }
           Default {Brea= kPoint}
diff --git a/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf b/SecurityPkg/Tcg/TcgSmm/Tc= gSmm.inf
index 29f9c15b0e02..9fac896dde8b 100644
--- a/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
+++ b/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf
@@ -10,6 +10,7 @@
 #  This external input must be validated carefully to avoid sec= urity issue.
 #
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.= <BR>
+# Copyright (c) Microsoft Corporation.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -63,6 +64,9 @@
   gEfiSmmVariableProtocolGuid     &nbs= p;            &= nbsp;        ## CONSUMES
   gEfiAcpiTableProtocolGuid      =             &nb= sp;          ## CONSUMES
 
+[FixedPcd]
+  gEfiSecurityPkgTokenSpaceGuid.PcdSmiCommandIoPort  &= nbsp;  ## CONSUMES
+
 [Pcd]
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid  &= nbsp;   ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId  = ;  ## SOMETIMES_CONSUMES
diff --git a/SecurityPkg/Tcg/TcgSmm/Tpm.asl b/SecurityPkg/Tcg/TcgSmm/Tpm.a= sl
index 739067dbec03..9d5e6ddc110b 100644
--- a/SecurityPkg/Tcg/TcgSmm/Tpm.asl
+++ b/SecurityPkg/Tcg/TcgSmm/Tpm.asl
@@ -3,6 +3,7 @@
   and MemoryClear.
 
 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.&l= t;BR>
+Copyright (c) Microsoft Corporation.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -41,10 +42,10 @@ DefinitionBlock (
       //
       // Operational region for Smi port ac= cess
       //
-      OperationRegion (SMIP, SystemIO, 0xB2, 1)<= br> +      OperationRegion (SMIP, SystemIO, Fixed= PcdGet16 (PcdSmiCommandIoPort), 1)
       Field (SMIP, ByteAcc, NoLock, Preserv= e)
       {
-          IOB2, 8
+          IOPN, 8
       }
 
       //
@@ -96,7 +97,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (MCIN, IOB2)
+            St= ore (MCIN, IOPN)
           }
         }
         Return (0)
@@ -196,7 +197,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (PPIN, IOB2)
+            St= ore (PPIN, IOPN)
             R= eturn (FRET)
 
 
@@ -227,7 +228,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (PPIN, IOB2)
+            St= ore (PPIN, IOPN)
 
             S= tore (LPPR, Index (TPM3, 0x01))
             S= tore (PPRP, Index (TPM3, 0x02))
@@ -255,7 +256,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (PPIN, IOB2)
+            St= ore (PPIN, IOPN)
             R= eturn (FRET)
           }
           Case (8)
@@ -269,7 +270,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (PPIN, IOB2)
+            St= ore (PPIN, IOPN)
 
             R= eturn (FRET)
           }
@@ -308,7 +309,7 @@ DefinitionBlock (
             /= /
             /= / Trigger the SMI interrupt
             /= /
-            Store = (MCIN, IOB2)
+            St= ore (MCIN, IOPN)
             R= eturn (MRET)
           }
           Default {Brea= kPoint}
--
2.16.3.windows.1




--_000_BN6PR21MB0739E86217E785E93D98AAA2EFC30BN6PR21MB0739namp_--