github.com/linuxboot/fiano@v1.2.0/pkg/intel/metadata/fit/ent_tpm_policy_record.go (about)

     1  // Copyright 2017-2021 the LinuxBoot Authors. All rights reserved
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package fit
     6  
     7  import (
     8  	"fmt"
     9  	"io"
    10  )
    11  
    12  // EntryTPMPolicyRecord represents a FIT entry of type "TPM Policy Record" (0x08)
    13  type EntryTPMPolicyRecord struct{ EntryBase }
    14  
    15  var _ EntryCustomGetDataSegmentSizer = (*EntryTPMPolicyRecord)(nil)
    16  
    17  // Init initializes the entry using EntryHeaders and firmware image.
    18  func (entry *EntryTPMPolicyRecord) CustomGetDataSegmentSize(firmware io.ReadSeeker) (uint64, error) {
    19  	return 0, fmt.Errorf("EntryTPMPolicyRecord is not supported, yet")
    20  }
    21  
    22  var _ EntryCustomRecalculateHeaderser = (*EntryTPMPolicyRecord)(nil)
    23  
    24  // CustomRecalculateHeaders recalculates metadata to be consistent with data.
    25  // For example, it fixes checksum, data size, entry type and so on.
    26  func (entry *EntryTPMPolicyRecord) CustomRecalculateHeaders() error {
    27  	return fmt.Errorf("EntryTPMPolicyRecord is not supported, yet")
    28  }