From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.10673.1594885481146428030 for ; Thu, 16 Jul 2020 00:44:41 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: qi1.zhang@intel.com) IronPort-SDR: 1S3gGgswpn/tg5iZRhiIGV2QHVNN2fbztw/hmYDlKzU0SwfYvu7mWAEioXQkrLxwc8kotorxoP eetoX8fgePiw== X-IronPort-AV: E=McAfee;i="6000,8403,9683"; a="214071687" X-IronPort-AV: E=Sophos;i="5.75,358,1589266800"; d="scan'208";a="214071687" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2020 00:44:39 -0700 IronPort-SDR: 7vRjpeCGNFWT4ul02Kg9pRIHWunjg6RF1SmNPXhRyCTkzdUmetkSP3ZeQ9sN+xkkxtaQO7qJt9 +BxG0ruInoCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,358,1589266800"; d="scan'208";a="430407232" Received: from shwdesssddpdqi.ccr.corp.intel.com ([10.239.9.10]) by orsmga004.jf.intel.com with ESMTP; 16 Jul 2020 00:44:37 -0700 From: Qi Zhang To: devel@edk2.groups.io Cc: Qi Zhang , Jiewen Yao , Jian J Wang , Chao Zhang , Rahul Kumar , Michael D Kinney , Liming Gao Subject: [PATCH v2 0/7] Add capability to let PEIM extend TcgEvent Date: Thu, 16 Jul 2020 15:44:22 +0800 Message-Id: <20200716074430.9675-1-qi1.zhang@intel.com> X-Mailer: git-send-email 2.26.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2841 Currently, we have TCG/TCG2 protocol and DxeTpmMeasurementLib to let DXE module extend the TCG event. There is more and more use case in PEI phase that a PEIM need extend TCG event, such as BootGuard, FSP, Microcode measurement. Currently, we dont have API to do that so that each module need create TCG/TCG2 event log, which is a burden. This bugzilla requests to add PeiTpmMeasurementLib instance. The implementation includes: 1) A EDKII_TCG_PPI which abstracts the HashLogExtendEvent service. 2) A PeiTpmMeasurementLib instance, so that a PEIM can call this API to add TCG event. Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Cc: Qi Zhang Cc: Rahul Kumar Cc: Michael D Kinney Cc: Liming Gao Jiewen Yao (6): SecurityPkg/TcgPpi: Add TcgPpi header file. SecurityPkg/dec: Add TcgPpi. SecurityPkg/Tcg: Add TcgPpi SecurityPkg/Tcg2: Add TcgPpi SecurityPkg/PeiTpmMeasurementLib: Add PEI instance. SecurityPkg/dsc: Add PeiTpmMeasurementLib. Qi Zhang (1): MdePkg/Tcg2Protocol: define Flag EFI_TCG2_PRE_HASH MdePkg/Include/Protocol/Tcg2Protocol.h | 4 + SecurityPkg/Include/Ppi/Tcg.h | 52 +++++++++ .../PeiTpmMeasurementLib.c | 74 +++++++++++++ .../PeiTpmMeasurementLib.inf | 50 +++++++++ .../PeiTpmMeasurementLib.uni | 17 +++ SecurityPkg/SecurityPkg.dec | 3 + SecurityPkg/SecurityPkg.dsc | 4 +- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 100 +++++++++++++----- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf | 3 +- SecurityPkg/Tcg/TcgPei/TcgPei.c | 61 ++++++++++- SecurityPkg/Tcg/TcgPei/TcgPei.inf | 3 +- 11 files changed, 339 insertions(+), 32 deletions(-) create mode 100644 SecurityPkg/Include/Ppi/Tcg.h create mode 100644 SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.c create mode 100644 SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.inf create mode 100644 SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.uni -- 2.26.2.windows.1