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.web10.6793.1594971201528724190 for ; Fri, 17 Jul 2020 00:33:22 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: qi1.zhang@intel.com) IronPort-SDR: QH4578YSqTyYynJC0fB5qYV9VnteohyXjM9H1Lt+VkIwO5KCYANlCOsQOFPspMvyGBRPbegeS6 8lZI/jQ+1kuQ== X-IronPort-AV: E=McAfee;i="6000,8403,9684"; a="129113484" X-IronPort-AV: E=Sophos;i="5.75,362,1589266800"; d="scan'208";a="129113484" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2020 00:33:22 -0700 IronPort-SDR: ysG+sRu+sOLqkwcIS/7Eu1+Fi15tYvT+D7XmvXtLK2FBrVoFiEsmO9lHTJt7StWRabjLMMb8t2 GC2An3kRS2kw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,362,1589266800"; d="scan'208";a="361273517" Received: from shwdesssddpdqi.ccr.corp.intel.com ([10.239.9.10]) by orsmga001.jf.intel.com with ESMTP; 17 Jul 2020 00:33:19 -0700 From: "Qi Zhang" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Chao Zhang , Qi Zhang Subject: [PATCH v3 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file. Date: Fri, 17 Jul 2020 15:33:07 +0800 Message-Id: <20200717073312.10594-2-qi1.zhang@intel.com> X-Mailer: git-send-email 2.26.2.windows.1 In-Reply-To: <20200717073312.10594-1-qi1.zhang@intel.com> References: <20200717073312.10594-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: Chao Zhang 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..d86ff5961d --- /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 EFI_TCG2_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