From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.158.5]) by mx.groups.io with SMTP id smtpd.web10.1613.1635868155292346816 for ; Tue, 02 Nov 2021 08:49:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ibm.com header.s=pp1 header.b=hFjVAMl7; spf=pass (domain: linux.ibm.com, ip: 148.163.158.5, mailfrom: stefanb@linux.ibm.com) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1A2FVfDg016894 for ; Tue, 2 Nov 2021 15:49:14 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=65+z7BrD5B66+PLqT/my762y5BRUO+mhqxAQxwmETLg=; b=hFjVAMl7kyc9sc0UuT4rliRYrIQw4S4LPbD1tYOhI+QGEhlrJQCndVVgXQWGa5kQdAB0 iYgd1rRqtzOjBWcdBmEaZQLfhZC9AR9gWxphIlbgXzvdOAmsb1YtNBYp5B7J5s6CsM7K GcZgW2gYtEgA6ziOq8FDnTbpEbcFs3VijHgTn6YFuLB5qg6YsjdZ2cnKfhZFynsdCmUt cWbCRxh7yBtY500qPWTTHHXoog+cMok0OHAg9ZVz4nDmFRpT0iCC+X/ELrFypRYSzMCv oBolfYvc2UhvXiPs4BFVxkoCKPc8CHiD5GIjA8naxopdLXGBuKckzDh5P8nAd0yJlmTV GA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3c381ygepg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 02 Nov 2021 15:49:13 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1A2FVsIe017165 for ; Tue, 2 Nov 2021 15:49:13 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com with ESMTP id 3c381ygep9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Nov 2021 15:49:13 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1A2Fds0N006537; Tue, 2 Nov 2021 15:49:12 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma01dal.us.ibm.com with ESMTP id 3c0wpc3vm1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Nov 2021 15:49:12 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1A2FnBbw11731524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Nov 2021 15:49:11 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 687D2B2078; Tue, 2 Nov 2021 15:49:11 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B239B206A; Tue, 2 Nov 2021 15:49:11 +0000 (GMT) Received: from sbct-2.pok.ibm.com (unknown [9.47.158.152]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 2 Nov 2021 15:49:11 +0000 (GMT) From: "Stefan Berger" To: devel@edk2.groups.io, kraxel@redhat.com, marcandre.lureau@redhat.com Cc: Stefan Berger Subject: [PATCH v2 0/4] Add support for TPM 1.2 Physical Presence Interface and Menu Date: Tue, 2 Nov 2021 11:49:06 -0400 Message-Id: <20211102154910.2715495-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: grSJZU-VmrEBSLo9F10rkZPk1iB6A-zX X-Proofpoint-ORIG-GUID: fw_LwkpLg9SKxsFpsiSilqlIkm7P1dbG 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-11-02_08,2021-11-02_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=890 bulkscore=0 phishscore=0 mlxscore=0 priorityscore=1501 suspectscore=0 spamscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111020091 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 v2: - Added patch that copies sources from SecurityPkg to OvmfPkg before changes - Use CONSTRUCTOR from DxeTcgPhysicalPresenceLib.inf - Other nits Gerd Hoffmann (1): OvmfPkg: add TPM 1.2 config menu Stefan Berger (3): SecurityPkg: Store physical presence code by submitting to PreOS func OvmfPkg: Copy TPM 1.2 DxeTcgPhysicalPresenceLib.c from SecuityPkg OvmfPkg: Enable physical presence interface for TPM 1.2 .../PlatformBootManagerLib/BdsPlatform.c | 2 + .../PlatformBootManagerLib.inf | 1 + .../DxeTcgPhysicalPresenceLib.c | 22 + .../DxeTcgPhysicalPresenceLib.inf | 27 + .../DxeTcgPhysicalPresenceLib.c | 1469 +++++++++++++++++ .../DxeTcgPhysicalPresenceLib.inf | 64 + .../DxeTcgPhysicalPresenceLib.uni | 22 + .../PhysicalPresenceStrings.uni | 46 + 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 +- 15 files changed, 1769 insertions(+), 26 deletions(-) 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/DxeTcgPhysicalPresenceLib.uni create mode 100644 OvmfPkg/Library/TcgPhysicalPresenceLibQemu/PhysicalPresenceStrings.uni -- 2.31.1