From nobody Tue Feb 10 01:33:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+52720+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52720+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1578020689; cv=none; d=zohomail.com; s=zohoarc; b=gFdf1xuTW5wzKgN7fBiWeWnGTHH59AJivojOF/ofAjQ5ISmoWv6TG0wZVNAJBAl4iFUAG7L8Dv76ETQELb43BhyZREpo18u/L9ZlcvFY1BfBCX2yLwsBvCYsPuq0s4RgiPXtPWTnRKbz4vAPAZH3DvA7kdTkTChL15DxvspYtko= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578020689; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=iyCNwC+Jeqifc/f2UYDn9NPwGy/l2sU9srwQ+vsyXIs=; b=jyoZi8hl1gw0uwFAjk4K2ZI17rRfRMIqfePo/0XvW3FZfl4MslrMUO8Y+gntNn9zG3ZyySdhiypNQE+eEAgcpljUI4++dtZvwmngLLEKOE/9lUt8v0k4HxqexhbglE39aQ4+dttFk2M0Wr0cPyWAd1PXk5SjgKoIbncvgGuUSnE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52720+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1578020689678402.3423389523082; Thu, 2 Jan 2020 19:04:49 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id CDUeYY1788612xAF9uuMciJs; Thu, 02 Jan 2020 19:04:49 -0800 X-Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web09.3729.1578020675360032184 for ; Thu, 02 Jan 2020 19:04:48 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 19:04:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,389,1571727600"; d="scan'208";a="252455239" X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga002.fm.intel.com with ESMTP; 02 Jan 2020 19:04:47 -0800 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Chao Zhang Subject: [edk2-devel] [PATCH 13/13] SecurityPkg/TcgPhysicalPresenceLib: Fix the operation of 11 Date: Fri, 3 Jan 2020 11:04:27 +0800 Message-Id: <20200103030428.28176-14-zhichao.gao@intel.com> In-Reply-To: <20200103030428.28176-1-zhichao.gao@intel.com> References: <20200103030428.28176-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,zhichao.gao@intel.com X-Gm-Message-State: 26wfkqhgGfszY3A2ZbBSiFLFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1578020689; bh=z1yZjniWXYf66BmfDnEtIbQesAY/4DMt/+My3NoWWhY=; h=Cc:Date:From:Reply-To:Subject:To; b=Pwtit56QluqPGp3J3l0U8oc5KLBUtliRNvMx3TTGVYGas7U8h8P4EaD0ROtGL60xEEC bzPjiDyuZJTgRYhcc/9pPRddu6q1DTlzf5itCbTNgHWXC2TurscNqLJ+GOYhUfKe4tzBz S2X+Hjp8Tz2VT+3yY3UlsDvPJCqAdcMFDCk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2443 Refer to Physical Presence Interface Spec Page 37, the firmware may perform the PLATFORM RESET imediately after the TPM_PhysicalSetDeactivated =3D TRUE but that requires tracking the next command. Change the operation to match the spec. Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Signed-off-by: Zhichao Gao --- .../DxeTcgPhysicalPresenceLib.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPr= esenceLib.c b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalP= resenceLib.c index 7fb2ef9735..de339c9703 100644 --- a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceL= ib.c +++ b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceL= ib.c @@ -346,9 +346,16 @@ ExecutePhysicalPresence ( return TpmResponse; =20 case PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE: - TpmResponse =3D ExecutePhysicalPresence (TcgProtocol, PHYSICAL_PRESE= NCE_SET_OWNER_INSTALL_FALSE, PpiFlags); - if (TpmResponse =3D=3D 0) { + // + // PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE + PHYSICAL_PRESENCE_DEA= CTIVATE_DISABLE + // PHYSICAL_PRESENCE_DEACTIVATE_DISABLE will be executed after reboot + // + if ((PpiFlags->PPFlags & TCG_VENDOR_LIB_FLAG_RESET_TRACK) =3D=3D 0) { + TpmResponse =3D ExecutePhysicalPresence (TcgProtocol, PHYSICAL_PRE= SENCE_SET_OWNER_INSTALL_FALSE, PpiFlags); + PpiFlags->PPFlags |=3D TCG_VENDOR_LIB_FLAG_RESET_TRACK; + } else { TpmResponse =3D ExecutePhysicalPresence (TcgProtocol, PHYSICAL_PRE= SENCE_DEACTIVATE_DISABLE, PpiFlags); + PpiFlags->PPFlags &=3D ~TCG_VENDOR_LIB_FLAG_RESET_TRACK; } return TpmResponse; =20 --=20 2.21.0.windows.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 (#52720): https://edk2.groups.io/g/devel/message/52720 Mute This Topic: https://groups.io/mt/69392343/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-