<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">- Bret</p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Michael Kubacki via groups.io <michael.kubacki=outlook.com@groups.io><br>
<b>Sent:</b> Monday, April 6, 2020 11:34:22 AM<br>
<b>To:</b> devel@edk2.groups.io <devel@edk2.groups.io><br>
<b>Cc:</b> Kun Qin <Kun.Qin@microsoft.com>; Jian J Wang <jian.j.wang@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com><br>
<b>Subject:</b> [EXTERNAL] [edk2-devel] [PATCH v1 2/2] SecurityPkg Tcg: Use SW SMI IO port PCD in Tpm.asl</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: Michael Kubacki <michael.kubacki@microsoft.com><br>
<br>
REF:https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2416&data=02%7C01%7CBret.Barkelew%40microsoft.com%7Cf33af41d885e42621c3408d7da59482e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637217949309605866&sdata=ThsbHop%2BGLThnYPKprw1c3DOGgGxKUIaMPVSSxNXGII%3D&reserved=0<br>
<br>
Replaces the hardcoded value of 0xB2 with a PCD for the SMI port access<br>
operation region. This allows platforms to customize the IO port value if<br>
necessary.<br>
<br>
Cc: Kun Qin <Kun.Qin@microsoft.com><br>
Cc: Jian J Wang <jian.j.wang@intel.com><br>
Cc: Jiewen Yao <jiewen.yao@intel.com><br>
Cc: Chao Zhang <chao.b.zhang@intel.com><br>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com><br>
---<br>
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf | 4 ++++<br>
SecurityPkg/Tcg/Tcg2Smm/Tpm.asl | 18 +++++++++---------<br>
SecurityPkg/Tcg/TcgSmm/TcgSmm.inf | 4 ++++<br>
SecurityPkg/Tcg/TcgSmm/Tpm.asl | 17 +++++++++--------<br>
4 files changed, 26 insertions(+), 17 deletions(-)<br>
<br>
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf<br>
index e33cbcc49152..2ebf2e05f2ea 100644<br>
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf<br>
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf<br>
@@ -21,6 +21,7 @@<br>
# This external input must be validated carefully to avoid security issue.<br>
#<br>
# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR><br>
+# Copyright (c) Microsoft Corporation.<BR><br>
# SPDX-License-Identifier: BSD-2-Clause-Patent<br>
#<br>
##<br>
@@ -70,6 +71,9 @@<br>
gEfiSmmVariableProtocolGuid ## CONSUMES<br>
gEfiAcpiTableProtocolGuid ## CONSUMES<br>
<br>
+[FixedPcd]<br>
+ gEfiSecurityPkgTokenSpaceGuid.PcdSmiCommandIoPort ## CONSUMES<br>
+<br>
[Pcd]<br>
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid ## CONSUMES<br>
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId ## SOMETIMES_CONSUMES<br>
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl<br>
index 7a91708a1a34..95f9d7eae841 100644<br>
--- a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl<br>
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl<br>
@@ -4,7 +4,7 @@<br>
<br>
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR><br>
(c)Copyright 2016 HP Development Company, L.P.<BR><br>
-Copyright (c) 2017, Microsoft Corporation. All rights reserved. <BR><br>
+Copyright (c) Microsoft Corporation.<BR><br>
SPDX-License-Identifier: BSD-2-Clause-Patent<br>
<br>
**/<br>
@@ -41,10 +41,10 @@ DefinitionBlock (<br>
//<br>
// Operational region for Smi port access<br>
//<br>
- OperationRegion (SMIP, SystemIO, 0xB2, 1)<br>
+ OperationRegion (SMIP, SystemIO, FixedPcdGet16 (PcdSmiCommandIoPort), 1)<br>
Field (SMIP, ByteAcc, NoLock, Preserve)<br>
{<br>
- IOB2, 8<br>
+ IOPN, 8<br>
}<br>
<br>
//<br>
@@ -258,7 +258,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (MCIN, IOB2)<br>
+ Store (MCIN, IOPN)<br>
}<br>
}<br>
Return (0)<br>
@@ -359,7 +359,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (PPIN, IOB2)<br>
+ Store (PPIN, IOPN)<br>
Return (FRET)<br>
<br>
<br>
@@ -390,7 +390,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (PPIN, IOB2)<br>
+ Store (PPIN, IOPN)<br>
<br>
Store (LPPR, Index (TPM3, 0x01))<br>
Store (PPRP, Index (TPM3, 0x02))<br>
@@ -422,7 +422,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (PPIN, IOB2)<br>
+ Store (PPIN, IOPN)<br>
Return (FRET)<br>
}<br>
Case (8)<br>
@@ -436,7 +436,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (PPIN, IOB2)<br>
+ Store (PPIN, IOPN)<br>
<br>
Return (FRET)<br>
}<br>
@@ -475,7 +475,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (MCIN, IOB2)<br>
+ Store (MCIN, IOPN)<br>
Return (MRET)<br>
}<br>
Default {BreakPoint}<br>
diff --git a/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf b/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf<br>
index 29f9c15b0e02..9fac896dde8b 100644<br>
--- a/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf<br>
+++ b/SecurityPkg/Tcg/TcgSmm/TcgSmm.inf<br>
@@ -10,6 +10,7 @@<br>
# This external input must be validated carefully to avoid security issue.<br>
#<br>
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR><br>
+# Copyright (c) Microsoft Corporation.<BR><br>
# SPDX-License-Identifier: BSD-2-Clause-Patent<br>
#<br>
##<br>
@@ -63,6 +64,9 @@<br>
gEfiSmmVariableProtocolGuid ## CONSUMES<br>
gEfiAcpiTableProtocolGuid ## CONSUMES<br>
<br>
+[FixedPcd]<br>
+ gEfiSecurityPkgTokenSpaceGuid.PcdSmiCommandIoPort ## CONSUMES<br>
+<br>
[Pcd]<br>
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid ## CONSUMES<br>
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId ## SOMETIMES_CONSUMES<br>
diff --git a/SecurityPkg/Tcg/TcgSmm/Tpm.asl b/SecurityPkg/Tcg/TcgSmm/Tpm.asl<br>
index 739067dbec03..9d5e6ddc110b 100644<br>
--- a/SecurityPkg/Tcg/TcgSmm/Tpm.asl<br>
+++ b/SecurityPkg/Tcg/TcgSmm/Tpm.asl<br>
@@ -3,6 +3,7 @@<br>
and MemoryClear.<br>
<br>
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR><br>
+Copyright (c) Microsoft Corporation.<BR><br>
SPDX-License-Identifier: BSD-2-Clause-Patent<br>
<br>
**/<br>
@@ -41,10 +42,10 @@ DefinitionBlock (<br>
//<br>
// Operational region for Smi port access<br>
//<br>
- OperationRegion (SMIP, SystemIO, 0xB2, 1)<br>
+ OperationRegion (SMIP, SystemIO, FixedPcdGet16 (PcdSmiCommandIoPort), 1)<br>
Field (SMIP, ByteAcc, NoLock, Preserve)<br>
{<br>
- IOB2, 8<br>
+ IOPN, 8<br>
}<br>
<br>
//<br>
@@ -96,7 +97,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (MCIN, IOB2)<br>
+ Store (MCIN, IOPN)<br>
}<br>
}<br>
Return (0)<br>
@@ -196,7 +197,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (PPIN, IOB2)<br>
+ Store (PPIN, IOPN)<br>
Return (FRET)<br>
<br>
<br>
@@ -227,7 +228,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (PPIN, IOB2)<br>
+ Store (PPIN, IOPN)<br>
<br>
Store (LPPR, Index (TPM3, 0x01))<br>
Store (PPRP, Index (TPM3, 0x02))<br>
@@ -255,7 +256,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (PPIN, IOB2)<br>
+ Store (PPIN, IOPN)<br>
Return (FRET)<br>
}<br>
Case (8)<br>
@@ -269,7 +270,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (PPIN, IOB2)<br>
+ Store (PPIN, IOPN)<br>
<br>
Return (FRET)<br>
}<br>
@@ -308,7 +309,7 @@ DefinitionBlock (<br>
//<br>
// Trigger the SMI interrupt<br>
//<br>
- Store (MCIN, IOB2)<br>
+ Store (MCIN, IOPN)<br>
Return (MRET)<br>
}<br>
Default {BreakPoint}<br>
-- <br>
2.16.3.windows.1<br>
<br>
<br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>
<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>
Groups.io Links:<p>
You receive all messages sent to this group.
<p>
<a target="_blank" href="https://edk2.groups.io/g/devel/message/57039">View/Reply Online (#57039)</a> |
|
<a target="_blank" href="https://groups.io/mt/72862173/1813853">Mute This Topic</a>
| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>
<br>
<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |
<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>
[edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>