From nobody Mon Feb 9 01:20:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+80679+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+80679+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1631669140; cv=none; d=zohomail.com; s=zohoarc; b=kzaf8Rqof67Y+VIKB1EUhouyVyQBT2krYYVzlWcPIN9QyYDrIB8Mztru1PC7+tzIHn+MwKIx3/Fle7sBv+E/jr8zruruHDrLJYnf279QbuurJoQjWgqDeFfDDhrsJHOT/lnhWk2GxvxtzWviS/u4wxfCegsQad8GaAPvQon/1wo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631669140; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=29SXAX9kE/SqOwOU/JhNHspJE2ZTxeZlTtY0aaMtTCQ=; b=hgIaxPgBlFFMW7jcuImoaFCWOL1DOSQ74B09/QP8mZdguCjG90iaMwPYirQUBMEXZkllt9OjTwuacIHPGb6mT94g5pzH4N9sSrOSAhancQIrtt79hvtarHUEb+/beTZhnzYbe9J1iW3Jg1u4lE0+wjY8K1NfVCOyNk3dgoEupag= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+80679+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1631669140391516.4791045349264; Tue, 14 Sep 2021 18:25:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 1fXfYY1788612xyU2pThtxSv; Tue, 14 Sep 2021 18:25:40 -0700 X-Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.158.5]) by mx.groups.io with SMTP id smtpd.web10.1692.1631669138048562861 for ; Tue, 14 Sep 2021 18:25:38 -0700 X-Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id 18ELpOCx015044; Tue, 14 Sep 2021 21:25:20 -0400 X-Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3b31gqy0eg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Sep 2021 21:25:20 -0400 X-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 18F1KF36030314; Tue, 14 Sep 2021 21:25:19 -0400 X-Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 3b31gqy0e7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Sep 2021 21:25:18 -0400 X-Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 18F17Ruw022089; Wed, 15 Sep 2021 01:25:17 GMT X-Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma05wdc.us.ibm.com with ESMTP id 3b0m3b68f9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Sep 2021 01:25:17 +0000 X-Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 18F1PHR037487092 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Sep 2021 01:25:17 GMT X-Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 27E0F112064; Wed, 15 Sep 2021 01:25:17 +0000 (GMT) X-Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D1FE11206B; Wed, 15 Sep 2021 01:25:17 +0000 (GMT) X-Received: from sbct-2.pok.ibm.com (unknown [9.47.158.152]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 15 Sep 2021 01:25:16 +0000 (GMT) From: "Stefan Berger" To: devel@edk2.groups.io Cc: mhaeuser@posteo.de, spbrogan@outlook.com, marcandre.lureau@redhat.com, kraxel@redhat.com, jiewen.yao@intel.com, rebecca@bsdio.com, grehan@freebsd.org, brijesh.singh@amd.com, erdemaktas@google.com, jejb@linux.ibm.com, min.m.xu@intel.com, thomas.lendacky@amd.com, ardb+tianocore@kernel.org, jordan.l.justen@intel.com, Stefan Berger , Stefan Berger , Jiewen Yao Subject: [edk2-devel] [PATCH v3 1/4] OvmfPkg/TPM PPI: Connect default consoles for user interaction Date: Tue, 14 Sep 2021 21:25:03 -0400 Message-Id: <20210915012506.2619693-2-stefanb@linux.ibm.com> In-Reply-To: <20210915012506.2619693-1-stefanb@linux.ibm.com> References: <20210915012506.2619693-1-stefanb@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: kEuBeOG2W5mfv57ko0zKQWkKULyADjBD X-Proofpoint-ORIG-GUID: RVljySbT91sO6zkQIz8hlZsb5-tqrch0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,stefanb@linux.ibm.com X-Gm-Message-State: zrHVSppKx8efWKfpr5W3OCqpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1631669140; bh=5fdOeOQTJ4hPTx+ifaSoWUE/Atk3gHv9X7BGobycPgc=; h=Cc:Date:From:Reply-To:Subject:To; b=d3UwI6ni4BzMF4++U1qAy7BrjW97RaIUTvxf6reSQvVFVHgEOWKJU2JYoO56qk/WYTB GQuFb7X7nXGtx/mcTkmY2eVJyRP0g9QdYPGzVFBAP1WYIT2WXdJqOJwgrr3flwwirSa+6 VRAgktjtOCFPjChDocI54g/fU4aZtdbw3Ho= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1631669142499100012 Content-Type: text/plain; charset="utf-8" From: Stefan Berger Activate the default console when user interaction is required for the processing of TPM 2 physical presence interface opcodes. Background: TPM 2 physical presence interface (PPI) opcodes need to be handled before the TPM 2 platform hierarchy is disabled. Due to this requirement we will move the function call to handle the PPI opcodes into PlatformBootManagerBeforeConsole() which runs before the initialization of the consoles. However, since for interaction with the user we need the console to be available, activate it now before displaying any message to the user. Cc: Rebecca Cran Cc: Peter Grehan Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Min Xu Cc: Tom Lendacky Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Stefan Berger Reviewed-by: Jiewen Yao --- .../Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPresenceLib.c | 5 +++++ .../DxeTcg2PhysicalPresenceLib.inf | 1 + 2 files changed, 6 insertions(+) diff --git a/OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPre= senceLib.c b/OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPre= senceLib.c index 00d76ba2c2..33a470f6d8 100644 --- a/OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPresenceLi= b.c +++ b/OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPresenceLi= b.c @@ -32,6 +32,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include =20 #include =20 @@ -591,6 +592,10 @@ Tcg2UserConfirm ( return FALSE; } =20 + // Console for user interaction + // We need to connect all trusted consoles for TCG PP. Here we treat all= consoles in OVMF to be trusted consoles. + EfiBootManagerConnectAllDefaultConsoles (); + if (TpmPpCommand < TCG2_PHYSICAL_PRESENCE_STORAGE_MANAGEMENT_BEGIN) { if (CautionKey) { TmpStr1 =3D Tcg2PhysicalPresenceGetStringById (STRING_TOKEN (TPM_CAU= TION_KEY)); diff --git a/OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPre= senceLib.inf b/OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalP= resenceLib.inf index 85ce0e2b29..5b5417c321 100644 --- a/OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPresenceLi= b.inf +++ b/OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPresenceLi= b.inf @@ -59,6 +59,7 @@ PrintLib QemuFwCfgLib Tpm2CommandLib + UefiBootManagerLib UefiBootServicesTableLib UefiLib UefiRuntimeServicesTableLib --=20 2.31.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#80679): https://edk2.groups.io/g/devel/message/80679 Mute This Topic: https://groups.io/mt/85617945/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-