From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by mx.groups.io with SMTP id smtpd.web12.470.1635269950760928639 for ; Tue, 26 Oct 2021 10:39:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ibm.com header.s=pp1 header.b=D9v6EwFB; spf=pass (domain: linux.ibm.com, ip: 148.163.156.1, mailfrom: stefanb@linux.ibm.com) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19QHd6T5020002 for ; Tue, 26 Oct 2021 17:39:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=pp1; bh=p5L3gqda8vXTPG8gNanfE4EgMsC3mHOjko8DKRQsRrA=; b=D9v6EwFBlSEv35qxNjPtKVzxvgPbGQ9u2gWc8GP1tQ8a2A6QtTj5dnUjcuKPNcFgjlyE PAMgTEn1sg75yCdaIbsQBIg43JJClNuoegzm9EUyHZs0F1PkTWVODfoFKuRyvLiFfLLh LnzGZmBymK1JwqYpQsbBGcfZNBSjvNU3mmqwlN23h9Y11AsX7EqIIwidLiTlsmJ7sF12 7DoN1Yw7xQvgssZIVQFvJPJtW5IXRyzFo0nq8Ng9ZR6dLY1byXtJuZeq+Zr1baQv09C4 NNkDyvCmQWDwRVx8PSt7Rru8I8Z4PWPbyFp+yGjtlVtplR22n86nvwKsfC7c9NMfYU65 HA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4k28rvu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 26 Oct 2021 17:39:09 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19QFx9bC018774 for ; Tue, 26 Oct 2021 17:39:09 GMT Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4k28rve-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 17:39:09 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19QHbbe5021216; Tue, 26 Oct 2021 17:39:07 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma02wdc.us.ibm.com with ESMTP id 3bx4edhh99-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 17:39:07 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19QHd7nI40763812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Oct 2021 17:39:07 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA8F26E060; Tue, 26 Oct 2021 17:39:06 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B85F6E054; Tue, 26 Oct 2021 17:39:06 +0000 (GMT) Received: from sbct-2.pok.ibm.com (unknown [9.47.158.152]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 26 Oct 2021 17:39:06 +0000 (GMT) From: "Stefan Berger" To: devel@edk2.groups.io, kraxel@redhat.com, marcandre.lureau@redhat.com Cc: Stefan Berger Subject: [PATCH 0/4] Add support for TPM 1.2 Physical Presence Interface and Menu Date: Tue, 26 Oct 2021 13:38:56 -0400 Message-Id: <20211026173900.1695306-1-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: SOg1Azob5_fCnopZwrJ3Yx9iHviCLBuh X-Proofpoint-ORIG-GUID: SAPP2BlAULnt7GZiW41b-kXkaleK20ox X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-26_05,2021-10-26_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 priorityscore=1501 phishscore=0 bulkscore=0 adultscore=0 impostorscore=0 mlxlogscore=760 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2110260096 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This series adds support for the full TPM 1.2 Physical Presence Interface (PPI) and activates the TPM 1.2 menu at the end. PPI is a prerequisite for the menu to work. The modifications to the original code are mostly due to the fact that we are using a memory region for PPI in QEMU. I tried to keep them at a minimum. For the PPI Flags I am using a EFI variable just like the original code does. (SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c) Regards, Stefan Gerd Hoffmann (1): OvmfPkg: add TPM 1.2 config menu Stefan Berger (3): OvmfPkg: Check for TPM 2 early to leave function early SecurityPkg: Store physical presence code by submitting to PreOS func OvmfPkg: Enable physical presence interface for TPM 1.2 OvmfPkg/Include/Library/QemuPPI.h | 33 + .../PlatformBootManagerLib/BdsPlatform.c | 2 + .../PlatformBootManagerLib.inf | 1 + .../DxeTcg2PhysicalPresenceLib.c | 36 +- .../DxeTcgPhysicalPresenceLib.c | 22 + .../DxeTcgPhysicalPresenceLib.inf | 27 + .../DxeTcgPhysicalPresenceLib.c | 1452 +++++++++++++++++ .../DxeTcgPhysicalPresenceLib.inf | 64 + .../PhysicalPresenceStrings.uni | 46 + OvmfPkg/OvmfPkg.dec | 3 + OvmfPkg/OvmfTpmComponentsDxe.dsc.inc | 1 + OvmfPkg/OvmfTpmDxe.fdf.inc | 1 + OvmfPkg/OvmfTpmLibs.dsc.inc | 4 + .../Include/Library/TcgPhysicalPresenceLib.h | 39 + .../DxeTcgPhysicalPresenceLib.c | 55 + SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf | 1 + SecurityPkg/Tcg/TcgConfigDxe/TcgConfigImpl.c | 41 +- 17 files changed, 1785 insertions(+), 43 deletions(-) create mode 100644 OvmfPkg/Include/Library/QemuPPI.h create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibNull/DxeTcgPhysicalPresenceLib.c create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibNull/DxeTcgPhysicalPresenceLib.inf create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibQemu/DxeTcgPhysicalPresenceLib.c create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibQemu/DxeTcgPhysicalPresenceLib.inf create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibQemu/PhysicalPresenceStrings.uni -- 2.31.1