From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web09.3729.1578020675360032184 for ; Thu, 02 Jan 2020 19:04:35 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: zhichao.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False 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:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,389,1571727600"; d="scan'208";a="252455050" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga002.fm.intel.com with ESMTP; 02 Jan 2020 19:04:33 -0800 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Chao Zhang , Jordan Justen , Laszlo Ersek , Ard Biesheuvel , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Berger Subject: [PATCH 00/13] Extend and fix the TCG/TCG2 Physical Presence Interface Date: Fri, 3 Jan 2020 11:04:14 +0800 Message-Id: <20200103030428.28176-1-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2443 1. Add two interfaces Tcg2PpVendorLibExecutePendingRequestEx and Tcg2PpVendorLibSubmitRequestToPreOSFunctionEx to Tcg2PpVendorLib. It has one more parameter PPData (type EFI_TCG2_PHYSICAL_PRESENCE) to transfer more data. 2. Use the Ex version instead of original one in Tcg2PhysicalPresenceLib 3. Add a pcd PcdPhysicalPresenceUserConfirmTimeout to control the user confirm input key timeout. 4. Add FunctionIndex to structure type EFI_TCG2_PHYSICAL_PRESENCE to transfer mTcgNvs->PhysicalPresence.Parameter data. 5. Add parameter FunctionIndex to Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx to initialize the PPdata. 6. Move Tcg2ConfigNvData.h from SecurityPkg/Tcg/Tcg2Config to SecurityPkg/Include. It is useful for platform code to implement their own Tcg2PhysicalPresenceLib. 7. Replace the ASSERT with error code return in TpmPhysicalPresenceLib 8. Fix one operation (PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE) flow of TcgPhysicalPresenceLib (refer to Physical Presence Interface Spec Page 37). Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Marc-André Lureau Cc: Stefan Berger Signed-off-by: Zhichao Gao Zhichao Gao (13): SecurityPkg/Tcg2PpVerndorLib: Add two Ex function to handle PPdata SecurityPkg/Tcg2PpVendorLib: Add implementation of new Ex function SecurityPkg/Tcg2PhysicalPresenceLib: Use the new Ex function SecurityPkg/SmmTcg2PhysicalPresenceLib: Use the new Ex function SecurityPkg/dec: Add a pcd for user response wait time OvmfPkg/Tcg2PhysicalPresenceLib: Use pcd for user response wait time SecurityPkg/Tcg2PhysicalPresenceLib: Use Pcd for user resp wait time SecurityPkg/TcgPyhsicalPresenceLib: Use Pcd for user resp wait time SecurityPkg/Tcg2PhysicalPresenceData.h: Add FunctionIndex for PPdata SecurityPkg/Tcg2PhysicalPresenceLib: Extend the submit preOS func SecurityPkg: Move the Tcg2ConfigNvData.h to Include folder SecurityPkg/TcgPhysicalPresenceLib: Replace the ASSERT with error code SecurityPkg/TcgPhysicalPresenceLib: Fix the operation of 11 .../DxeTcg2PhysicalPresenceLib.c | 63 +++++++--- .../DxeTcg2PhysicalPresenceLib.inf | 6 +- .../Include/Guid/Tcg2PhysicalPresenceData.h | 3 +- .../Include/Library/Tcg2PhysicalPresenceLib.h | 4 +- SecurityPkg/Include/Library/Tcg2PpVendorLib.h | 54 ++++++++- .../Tcg2Config => Include}/Tcg2ConfigNvData.h | 2 +- .../DxeTcg2PhysicalPresenceLib.c | 68 ++++++++--- .../DxeTcg2PhysicalPresenceLib.inf | 4 +- .../DxeTcgPhysicalPresenceLib.c | 110 ++++++++++++------ .../DxeTcgPhysicalPresenceLib.inf | 6 +- .../SmmTcg2PhysicalPresenceLib.c | 15 ++- .../Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c | 61 +++++++++- SecurityPkg/SecurityPkg.dec | 7 +- SecurityPkg/SecurityPkg.uni | 7 +- SecurityPkg/Tcg/Tcg2Config/Tcg2Config.vfr | 4 +- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf | 3 +- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.h | 4 +- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 3 +- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 4 +- SecurityPkg/Tcg/Tcg2Config/TpmDetection.c | 4 +- SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 10 +- 21 files changed, 347 insertions(+), 95 deletions(-) rename SecurityPkg/{Tcg/Tcg2Config => Include}/Tcg2ConfigNvData.h (94%) -- 2.21.0.windows.1