]> Git Repo - u-boot.git/blobdiff - include/efi_tcg2.h
tpm: Remove <common.h> and add needed includes
[u-boot.git] / include / efi_tcg2.h
index 50a59f9263a7462666c7307f7d9cec9481368952..a75b5a35b6e725d97a1e7aa04ef9d6f593487605 100644 (file)
 #include <efi_api.h>
 #include <tpm-v2.h>
 
-#define EFI_TCG2_PROTOCOL_GUID \
-       EFI_GUID(0x607f766c, 0x7455, 0x42be, 0x93, \
-                0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f)
-
 /* TPMV2 only */
 #define TCG2_EVENT_LOG_FORMAT_TCG_2 0x00000002
 #define EFI_TCG2_EXTEND_ONLY 0x0000000000000001
@@ -133,50 +129,6 @@ struct efi_tcg2_boot_service_capability {
 #define BOOT_SERVICE_CAPABILITY_MIN \
        offsetof(struct efi_tcg2_boot_service_capability, number_of_pcr_banks)
 
-#define TCG_EFI_SPEC_ID_EVENT_SIGNATURE_03 "Spec ID Event03"
-#define TCG_EFI_SPEC_ID_EVENT_SPEC_VERSION_MAJOR_TPM2 2
-#define TCG_EFI_SPEC_ID_EVENT_SPEC_VERSION_MINOR_TPM2 0
-#define TCG_EFI_SPEC_ID_EVENT_SPEC_VERSION_ERRATA_TPM2 2
-
-/**
- *  struct TCG_EfiSpecIdEventAlgorithmSize - hashing algorithm information
- *
- *  @algorithm_id:     algorithm defined in enum tpm2_algorithms
- *  @digest_size:      size of the algorithm
- */
-struct tcg_efi_spec_id_event_algorithm_size {
-       u16      algorithm_id;
-       u16      digest_size;
-} __packed;
-
-/**
- * struct TCG_EfiSpecIDEventStruct - content of the event log header
- *
- * @signature:                 signature, set to Spec ID Event03
- * @platform_class:            class defined in TCG ACPI Specification
- *                             Client  Common Header.
- * @spec_version_minor:                minor version
- * @spec_version_major:                major version
- * @spec_version_errata:       major version
- * @uintn_size:                        size of the efi_uintn_t fields used in various
- *                             data structures used in this specification.
- *                             0x01 indicates u32  and 0x02  indicates u64
- * @number_of_algorithms:      hashing algorithms used in this event log
- * @digest_sizes:              array of number_of_algorithms pairs
- *                             1st member defines the algorithm id
- *                             2nd member defines the algorithm size
- */
-struct tcg_efi_spec_id_event {
-       u8 signature[16];
-       u32 platform_class;
-       u8 spec_version_minor;
-       u8 spec_version_major;
-       u8 spec_errata;
-       u8 uintn_size;
-       u32 number_of_algorithms;
-       struct tcg_efi_spec_id_event_algorithm_size digest_sizes[];
-} __packed;
-
 /**
  * struct tdEFI_TCG2_FINAL_EVENTS_TABLE - log entries after Get Event Log
  * @version:           version number for this structure
@@ -198,16 +150,14 @@ struct efi_tcg2_final_events_table {
  *                             the variable.
  * @variable_data_length:      The size of the variable data.
  * @unicode_name:              The CHAR16 unicode name of the variable
- *                             without NULL-terminator.
- * @variable_data:             The data parameter of the efi variable
- *                             in the GetVariable() API.
+ *                             without NULL-terminator followed by data.
  */
 struct efi_tcg2_uefi_variable_data {
        efi_guid_t variable_name;
        u64 unicode_name_length;
        u64 variable_data_length;
-       u16 unicode_name[1];
-       u8 variable_data[1];
+       u16 unicode_name[];
+       // u8 variable_data[];
 };
 
 /**
@@ -237,6 +187,16 @@ struct efi_gpt_data {
        gpt_entry partitions[];
 } __packed;
 
+/**
+ * struct tdUEFI_PLATFORM_FIRMWARE_BLOB2
+ * @blob_description_size:     Byte size of @data
+ * @data:                      Description data
+ */
+struct uefi_platform_firmware_blob2 {
+       u8 blob_description_size;
+       u8 data[];
+} __packed;
+
 struct efi_tcg2_protocol {
        efi_status_t (EFIAPI * get_capability)(struct efi_tcg2_protocol *this,
                                               struct efi_tcg2_boot_service_capability *capability);
This page took 0.02933 seconds and 4 git commands to generate.