]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFsp2WrapperPkg/FspMeasurementLib: Add header file.
authorJiewen Yao <jiewen.yao@intel.com>
Tue, 18 Aug 2020 06:26:12 +0000 (14:26 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 26 Aug 2020 15:56:11 +0000 (15:56 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Message-Id: <20200818062618.3698-3-qi1.zhang@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h [new file with mode: 0644]

diff --git a/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h b/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h
new file mode 100644 (file)
index 0000000..4620b4b
--- /dev/null
@@ -0,0 +1,39 @@
+/** @file\r
+  This library is used by FSP modules to measure data to TPM.\r
+\r
+Copyright (c) 2020, Intel Corporation. All rights reserved. <BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef _FSP_MEASUREMENT_LIB_H_\r
+#define _FSP_MEASUREMENT_LIB_H_\r
+\r
+#define FSP_MEASURE_FSP       BIT0\r
+#define FSP_MEASURE_FSPT      BIT1\r
+#define FSP_MEASURE_FSPM      BIT2\r
+#define FSP_MEASURE_FSPS      BIT3\r
+#define FSP_MEASURE_FSPUPD    BIT31\r
+\r
+/**\r
+  Measure a FSP FirmwareBlob.\r
+\r
+  @param[in]  PcrIndex                PCR Index.\r
+  @param[in]  Description             Description for this FirmwareBlob.\r
+  @param[in]  FirmwareBlobBase        Base address of this FirmwareBlob.\r
+  @param[in]  FirmwareBlobLength      Size in bytes of this FirmwareBlob.\r
+\r
+  @retval EFI_SUCCESS           Operation completed successfully.\r
+  @retval EFI_UNSUPPORTED       TPM device not available.\r
+  @retval EFI_OUT_OF_RESOURCES  Out of memory.\r
+  @retval EFI_DEVICE_ERROR      The operation was unsuccessful.\r
+*/\r
+EFI_STATUS\r
+EFIAPI\r
+MeasureFspFirmwareBlob (\r
+  IN UINT32                         PcrIndex,\r
+  IN CHAR8                          *Description OPTIONAL,\r
+  IN EFI_PHYSICAL_ADDRESS           FirmwareBlobBase,\r
+  IN UINT64                         FirmwareBlobLength\r
+  );\r
+#endif\r