Documentation ¶
Index ¶
- Constants
- Variables
- func CalcImageOffset(image []byte, addr uint64) (uint64, error)
- func FetchTXTRegs(txtAPI hwapi.LowLevelHardwareInterfaces) ([]byte, error)
- func GetRegion(image []byte, regionType uefi.FlashRegionType) (uint32, uint32, error)
- func LookupACMSize(header []byte) (int64, error)
- func ParseACM(data []byte) (*ACM, *Chipsets, *Processors, *TPMs, error, error)
- func ParsePolicy(policy []byte) (*LCPPolicy, *LCPPolicy2, error)
- func PrintLcpHashAlgMask(mask uint16) string
- func PrintPolicyControl(pc uint32) string
- func ReadACMPolicyStatusRaw(data []byte) (uint64, error)
- func ShowVersion(toolName, tag, commit string)
- func ValidateACMHeader(acmheader *ACMHeader) (bool, error)
- type ACM
- type ACMFlags
- type ACMHeader
- type ACMInfo
- type ACMStatus
- type ApprovedHashAlgorithm
- type ApprovedSignatureAlogrithm
- type ChipsetID
- type Chipsets
- type Configuration
- type LCPHash
- type LCPList
- type LCPPol2Sig
- type LCPPolicy
- type LCPPolicy2
- type LCPPolicyCustom
- type LCPPolicyData
- type LCPPolicyElement
- type LCPPolicyList
- type LCPPolicyList2
- type LCPPolicyMLE
- type LCPPolicyPCONF
- type LCPPolicySBIOS
- type LCPPolicyType
- type LCPSignature
- type LCPUUID
- type PolicyControl
- type ProcessorID
- type Processors
- type TPMPCRInfoShort
- type TPMs
- type TXTBiosData
- type TXTBiosMLEFlags
- type TXTErrorCode
- type TXTMode
- type TXTRegisterSpace
- type TXTStatus
- type UUID
Constants ¶
const ( //ACMChipsetTypeBios as defined in Document 315168-016 Chapter A.1 Table 8. Authenticated Code Module Format ACMChipsetTypeBios uint8 = 0x00 //ACMChipsetTypeSinit as defined in Document 315168-016 Chapter A.1 Table 8. Authenticated Code Module Format ACMChipsetTypeSinit uint8 = 0x01 //ACMChipsetTypeBiosRevoc as defined in Document 315168-016 Chapter A.1 Table 10. Chipset AC Module Information Table ACMChipsetTypeBiosRevoc uint8 = 0x08 //ACMChipsetTypeSinitRevoc as defined in Document 315168-016 Chapter A.1 Table 10. Chipset AC Module Information Table ACMChipsetTypeSinitRevoc uint8 = 0x09 //ACMTypeChipset as defined in Document 315168-016 Chapter A.1 Table 8. Authenticated Code Module Format ACMTypeChipset uint16 = 0x02 //ACMSubTypeReset FIXME ACMSubTypeReset uint16 = 0x01 //ACMVendorIntel as defined in Document 315168-016 Chapter A.1 Table 8. Authenticated Code Module Format ACMVendorIntel uint32 = 0x8086 //TPMExtPolicyIllegal as defined in Document 315168-016 Chapter A.1 Table 16. TPM Capabilities Field TPMExtPolicyIllegal uint8 = 0x00 //TPMExtPolicyAlgAgile as defined in Document 315168-016 Chapter A.1 Table 16. TPM Capabilities Field TPMExtPolicyAlgAgile uint8 = 0x01 //TPMExtPolicyEmbeddedAlgs as defined in Document 315168-016 Chapter A.1 Table 16. TPM Capabilities Field TPMExtPolicyEmbeddedAlgs uint8 = 0x10 //TPMExtPolicyBoth as defined in Document 315168-016 Chapter A.1 Table 16. TPM Capabilities Field TPMExtPolicyBoth uint8 = 0x11 //TPMFamilyIllegal as defined in Document 315168-016 Chapter A.1 Table 16. TPM Capabilities Field TPMFamilyIllegal uint16 = 0x0000 //TPMFamilyDTPM12 as defined in Document 315168-016 Chapter A.1 Table 16. TPM Capabilities Field TPMFamilyDTPM12 uint16 = 0x0001 //TPMFamilyDTPM20 as defined in Document 315168-016 Chapter A.1 Table 16. TPM Capabilities Field TPMFamilyDTPM20 uint16 = 0x0010 //TPMFamilyDTPMBoth combination out of TPMFamilyDTPM12 and TPMFamilyDTPM20 TPMFamilyDTPMBoth uint16 = 0x0011 //TPMFamilyPTT20 as defined in Document 315168-016 Chapter A.1 Table 16. TPM Capabilities Field TPMFamilyPTT20 uint16 = 0x1000 //ACMUUIDV3 as defined in Document 315168-016 Chapter A.1 Table 10. Chipset AC Module Information Table ACMUUIDV3 string = "7fc03aaa-46a7-18db-ac2e-698f8d417f5a" //ACMSizeOffset as defined in Document 315168-016 Chapter A.1 Table 8. Authenticated Code Module Format ACMSizeOffset int64 = 24 //ACMheaderLen as defined in Document 315168-016 Chapter A.1 Table 8. Authenticated Code Module Format (Version 0.0) ACMheaderLen uint32 = 161 //ACMModuleSubtypeSinitACM is an enum ACMModuleSubtypeSinitACM uint16 = 0 //ACMModuleSubtypeCapableOfExecuteAtReset is a flag and enum Based on EDK2 Silicon/Intel/Tools/FitGen/FitGen.c ACMModuleSubtypeCapableOfExecuteAtReset uint16 = 1 //ACMModuleSubtypeAncModule is a flag Based on EDK2 Silicon/Intel/Tools/FitGen/FitGen.c ACMModuleSubtypeAncModule uint16 = 2 )
const ( // LCPPol2HashMaskSHA1 exports SHA1 definition for LCPPolicy2.LcpHashMapAlg LCPPol2HashMaskSHA1 uint16 = 0x0001 // LCPPol2HashMaskSHA256 exports SHA256 definition for LCPPolicy2.LcpHashMapAlg LCPPol2HashMaskSHA256 uint16 = 0x0008 // LCPPol2HashMaskSHA384 exports SHA384 definition for LCPPolicy2.LcpHashMapAlg LCPPol2HashMaskSHA384 uint16 = 0x0040 )
const ( //LCPPolicyVersion2 as defined in Document 315168-016 Chapter 3.2.1 LCP Policy LCPPolicyVersion2 uint16 = 0x0204 //LCPPolicyVersion3 as defined in Document 315168-016 Chapter 3.2.1 LCP Policy LCPPolicyVersion3 uint16 = 0x0300 //LCPPolicyTypeAny as defined in Document 315168-016 Chapter D LCP Data Structures LCPPolicyTypeAny LCPPolicyType = 1 //LCPPolicyTypeList as defined in Document 315168-016 Chapter D LCP Data Structures LCPPolicyTypeList LCPPolicyType = 0 //LCPMaxLists as defined in Document 315168-016 Chapter D LCP Data Structures LCPMaxLists uint = 8 //SHA1DigestSize as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 SHA1DigestSize uint = 20 //SHA256DigestSize as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 SHA256DigestSize uint = 32 //SHA384DigestSize as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 SHA384DigestSize uint = 48 //SHA512DigestSize FIXME SHA512DigestSize uint = 64 //SM3DigestSize as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 SM3DigestSize uint = 32 //LCPDataFileSignature as defined in Document 315168-016 Chapter D.2 LCP_POLICY_DATA LCPDataFileSignature string = "Intel(R) TXT LCP_POLICY_DATA\x00\x00\x00\x00" //LCPSignatureAlgNone FIXME LCPSignatureAlgNone uint8 = 0 //LCPSignatureAlgRSAPKCS15 FIXME LCPSignatureAlgRSAPKCS15 uint8 = 1 //LCPPolicyElementMLE as defined in Document 315168-016 Chapter D.4.4 LCP_MLE_ELEMENT LCPPolicyElementMLE uint32 = 0 //LCPPolicyElementPCONF as defined in Document 315168-016 Chapter D.4.5 LCP_PCONF_ELEMENT LCPPolicyElementPCONF uint32 = 1 //LCPPolicyElementSBIOS FIXME LCPPolicyElementSBIOS uint32 = 2 //LCPPolicyElementCustom as defined in Document 315168-016 Chapter D.4.6 LCP_CUSTOM_ELEMENT LCPPolicyElementCustom uint32 = 3 //LCPPolicyElementMLE2 as defined in Document 315168-016 Chapter D.4.7 LCP_MLE_ELEMENT2 LCPPolicyElementMLE2 uint32 = 0x10 //LCPPolicyElementPCONF2 as defined in Document 315168-016 Chapter D.4.8 LCP_PCONF_ELEMENT2 LCPPolicyElementPCONF2 uint32 = 0x11 //LCPPolicyElementSBIOS2 FIXME LCPPolicyElementSBIOS2 uint32 = 0x12 //LCPPolicyElementSTM2 as defined in Document 315168-016 Chapter D.4.9 LCP_STM_ELEMENT2 LCPPolicyElementSTM2 uint32 = 0x14 // LCPPolHAlgSHA1 Document 315168-016 Chapter D.1 LCP_POLICY LCPPolHAlgSHA1 uint8 = 0 // LCPPolicyControlNPW as defined in Document 315168-013 Chapter 3.2.2 PolicyControl Field for LCP_POLTYPE_LIST LCPPolicyControlNPW uint32 = 0x00000001 //LCPPolicyControlSinitCaps as defined in Document 315168-013 Chapter 3.2.2 PolicyControl Field for LCP_POLTYPE_LIST LCPPolicyControlSinitCaps uint32 = 0x00000002 //LCPPolicyControlOwnerEnforced as defined in Document 315168-013 Chapter 3.2.2 PolicyControl Field for LCP_POLTYPE_LIST LCPPolicyControlOwnerEnforced uint32 = 0x00000004 //LCPPolicyControlAuxDelete as defined in Document 315168-013 Chapter 3.3.2 LCP Policy 2 LCPPolicyControlAuxDelete uint32 = 0x80000000 )
const ( // TxtTPMDecode for external use TxtTPMDecode = 0xFED40000 // TxtTPMDecodeSize is the size of the TCG defined TIS MMIO space TxtTPMDecodeSize = 0x5000 // TxtPublicSpace for external test TxtPublicSpace = 0xFED30000 // TxtPublicSpaceSize exports the size of TXTPublicSpace in memory map TxtPublicSpaceSize = 0x10000 // TxtPrivateSpace for external test TxtPrivateSpace = 0xFED20000 // TxtPrivateSpaceSize for external test TxtPrivateSpaceSize = 0x10000 )
Variables ¶
var HashAlgMap = map[crypto.Hash]tpm2.Algorithm{ crypto.SHA1: 0x04, crypto.SHA256: 0x0B, crypto.SHA384: 0x0C, }
HashAlgMap exports map from crypto.Hash to LCPPol2Hash for parsing manual input to LCPPolicy2
var HashMaskMap = map[string]uint16{ "SHA1": LCPPol2HashMaskSHA1, "SHA256": LCPPol2HashMaskSHA256, "SHA384": LCPPol2HashMaskSHA384, }
HashMaskMap exports map to convert string to type LCPPol2HashMask for file parsing
var PolicyControlMap = map[string]uint32{
"NPW": 0x00000001,
"SinitCaps": 0x00000002,
"OwnerEnforced": 0x00000004,
"AuxDelete": 0x80000000,
}
PolicyControlMap exports map to convert string to type PoliyControl for file parsing
var SignMaskMap = map[string]LCPPol2Sig{ "RSA2048SHA1": RSA2048SHA1, "RSA2048SHA256": RSA2048SHA256, "RSA3072SHA256": RSA3072SHA256, "RSA3072SHA384": RSA3072SHA384, "ECDSAP256SHA256": ECDSAP256SHA256, "ECDSAP384SHA384": ECDSAP384SHA384, }
SignMaskMap exports map to convert string to type LCPPol2Sig for file parsing
Functions ¶
func CalcImageOffset ¶
CalcImageOffset returns the offset of a given uefi flash image
func FetchTXTRegs ¶
func FetchTXTRegs(txtAPI hwapi.LowLevelHardwareInterfaces) ([]byte, error)
FetchTXTRegs returns a raw copy of the TXT config space
func LookupACMSize ¶
LookupACMSize returns the ACM size
func ParsePolicy ¶
func ParsePolicy(policy []byte) (*LCPPolicy, *LCPPolicy2, error)
ParsePolicy generates one of LCPPolicy or LCPPolicy2
func PrintLcpHashAlgMask ¶
PrintLcpHashAlgMask prints LcpHashAlgMask in human readable format
func PrintPolicyControl ¶
PrintPolicyControl can print PolicyControl field
func ReadACMPolicyStatusRaw ¶
ReadACMPolicyStatusRaw decodes the raw ACM status register bits
func ValidateACMHeader ¶
ValidateACMHeader validates an ACM Header found in the Firmware Interface Table (FIT)
Types ¶
type ACM ¶
ACM exports the structure of Authenticated Code Modules found in the Firmware Interface Table(FIT)
func (*ACM) PrettyPrint ¶
func (a *ACM) PrettyPrint()
PrettyPrint prints a human readable representation of the ACM
type ACMHeader ¶
type ACMHeader struct { ModuleType uint16 ModuleSubType uint16 HeaderLen uint32 HeaderVersion uint32 ChipsetID uint16 Flags uint16 ModuleVendor uint32 Date uint32 Size uint32 TxtSVN uint16 SeSVN uint16 CodeControl uint32 ErrorEntryPoint uint32 GDTLimit uint32 GDTBase uint32 SegSel uint32 EntryPoint uint32 Reserved2 [64]uint8 KeySize uint32 ScratchSize uint32 PubKey [256]uint8 PubExp uint32 Signature [256]uint8 }
ACMHeader exports the structure of ACM Header found in the firmware interface table
func ParseACMHeader ¶
ParseACMHeader exports the functionality of parsing an ACM Header
func (*ACMHeader) ParseACMFlags ¶
ParseACMFlags parses the ACM Header flags
func (*ACMHeader) PrettyPrint ¶
func (a *ACMHeader) PrettyPrint()
PrettyPrint prints a human readable representation of the ACMHeader
type ACMInfo ¶
type ACMInfo struct { UUID UUID ChipsetACMType uint8 Version uint8 Length uint16 ChipsetIDList uint32 OSSinitDataVersion uint32 MinMleHeaderVersion uint32 TxtCaps uint32 ACMVersion uint8 Reserved [3]uint8 ProcessorIDList uint32 TPMInfoList uint32 }
ACMInfo holds the metadata extracted from the ACM header
type ACMStatus ¶
type ACMStatus struct { Valid bool MinorErrorCode uint16 ACMStarted bool MajorErrorCode uint8 ClassCode uint8 ModuleType uint8 }
ACMStatus holds the decoded ACM run state
func ReadACMStatus ¶
ReadACMStatus decodes the raw ACM status register bits
type ApprovedHashAlgorithm ¶
ApprovedHashAlgorithm as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2
type ApprovedSignatureAlogrithm ¶
type ApprovedSignatureAlogrithm struct { RSA2048SHA1 bool RSA2048SHA256 bool RSA3072SHA256 bool RSA3072SHA384 bool ECDSAP256SHA256 bool ECDSAP384SHA384 bool SM2SM2CurveSM3 bool }
ApprovedSignatureAlogrithm as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2
type ChipsetID ¶
type ChipsetID struct { Flags uint32 VendorID uint16 DeviceID uint16 RevisionID uint16 Reserved [3]uint16 }
ChipsetID describes the chipset ID found in the ACM header
type Chipsets ¶
Chipsets hold a list of supported chipset IDs as found in the ACM header
func (*Chipsets) PrettyPrint ¶
func (c *Chipsets) PrettyPrint()
PrettyPrint prints a human readable representation of the Chipsets
type Configuration ¶
type Configuration struct { TPM hwapi.TPMVersion TXTMode TXTMode LCPHash tpm2.Algorithm }
Configuration input
func ParseConfig ¶
func ParseConfig(filepath string) (*Configuration, error)
ParseConfig parses txt-suite configuration file
type LCPHash ¶
type LCPHash struct { Sha1 *[SHA1DigestSize]uint8 Sha256 *[SHA256DigestSize]uint8 Sha384 *[SHA384DigestSize]uint8 Sha512 *[SHA512DigestSize]uint8 SM3 *[SM3DigestSize]uint8 }
LCPHash holds one of the supported hashes
func (*LCPHash) PrettyPrint ¶
PrettyPrint prints the LCPHash in a human readable format
type LCPList ¶
type LCPList struct { TPM12PolicyList LCPPolicyList TPM20PolicyList LCPPolicyList2 }
LCPList as defined in Document 315168-016 Chapter D.3.2.3 LCP_LIST
type LCPPol2Sig ¶
type LCPPol2Sig uint32
LCPPol2Sig represents LCPPol2.LcpSignAlgMask options
const ( // RSA2048SHA1 as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 RSA2048SHA1 LCPPol2Sig = 0x00000004 // RSA2048SHA256 as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 RSA2048SHA256 LCPPol2Sig = 0x00000008 // RSA3072SHA256 as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 RSA3072SHA256 LCPPol2Sig = 0x00000040 // RSA3072SHA384 as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 RSA3072SHA384 LCPPol2Sig = 0x00000080 // ECDSAP256SHA256 as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 ECDSAP256SHA256 LCPPol2Sig = 0x00001000 // ECDSAP384SHA384 as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 ECDSAP384SHA384 LCPPol2Sig = 0x00002000 // SM2SM2CurveSM3 as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2 SM2SM2CurveSM3 LCPPol2Sig = 0x00010000 )
func (LCPPol2Sig) String ¶
func (ls LCPPol2Sig) String() string
type LCPPolicy ¶
type LCPPolicy struct { Version uint16 // < 0x0204 HashAlg uint8 PolicyType LCPPolicyType SINITMinVersion uint8 Reserved uint8 DataRevocationCounters [LCPMaxLists]uint16 PolicyControl uint32 MaxSINITMinVersion uint8 Reserved1 uint8 Reserved2 uint16 Reserved3 uint32 PolicyHash [20]byte }
LCPPolicy as defined in Document 315168-016 Chapter D.1.2 LCP_POLICY
func (*LCPPolicy) ParsePolicyControl ¶
func (p *LCPPolicy) ParsePolicyControl() PolicyControl
ParsePolicyControl TODO needs to be reverse engineered
type LCPPolicy2 ¶
type LCPPolicy2 struct { Version uint16 // < 0x0302 HashAlg tpm2.Algorithm PolicyType LCPPolicyType SINITMinVersion uint8 DataRevocationCounters [LCPMaxLists]uint16 PolicyControl uint32 MaxSINITMinVersion uint8 // v2.0 - Only PO index, reserved for PS Reserved uint8 // v2.0 - Only PO index, reserved for PS LcpHashAlgMask uint16 LcpSignAlgMask LCPPol2Sig Reserved2 uint32 PolicyHash [32]byte }
LCPPolicy2 as defined in Document 315168-016 Chapter D.1.3 LCP_POLICY2
func GenLCPPolicyV2 ¶
func GenLCPPolicyV2(version uint16, hashAlg crypto.Hash, hash []byte, sinitmin uint8, pc PolicyControl, apprHashes ApprovedHashAlgorithm, apprSigs ApprovedSignatureAlogrithm) (*LCPPolicy2, error)
GenLCPPolicyV2 generates a LCPPolicyV2 structure with given hash algorithm
func (*LCPPolicy2) ParseApprovedHashAlgorithm ¶
func (p *LCPPolicy2) ParseApprovedHashAlgorithm() ApprovedHashAlgorithm
ParseApprovedHashAlgorithm returns the supported hash algorithms
func (*LCPPolicy2) ParseApprovedSignatureAlgorithm ¶
func (p *LCPPolicy2) ParseApprovedSignatureAlgorithm() ApprovedSignatureAlogrithm
ParseApprovedSignatureAlgorithm returns the supported signature algorithms
func (*LCPPolicy2) ParsePolicyControl2 ¶
func (p *LCPPolicy2) ParsePolicyControl2() PolicyControl
ParsePolicyControl2 TODO needs to be reverse engineered
func (*LCPPolicy2) PrettyPrint ¶
func (p *LCPPolicy2) PrettyPrint()
PrettyPrint prints LCPPolicy2 Structure i a human readable format
type LCPPolicyCustom ¶
LCPPolicyCustom represents a custom policy element
type LCPPolicyData ¶
type LCPPolicyData struct { FileSignature [32]uint8 Reserved [3]uint8 NumLists uint8 PolicyLists []LCPList }
LCPPolicyData FIXME
func ParsePolicyData ¶
func ParsePolicyData(policyData []byte) (*LCPPolicyData, error)
ParsePolicyData parses a raw copy of the LCP policy
func (*LCPPolicyData) PrettyPrint ¶
func (pd *LCPPolicyData) PrettyPrint()
PrettyPrint prints the LCPPolicyData in a human readable format
type LCPPolicyElement ¶
type LCPPolicyElement struct { Size uint32 Type uint32 PolicyEltControl uint32 MLE *LCPPolicyMLE SBIOS *LCPPolicySBIOS PCONF *LCPPolicyPCONF Custom *LCPPolicyCustom }
LCPPolicyElement represents a policy element as defined in Document 315168-016 Chapter D.4 LCP_POLICY_ELEMENT
type LCPPolicyList ¶
type LCPPolicyList struct { Version uint16 Reserved uint8 SignaturAlg uint8 PolicyElementSize uint32 PolicyElements []LCPPolicyElement Signature *LCPSignature }
LCPPolicyList FIXME not in Document 315168-016
type LCPPolicyList2 ¶
type LCPPolicyList2 struct { Version uint16 SignaturAlg uint16 PolicyElementSize uint32 PolicyElements []LCPPolicyElement }
LCPPolicyList2 as defined in Document 315168-016 Chapter D.3.2.1 LCP_POLICY_LIST2 Structure
type LCPPolicyMLE ¶
LCPPolicyMLE represents a MLE policy element as defined in Document 315168-016 Chapter D.4.4 LCP_MLE_ELEMENT
type LCPPolicyPCONF ¶
type LCPPolicyPCONF struct { NumPCRInfos uint16 PCRInfos []TPMPCRInfoShort }
LCPPolicyPCONF represents a PCONF policy element
type LCPPolicySBIOS ¶
type LCPPolicySBIOS struct { HashAlg uint8 Reserved1 [3]uint8 FallbackHash LCPHash Reserved2 uint16 NumHashes uint16 Hashes []LCPHash }
LCPPolicySBIOS represents a SBIOS policy element
type LCPPolicyType ¶
type LCPPolicyType uint8
LCPPolicyType exports the PolicyType type for external use
func (LCPPolicyType) String ¶
func (pt LCPPolicyType) String() string
type LCPSignature ¶
type LCPSignature struct { RevocationCounter uint16 PubkeySize uint16 PubkeyValue []byte SigBlock []byte }
LCPSignature as defined in Document 315168-016 Chapter D.3.2.1 LCP_POLICY_LIST2 Structure
type LCPUUID ¶
type LCPUUID struct {
// contains filtered or unexported fields
}
LCPUUID represents an UUID
type PolicyControl ¶
PolicyControl as defined in Document 315168-016 Chapter D.1.1 PolicyControl
type ProcessorID ¶
ProcessorID describes the processor ID found in the ACM header
type Processors ¶
type Processors struct { Count uint32 IDList []ProcessorID }
Processors hold a list of supported processor IDs as found in the ACM header
func (*Processors) PrettyPrint ¶
func (p *Processors) PrettyPrint()
PrettyPrint prints a human readable representation of the Processors
type TPMPCRInfoShort ¶
type TPMPCRInfoShort struct { // TPM_PCR_SELECTION PCRSelect []int // TPM_LOCALITY_SELECTION LocalityAtRelease uint8 // TPM_COMPOSITE_HASH DigestAtRelease [20]byte }
TPMPCRInfoShort rFIXME
type TPMs ¶
TPMs describes the required TPM capabilities and algorithm as found in the ACM header
func (*TPMs) PrettyPrint ¶
func (t *TPMs) PrettyPrint()
PrettyPrint prints a human readable representation of the TPMs
type TXTBiosData ¶
type TXTBiosData struct { Version uint32 BiosSinitSize uint32 Reserved1 uint64 Reserved2 uint64 NumLogProcs uint32 SinitFlags uint32 MleFlags *TXTBiosMLEFlags }
TXTBiosData holds the decoded BIOSDATA regions as read from TXT config space
func ParseBIOSDataRegion ¶
func ParseBIOSDataRegion(heap []byte) (TXTBiosData, error)
ParseBIOSDataRegion decodes a raw copy of the BIOSDATA region
type TXTBiosMLEFlags ¶
type TXTBiosMLEFlags struct { SupportsACPIPPI bool IsLegacyState bool IsServerState bool IsClientState bool }
TXTBiosMLEFlags holds the decoded BIOSDATA region MLE flags as read from TXT config space
type TXTErrorCode ¶
type TXTErrorCode struct { ModuleType uint8 // 0: BIOS ACM, 1: Intel TXT ClassCode uint8 MajorErrorCode uint8 SoftwareSource bool // 0: ACM, 1: MLE MinorErrorCode uint16 Type1Reserved uint8 ProcessorSoftware bool ValidInvalid bool }
TXTErrorCode holds the decoded ACM error code read from TXT config space
type TXTRegisterSpace ¶
type TXTRegisterSpace struct { Sts TXTStatus // TXT.STS (0x0) TxtReset bool // TXT.ESTS (0x8) ErrorCode TXTErrorCode // TXT.ERRORCODE ErrorCodeRaw uint32 BootStatus uint64 // TXT.BOOTSTATUS FsbIf uint32 // TXT.VER.FSBIF Vid uint16 // TXT.DIDVID.VID Did uint16 // TXT.DIDVID.DID Rid uint16 // TXT.DIDVID.RID IDExt uint16 // TXT.DIDVID.ID-EXT QpiIf uint32 // TXT.VER.QPIIF SinitBase uint32 // TXT.SINIT.BASE SinitSize uint32 // TXT.SINIT.SIZE MleJoin uint32 // TXT.MLE.JOIN HeapBase uint32 // TXT.HEAP.BASE HeapSize uint32 // TXT.HEAP.SIZE Dpr hwapi.DMAProtectedRange // TXT.DPR PublicKey [4]uint64 // TXT.PUBLIC.KEY E2Sts uint64 // TXT.E2STS }
TXTRegisterSpace holds the decoded TXT config space
func ParseTXTRegs ¶
func ParseTXTRegs(data []byte) (TXTRegisterSpace, error)
ParseTXTRegs decodes a raw copy of the TXT config space
type TXTStatus ¶
type TXTStatus struct { SenterDone bool // SENTER.DONE.STS (0) SexitDone bool // SEXIT.DONE.STS (1) // Reserved (2-5) MemConfigLock bool // MEM-CONFIG-LOCK (6) PrivateOpen bool // PRIVATE-OPEN.STS (7) // Reserved (8-14) Locality1Open bool // TXT.LOCALITY1.OPEN.STS (15) Locality2Open bool // TXT.LOCALITY1.OPEN.STS (16) }
TXTStatus represents serveral configurations within the TXT config space