From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web11.14228.1595406080183038905 for ; Wed, 22 Jul 2020 01:21:21 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: qi1.zhang@intel.com) IronPort-SDR: y8oW4AM9c1Tvmmro+Wh4KvKyzWGWNMlwuI6CyrpcOz439Cuzpk/+k6JJ4T/dBCu9/zi25I/fVI wboE1iNmNSfA== X-IronPort-AV: E=McAfee;i="6000,8403,9689"; a="129857634" X-IronPort-AV: E=Sophos;i="5.75,381,1589266800"; d="scan'208";a="129857634" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2020 01:21:20 -0700 IronPort-SDR: fa2Gi48JuW4/kPW5sq6pvh+9devsB5p63UDXDh+DjjskTGziviPCoTSGzW+QBJT6XwAUV4OA9m EfDAqSkf8xNg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,381,1589266800"; d="scan'208";a="288209214" Received: from shwdesssddpdqi.ccr.corp.intel.com ([10.239.9.10]) by orsmga006.jf.intel.com with ESMTP; 22 Jul 2020 01:21:19 -0700 From: "Qi Zhang" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Qi Zhang Subject: [PATCH v7 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file. Date: Wed, 22 Jul 2020 16:21:02 +0800 Message-Id: <20200722082107.12601-2-qi1.zhang@intel.com> X-Mailer: git-send-email 2.26.2.windows.1 In-Reply-To: <20200722082107.12601-1-qi1.zhang@intel.com> References: <20200722082107.12601-1-qi1.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jiewen Yao REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2841 Cc: Jiewen Yao Cc: Jian J Wang Cc: Qi Zhang Signed-off-by: Jiewen Yao --- SecurityPkg/Include/Ppi/Tcg.h | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 SecurityPkg/Include/Ppi/Tcg.h diff --git a/SecurityPkg/Include/Ppi/Tcg.h b/SecurityPkg/Include/Ppi/Tcg.h new file mode 100644 index 0000000000..0e943f2465 --- /dev/null +++ b/SecurityPkg/Include/Ppi/Tcg.h @@ -0,0 +1,60 @@ +/** @file=0D + TCG PPI services.=0D +=0D +Copyright (c) 2020, Intel Corporation. All rights reserved.
=0D +SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#ifndef _TCG_PPI_H_=0D +#define _TCG_PPI_H_=0D +=0D +#include =0D +=0D +typedef struct _EDKII_TCG_PPI EDKII_TCG_PPI;=0D +=0D +//=0D +// This bit is shall be set when HashData is the pre-hash digest.=0D +//=0D +#define EDKII_TCG_PRE_HASH 0x0000000000000001=0D +=0D +/**=0D + Tpm measure and log data, and extend the measurement result into a speci= fic PCR.=0D +=0D + @param[in] This Indicates the calling context=0D + @param[in] Flags Bitmap providing additional information=0D + @param[in] HashData If BIT0 of Flags is 0, it is physical addr= ess of the=0D + start of the data buffer to be hashed, ext= ended, and logged.=0D + If BIT0 of Flags is 1, it is physical addr= ess of the=0D + start of the pre-hash data buffter to be e= xtended, and logged.=0D + The pre-hash data format is TPML_DIGEST_VA= LUES.=0D + @param[in] HashDataLen The length, in bytes, of the buffer refere= nced by HashData.=0D + @param[in] NewEventHdr Pointer to a TCG_PCR_EVENT_HDR data struct= ure.=0D + @param[in] NewEventData Pointer to the new event data.=0D +=0D + @retval EFI_SUCCESS Operation completed successfully.=0D + @retval EFI_UNSUPPORTED TPM device not available.=0D + @retval EFI_OUT_OF_RESOURCES Out of memory.=0D + @retval EFI_DEVICE_ERROR The operation was unsuccessful.=0D +**/=0D +typedef=0D +EFI_STATUS=0D +(EFIAPI *EDKII_TCG_HASH_LOG_EXTEND_EVENT)(=0D + IN EDKII_TCG_PPI *This,=0D + IN UINT64 Flags,=0D + IN UINT8 *HashData,=0D + IN UINTN HashDataLen,=0D + IN TCG_PCR_EVENT_HDR *NewEventHdr,=0D + IN UINT8 *NewEventData=0D + );=0D +=0D +///=0D +/// The EFI_TCG Protocol abstracts TCG activity.=0D +///=0D +struct _EDKII_TCG_PPI {=0D + EDKII_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent;=0D +};=0D +=0D +extern EFI_GUID gEdkiiTcgPpiGuid;=0D +=0D +#endif=0D --=20 2.26.2.windows.1