Hi Qi
Please move the PRE_HASH flag here, and add description on PreHashData format.

Thank you
Yao Jiewen

> -----Original Message-----
> From: Zhang, Qi1 <qi1.zh...@intel.com>
> Sent: Thursday, July 16, 2020 3:44 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen....@intel.com>; Wang, Jian J <jian.j.w...@intel.com>;
> Chao Zhang <chao.b.zh...@intel.com>; Zhang, Qi1 <qi1.zh...@intel.com>
> Subject: [PATCH v2 1/7] SecurityPkg/TcgPpi: Add TcgPpi header file.
> 
> From: Jiewen Yao <jiewen....@intel.com>
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2841
> 
> Cc: Jiewen Yao <jiewen....@intel.com>
> Cc: Jian J Wang <jian.j.w...@intel.com>
> Cc: Chao Zhang <chao.b.zh...@intel.com>
> Cc: Qi Zhang <qi1.zh...@intel.com>
> Signed-off-by: Jiewen Yao <jiewen....@intel.com>
> ---
>  SecurityPkg/Include/Ppi/Tcg.h | 52 +++++++++++++++++++++++++++++++++++
>  1 file changed, 52 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..2725a4ca71
> --- /dev/null
> +++ b/SecurityPkg/Include/Ppi/Tcg.h
> @@ -0,0 +1,52 @@
> +/** @file
> 
> +  TCG PPI services.
> 
> +
> 
> +Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> 
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +
> 
> +**/
> 
> +
> 
> +#ifndef _TCG_PPI_H_
> 
> +#define _TCG_PPI_H_
> 
> +
> 
> +#include <IndustryStandard/UefiTcgPlatform.h>
> 
> +
> 
> +typedef struct _EDKII_TCG_PPI EDKII_TCG_PPI;
> 
> +
> 
> +/**
> 
> +  Tpm measure and log data, and extend the measurement result into a specific
> PCR.
> 
> +
> 
> +  @param[in]      This          Indicates the calling context
> 
> +  @param[in]      Flags         Bitmap providing additional information
> 
> +  @param[in]      HashData      Physical address of the start of the data 
> buffer
> 
> +                                to be hashed, extended, and logged.
> 
> +  @param[in]      HashDataLen   The length, in bytes, of the buffer 
> referenced by
> HashData.
> 
> +  @param[in]      NewEventHdr   Pointer to a TCG_PCR_EVENT_HDR data
> structure.
> 
> +  @param[in]      NewEventData  Pointer to the new event data.
> 
> +
> 
> +  @retval EFI_SUCCESS           Operation completed successfully.
> 
> +  @retval EFI_UNSUPPORTED       TPM device not available.
> 
> +  @retval EFI_OUT_OF_RESOURCES  Out of memory.
> 
> +  @retval EFI_DEVICE_ERROR      The operation was unsuccessful.
> 
> +**/
> 
> +typedef
> 
> +EFI_STATUS
> 
> +(EFIAPI *EDKII_TCG_HASH_LOG_EXTEND_EVENT)(
> 
> +  IN      EDKII_TCG_PPI             *This,
> 
> +  IN      UINT64                    Flags,
> 
> +  IN      UINT8                     *HashData,
> 
> +  IN      UINTN                     HashDataLen,
> 
> +  IN      TCG_PCR_EVENT_HDR         *NewEventHdr,
> 
> +  IN      UINT8                     *NewEventData
> 
> +  );
> 
> +
> 
> +///
> 
> +/// The EFI_TCG Protocol abstracts TCG activity.
> 
> +///
> 
> +struct _EDKII_TCG_PPI {
> 
> +  EDKII_TCG_HASH_LOG_EXTEND_EVENT     HashLogExtendEvent;
> 
> +};
> 
> +
> 
> +extern EFI_GUID gEdkiiTcgPpiGuid;
> 
> +
> 
> +#endif
> 
> --
> 2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62671): https://edk2.groups.io/g/devel/message/62671
Mute This Topic: https://groups.io/mt/75537387/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to