public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wang, Jian J" <jian.j.wang@intel.com>
To: "Zhang, Qi1" <qi1.zhang@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Yao, Jiewen" <jiewen.yao@intel.com>
Subject: Re: [PATCH v4 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file.
Date: Tue, 21 Jul 2020 08:37:09 +0000	[thread overview]
Message-ID: <BYAPR11MB3303195A7F6D266A4CD6FF71B6780@BYAPR11MB3303.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200717084935.11067-2-qi1.zhang@intel.com>


Reviewed-by: Jian J Wang <jian.j.wang@intel.com>

Regards,
Jian

> -----Original Message-----
> From: Zhang, Qi1 <qi1.zhang@intel.com>
> Sent: Friday, July 17, 2020 4:50 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Zhang, Qi1 <qi1.zhang@intel.com>
> Subject: [PATCH v4 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file.
> 
> From: Jiewen Yao <jiewen.yao@intel.com>
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2841
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Qi Zhang <qi1.zhang@intel.com>
> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
> ---
>  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
> 
> +  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;
> 
> +
> 
> +//
> 
> +// This bit is shall be set when HashData is the pre-hash digest.
> 
> +//
> 
> +#define EDKII_TCG_PRE_HASH  0x0000000000000001
> 
> +
> 
> +/**
> 
> +  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      If BIT0 of Flags is 0, it is physical address of the
> 
> +                                start of the data buffer to be hashed, extended, and logged.
> 
> +                                If BIT0 of Flags is 1, it is physical address of the
> 
> +                                start of the pre-hash data buffter to be extended, and logged.
> 
> +                                The pre-hash data format is TPML_DIGEST_VALUES.
> 
> +  @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


  reply	other threads:[~2020-07-21  8:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17  8:49 [PATCH v4 0/6] Add capability to let PEIM extend TcgEvent Qi Zhang
2020-07-17  8:49 ` [PATCH v4 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file Qi Zhang
2020-07-21  8:37   ` Wang, Jian J [this message]
2020-07-17  8:49 ` [PATCH v4 2/6] SecurityPkg/dec: Add TcgPpi Qi Zhang
2020-07-21  8:37   ` Wang, Jian J
2020-07-17  8:49 ` [PATCH v4 3/6] SecurityPkg/Tcg: " Qi Zhang
2020-07-21  8:36   ` Wang, Jian J
2020-07-17  8:49 ` [PATCH v4 4/6] SecurityPkg/Tcg2: " Qi Zhang
2020-07-21  8:52   ` Wang, Jian J
2020-07-17  8:49 ` [PATCH v4 5/6] SecurityPkg/PeiTpmMeasurementLib: Add PEI instance Qi Zhang
2020-07-21  9:00   ` Wang, Jian J
     [not found]   ` <1623B8ED1BE72736.9882@groups.io>
2020-07-21  9:16     ` [edk2-devel] " Wang, Jian J
2020-07-21 15:05       ` Yao, Jiewen
2020-07-22  1:08         ` Wang, Jian J
2020-07-22  2:08           ` Qi Zhang
2020-07-22  2:13             ` Yao, Jiewen
2020-07-17  8:49 ` [PATCH v4 6/6] SecurityPkg/dsc: Add PeiTpmMeasurementLib Qi Zhang
2020-07-21  9:00   ` Wang, Jian J

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR11MB3303195A7F6D266A4CD6FF71B6780@BYAPR11MB3303.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox