cbntbootpolicy

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2023 License: BSD-3-Clause Imports: 11 Imported by: 5

Documentation

Index

Constants

View Source
const (
	CachingTypeWriteProtect = CachingType(iota)
	CachingTypeWriteBack
	CachingTypeReserved0
	CachingTypeReserved1
)

<TO BE DOCUMENTED>

View Source
const (
	ExecutionProfileA = ExecutionProfile(iota)
	ExecutionProfileB
	ExecutionProfileC
)
View Source
const (
	MemoryScrubbingPolicyDefault = MemoryScrubbingPolicy(iota)
	MemoryScrubbingPolicyBIOS
	MemoryScrubbingPolicySACM
)
View Source
const (
	BackupActionPolicyDefault = BackupActionPolicy(iota)
	BackupActionPolicyForceMemoryPowerDown
	BackupActionPolicyForceBtGUnbreakableShutdown
)
View Source
const (
	ResetAUXControlResetAUXIndex = ResetAUXControl(iota)
	ResetAUXControlDeleteAUXIndex
)
View Source
const StructureIDBPMH = "__ACBP__"

StructureIDBPMH is the StructureID (in terms of the document #575623) of element 'BPMH'.

View Source
const StructureIDPCD = "__PCDS__"

StructureIDPCD is the StructureID (in terms of the document #575623) of element 'PCD'.

View Source
const StructureIDPM = "__PMDA__"

StructureIDPM is the StructureID (in terms of the document #575623) of element 'PM'.

View Source
const StructureIDReserved = "__PFRS__"

StructureIDReserved is the StructureID (in terms of the document #575623) of element 'Reserved'.

View Source
const StructureIDSE = "__IBBS__"

StructureIDSE is the StructureID (in terms of the document #575623) of element 'SE'.

View Source
const StructureIDSignature = "__PMSG__"

StructureIDSignature is the StructureID (in terms of the document #575623) of element 'Signature'.

View Source
const StructureIDTXT = "__TXTS__"

StructureIDTXT is the StructureID (in terms of the document #575623) of element 'TXT'.

Variables

This section is empty.

Functions

This section is empty.

Types

type BPMH

type BPMH struct {
	StructInfo `id:"__ACBP__" version:"0x23" var0:"0x20" var1:"uint16(s.TotalSize())"`

	KeySignatureOffset uint16 `json:"bpmhKeySignatureOffset"`

	BPMRevision uint8 `json:"bpmhRevision"`

	// BPMSVN is BPM security version number
	//
	// PrettyString: BPM SVN
	BPMSVN cbnt.SVN `json:"bpmhSNV"`

	// ACMSVNAuth is authorized ACM security version number
	//
	// PrettyString: ACM SVN Auth
	ACMSVNAuth cbnt.SVN `json:"bpmhACMSVN"`

	Reserved0 [1]byte `require:"0" json:"bpmhReserved0,omitempty"`

	NEMDataStack Size4K `json:"bpmhNEMStackSize"`
}

BPMH is the header of boot policy manifest

func NewBPMH

func NewBPMH() *BPMH

NewBPMH returns a new instance of BPMH with all default values set.

func (*BPMH) ACMSVNAuthOffset

func (s *BPMH) ACMSVNAuthOffset() uint64

ACMSVNAuthOffset returns the offset in bytes of field ACMSVNAuth

func (*BPMH) ACMSVNAuthTotalSize

func (s *BPMH) ACMSVNAuthTotalSize() uint64

ACMSVNAuthSize returns the size in bytes of the value of field ACMSVNAuth

func (*BPMH) BPMRevisionOffset

func (s *BPMH) BPMRevisionOffset() uint64

BPMRevisionOffset returns the offset in bytes of field BPMRevision

func (*BPMH) BPMRevisionTotalSize

func (s *BPMH) BPMRevisionTotalSize() uint64

BPMRevisionSize returns the size in bytes of the value of field BPMRevision

func (*BPMH) BPMSVNOffset

func (s *BPMH) BPMSVNOffset() uint64

BPMSVNOffset returns the offset in bytes of field BPMSVN

func (*BPMH) BPMSVNTotalSize

func (s *BPMH) BPMSVNTotalSize() uint64

BPMSVNSize returns the size in bytes of the value of field BPMSVN

func (*BPMH) GetStructInfo

func (s *BPMH) GetStructInfo() cbnt.StructInfo

GetStructInfo returns current value of StructInfo of the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*BPMH) KeySignatureOffsetOffset

func (s *BPMH) KeySignatureOffsetOffset() uint64

KeySignatureOffsetOffset returns the offset in bytes of field KeySignatureOffset

func (*BPMH) KeySignatureOffsetTotalSize

func (s *BPMH) KeySignatureOffsetTotalSize() uint64

KeySignatureOffsetSize returns the size in bytes of the value of field KeySignatureOffset

func (*BPMH) NEMDataStackOffset

func (s *BPMH) NEMDataStackOffset() uint64

NEMDataStackOffset returns the offset in bytes of field NEMDataStack

func (*BPMH) NEMDataStackTotalSize

func (s *BPMH) NEMDataStackTotalSize() uint64

NEMDataStackSize returns the size in bytes of the value of field NEMDataStack

func (*BPMH) PrettyString

func (s *BPMH) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the content of the structure in an easy-to-read format.

func (*BPMH) ReadDataFrom

func (s *BPMH) ReadDataFrom(r io.Reader) (int64, error)

ReadDataFrom reads the BPMH from 'r' excluding StructInfo, in format defined in the document #575623.

func (*BPMH) ReadFrom

func (s *BPMH) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the BPMH from 'r' in format defined in the document #575623.

func (*BPMH) Rehash

func (s *BPMH) Rehash()

Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.

func (*BPMH) RehashRecursive

func (s *BPMH) RehashRecursive()

RehashRecursive calls Rehash (see below) recursively.

func (*BPMH) Reserved0Offset

func (s *BPMH) Reserved0Offset() uint64

Reserved0Offset returns the offset in bytes of field Reserved0

func (*BPMH) Reserved0TotalSize

func (s *BPMH) Reserved0TotalSize() uint64

Reserved0Size returns the size in bytes of the value of field Reserved0

func (*BPMH) SetStructInfo

func (s *BPMH) SetStructInfo(newStructInfo cbnt.StructInfo)

SetStructInfo sets new value of StructInfo to the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*BPMH) StructInfoOffset

func (s *BPMH) StructInfoOffset() uint64

StructInfoOffset returns the offset in bytes of field StructInfo

func (*BPMH) StructInfoTotalSize

func (s *BPMH) StructInfoTotalSize() uint64

StructInfoSize returns the size in bytes of the value of field StructInfo

func (*BPMH) TotalSize

func (s *BPMH) TotalSize() uint64

Size returns the total size of the BPMH.

func (*BPMH) Validate

func (s *BPMH) Validate() error

Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.

func (*BPMH) WriteTo

func (s *BPMH) WriteTo(w io.Writer) (int64, error)

WriteTo writes the BPMH into 'w' in format defined in the document #575623.

type BackupActionPolicy

type BackupActionPolicy uint8

func (BackupActionPolicy) PrettyString

func (v BackupActionPolicy) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (BackupActionPolicy) ReadFrom

func (v BackupActionPolicy) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the BackupActionPolicy from 'r' in binary format.

func (BackupActionPolicy) String

func (policy BackupActionPolicy) String() string

String implements fmt.Stringer.

func (BackupActionPolicy) TotalSize

func (v BackupActionPolicy) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (BackupActionPolicy) WriteTo

func (v BackupActionPolicy) WriteTo(w io.Writer) (int64, error)

WriteTo writes the BackupActionPolicy into 'w' in binary format.

type CachingType

type CachingType uint8

CachingType <TO BE DOCUMENTED>

func (CachingType) PrettyString

func (v CachingType) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (CachingType) ReadFrom

func (v CachingType) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the CachingType from 'r' in binary format.

func (CachingType) String

func (c CachingType) String() string

String implements fmt.Stringer.

func (CachingType) TotalSize

func (v CachingType) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (CachingType) WriteTo

func (v CachingType) WriteTo(w io.Writer) (int64, error)

WriteTo writes the CachingType into 'w' in binary format.

type Duration16In5Sec

type Duration16In5Sec uint16

Duration16In5Sec exports the custom type Duration16In5Sec

func (Duration16In5Sec) Duration

func (d Duration16In5Sec) Duration() time.Duration

Duration calculates a given time in multiple of 5 seconds.

func (Duration16In5Sec) PrettyString

func (v Duration16In5Sec) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (Duration16In5Sec) ReadFrom

func (v Duration16In5Sec) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the Duration16In5Sec from 'r' in binary format.

func (Duration16In5Sec) String

func (d Duration16In5Sec) String() string

func (Duration16In5Sec) TotalSize

func (v Duration16In5Sec) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (Duration16In5Sec) WriteTo

func (v Duration16In5Sec) WriteTo(w io.Writer) (int64, error)

WriteTo writes the Duration16In5Sec into 'w' in binary format.

type ExecutionProfile

type ExecutionProfile uint8

func (ExecutionProfile) PrettyString

func (v ExecutionProfile) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (ExecutionProfile) ReadFrom

func (v ExecutionProfile) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the ExecutionProfile from 'r' in binary format.

func (ExecutionProfile) String

func (p ExecutionProfile) String() string

String just implements fmt.Stringer.

func (ExecutionProfile) TotalSize

func (v ExecutionProfile) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (ExecutionProfile) WriteTo

func (v ExecutionProfile) WriteTo(w io.Writer) (int64, error)

WriteTo writes the ExecutionProfile into 'w' in binary format.

type IBBSegment

type IBBSegment struct {
	Reserved [2]byte `require:"0" json:"ibbSegReserved"`
	Flags    uint16  `json:"ibbSegFlags"`
	Base     uint32  `json:"ibbSegBase"`
	Size     uint32  `json:"ibbSegSize"`
}

IBBSegment defines a single IBB segment

func NewIBBSegment

func NewIBBSegment() *IBBSegment

NewIBBSegment returns a new instance of IBBSegment with all default values set.

func (*IBBSegment) BaseOffset

func (s *IBBSegment) BaseOffset() uint64

BaseOffset returns the offset in bytes of field Base

func (*IBBSegment) BaseTotalSize

func (s *IBBSegment) BaseTotalSize() uint64

BaseSize returns the size in bytes of the value of field Base

func (*IBBSegment) FlagsOffset

func (s *IBBSegment) FlagsOffset() uint64

FlagsOffset returns the offset in bytes of field Flags

func (*IBBSegment) FlagsTotalSize

func (s *IBBSegment) FlagsTotalSize() uint64

FlagsSize returns the size in bytes of the value of field Flags

func (*IBBSegment) PrettyString

func (s *IBBSegment) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the content of the structure in an easy-to-read format.

func (*IBBSegment) ReadFrom

func (s *IBBSegment) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the IBBSegment from 'r' in format defined in the document #575623.

func (*IBBSegment) Rehash

func (s *IBBSegment) Rehash()

Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.

func (*IBBSegment) RehashRecursive

func (s *IBBSegment) RehashRecursive()

RehashRecursive calls Rehash (see below) recursively.

func (*IBBSegment) ReservedOffset

func (s *IBBSegment) ReservedOffset() uint64

ReservedOffset returns the offset in bytes of field Reserved

func (*IBBSegment) ReservedTotalSize

func (s *IBBSegment) ReservedTotalSize() uint64

ReservedSize returns the size in bytes of the value of field Reserved

func (*IBBSegment) SizeOffset

func (s *IBBSegment) SizeOffset() uint64

SizeOffset returns the offset in bytes of field Size

func (*IBBSegment) SizeTotalSize

func (s *IBBSegment) SizeTotalSize() uint64

SizeSize returns the size in bytes of the value of field Size

func (*IBBSegment) TotalSize

func (s *IBBSegment) TotalSize() uint64

Size returns the total size of the IBBSegment.

func (*IBBSegment) Validate

func (s *IBBSegment) Validate() error

Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.

func (*IBBSegment) WriteTo

func (s *IBBSegment) WriteTo(w io.Writer) (int64, error)

WriteTo writes the IBBSegment into 'w' in format defined in the document #575623.

type Manifest

type Manifest struct {
	// BPMH is the header of the boot policy manifest
	//
	// PrettyString: BPMH: Header
	BPMH `rehashValue:"rehashedBPMH()" json:"bpmHeader"`

	SE   []SE      `json:"bpmSE"`
	TXTE *TXT      `json:"bpmTXTE,omitempty"`
	Res  *Reserved `json:"bpmReserved,omitempty"`

	// PCDE is the platform configuration data element
	//
	// PrettyString: PCDE: Platform Config Data
	PCDE *PCD `json:"bpmPCDE,omitempty"`

	// PME is the platform manufacturer element
	//
	// PrettyString: PME: Platform Manufacturer
	PME *PM `json:"bpmPME,omitempty"`

	// PMSE is the signature element
	//
	// PrettyString: PMSE: Signature
	PMSE Signature `json:"bpmSignature"`
}

Manifest is a boot policy manifest

PrettyString: Boot Policy Manifest

func NewManifest

func NewManifest() *Manifest

NewManifest returns a new instance of Manifest with all default values set.

func (*Manifest) BPMHOffset

func (s *Manifest) BPMHOffset() uint64

BPMHOffset returns the offset in bytes of field BPMH

func (*Manifest) BPMHTotalSize

func (s *Manifest) BPMHTotalSize() uint64

BPMHSize returns the size in bytes of the value of field BPMH

func (*Manifest) IBBDataRanges

func (bpm *Manifest) IBBDataRanges(firmwareSize uint64) pkgbytes.Ranges

IBBDataRanges returns data ranges of IBB.

func (*Manifest) PCDEOffset

func (s *Manifest) PCDEOffset() uint64

PCDEOffset returns the offset in bytes of field PCDE

func (*Manifest) PCDETotalSize

func (s *Manifest) PCDETotalSize() uint64

PCDESize returns the size in bytes of the value of field PCDE

func (*Manifest) PMEOffset

func (s *Manifest) PMEOffset() uint64

PMEOffset returns the offset in bytes of field PME

func (*Manifest) PMETotalSize

func (s *Manifest) PMETotalSize() uint64

PMESize returns the size in bytes of the value of field PME

func (*Manifest) PMSEOffset

func (s *Manifest) PMSEOffset() uint64

PMSEOffset returns the offset in bytes of field PMSE

func (*Manifest) PMSETotalSize

func (s *Manifest) PMSETotalSize() uint64

PMSESize returns the size in bytes of the value of field PMSE

func (*Manifest) PrettyString

func (s *Manifest) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the content of the structure in an easy-to-read format.

func (Manifest) Print

func (bpm Manifest) Print()

Print prints the Manifest

func (*Manifest) ReadFrom

func (s *Manifest) ReadFrom(r io.Reader) (returnN int64, returnErr error)

ReadFrom reads the Manifest from 'r' in format defined in the document #575623.

func (*Manifest) Rehash

func (s *Manifest) Rehash()

Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.

func (*Manifest) RehashRecursive

func (s *Manifest) RehashRecursive()

RehashRecursive calls Rehash (see below) recursively.

func (*Manifest) ResOffset

func (s *Manifest) ResOffset() uint64

ResOffset returns the offset in bytes of field Res

func (*Manifest) ResTotalSize

func (s *Manifest) ResTotalSize() uint64

ResSize returns the size in bytes of the value of field Res

func (*Manifest) SEOffset

func (s *Manifest) SEOffset() uint64

SEOffset returns the offset in bytes of field SE

func (*Manifest) SETotalSize

func (s *Manifest) SETotalSize() uint64

SESize returns the size in bytes of the value of field SE

func (Manifest) StructInfo

func (bpm Manifest) StructInfo() StructInfo

StructInfo is the information about how to parse the structure.

func (*Manifest) TXTEOffset

func (s *Manifest) TXTEOffset() uint64

TXTEOffset returns the offset in bytes of field TXTE

func (*Manifest) TXTETotalSize

func (s *Manifest) TXTETotalSize() uint64

TXTESize returns the size in bytes of the value of field TXTE

func (*Manifest) TotalSize

func (s *Manifest) TotalSize() uint64

Size returns the total size of the Manifest.

func (*Manifest) Validate

func (s *Manifest) Validate() error

Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.

func (*Manifest) ValidateIBB

func (bpm *Manifest) ValidateIBB(firmware uefi.Firmware) error

ValidateIBB returns an error if IBB segments does not match the signature

func (*Manifest) WriteTo

func (s *Manifest) WriteTo(w io.Writer) (int64, error)

WriteTo writes the Manifest into 'w' in format defined in the document #575623.

type MemoryScrubbingPolicy

type MemoryScrubbingPolicy uint8

func (MemoryScrubbingPolicy) PrettyString

func (v MemoryScrubbingPolicy) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (MemoryScrubbingPolicy) ReadFrom

func (v MemoryScrubbingPolicy) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the MemoryScrubbingPolicy from 'r' in binary format.

func (MemoryScrubbingPolicy) String

func (policy MemoryScrubbingPolicy) String() string

String implements fmt.Stringer.

func (MemoryScrubbingPolicy) TotalSize

func (v MemoryScrubbingPolicy) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (MemoryScrubbingPolicy) WriteTo

func (v MemoryScrubbingPolicy) WriteTo(w io.Writer) (int64, error)

WriteTo writes the MemoryScrubbingPolicy into 'w' in binary format.

type PBETValue

type PBETValue uint8

PBETValue <TO BE DOCUMENTED>

func (PBETValue) Duration

func (pbet PBETValue) Duration() time.Duration

Duration returns the value as time.Duration.

func (PBETValue) PBETValue

func (pbet PBETValue) PBETValue() uint8

PBETValue returns the raw value of the timer setting.

func (PBETValue) PrettyString

func (v PBETValue) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (PBETValue) ReadFrom

func (v PBETValue) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the PBETValue from 'r' in binary format.

func (*PBETValue) SetDuration

func (pbet *PBETValue) SetDuration(duration time.Duration) time.Duration

SetDuration sets the value using standard time.Duration as the input.

func (PBETValue) TotalSize

func (v PBETValue) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (PBETValue) WriteTo

func (v PBETValue) WriteTo(w io.Writer) (int64, error)

WriteTo writes the PBETValue into 'w' in binary format.

type PCD

type PCD struct {
	StructInfo `id:"__PCDS__" version:"0x20" var0:"0" var1:"uint16(s.TotalSize())"`
	Reserved0  [2]byte `json:"pcdReserved0,omitempty"`
	Data       []byte  `json:"pcdData"`
}

PCD holds various Platform Config Data.

func NewPCD

func NewPCD() *PCD

NewPCD returns a new instance of PCD with all default values set.

func (*PCD) DataOffset

func (s *PCD) DataOffset() uint64

DataOffset returns the offset in bytes of field Data

func (*PCD) DataTotalSize

func (s *PCD) DataTotalSize() uint64

DataSize returns the size in bytes of the value of field Data

func (*PCD) GetStructInfo

func (s *PCD) GetStructInfo() cbnt.StructInfo

GetStructInfo returns current value of StructInfo of the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*PCD) PrettyString

func (s *PCD) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the content of the structure in an easy-to-read format.

func (*PCD) ReadDataFrom

func (s *PCD) ReadDataFrom(r io.Reader) (int64, error)

ReadDataFrom reads the PCD from 'r' excluding StructInfo, in format defined in the document #575623.

func (*PCD) ReadFrom

func (s *PCD) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the PCD from 'r' in format defined in the document #575623.

func (*PCD) Rehash

func (s *PCD) Rehash()

Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.

func (*PCD) RehashRecursive

func (s *PCD) RehashRecursive()

RehashRecursive calls Rehash (see below) recursively.

func (*PCD) Reserved0Offset

func (s *PCD) Reserved0Offset() uint64

Reserved0Offset returns the offset in bytes of field Reserved0

func (*PCD) Reserved0TotalSize

func (s *PCD) Reserved0TotalSize() uint64

Reserved0Size returns the size in bytes of the value of field Reserved0

func (*PCD) SetStructInfo

func (s *PCD) SetStructInfo(newStructInfo cbnt.StructInfo)

SetStructInfo sets new value of StructInfo to the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*PCD) StructInfoOffset

func (s *PCD) StructInfoOffset() uint64

StructInfoOffset returns the offset in bytes of field StructInfo

func (*PCD) StructInfoTotalSize

func (s *PCD) StructInfoTotalSize() uint64

StructInfoSize returns the size in bytes of the value of field StructInfo

func (*PCD) TotalSize

func (s *PCD) TotalSize() uint64

Size returns the total size of the PCD.

func (*PCD) Validate

func (s *PCD) Validate() error

Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.

func (*PCD) WriteTo

func (s *PCD) WriteTo(w io.Writer) (int64, error)

WriteTo writes the PCD into 'w' in format defined in the document #575623.

type PM

type PM struct {
	StructInfo `id:"__PMDA__" version:"0x20" var0:"0" var1:"uint16(s.TotalSize())"`
	Reserved0  [2]byte `require:"0" json:"pcReserved0,omitempty"`
	Data       []byte  `json:"pcData"`
}

PM is the platform manufacturer data element

func NewPM

func NewPM() *PM

NewPM returns a new instance of PM with all default values set.

func (*PM) DataOffset

func (s *PM) DataOffset() uint64

DataOffset returns the offset in bytes of field Data

func (*PM) DataTotalSize

func (s *PM) DataTotalSize() uint64

DataSize returns the size in bytes of the value of field Data

func (*PM) GetStructInfo

func (s *PM) GetStructInfo() cbnt.StructInfo

GetStructInfo returns current value of StructInfo of the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*PM) PrettyString

func (s *PM) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the content of the structure in an easy-to-read format.

func (*PM) ReadDataFrom

func (s *PM) ReadDataFrom(r io.Reader) (int64, error)

ReadDataFrom reads the PM from 'r' excluding StructInfo, in format defined in the document #575623.

func (*PM) ReadFrom

func (s *PM) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the PM from 'r' in format defined in the document #575623.

func (*PM) Rehash

func (s *PM) Rehash()

Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.

func (*PM) RehashRecursive

func (s *PM) RehashRecursive()

RehashRecursive calls Rehash (see below) recursively.

func (*PM) Reserved0Offset

func (s *PM) Reserved0Offset() uint64

Reserved0Offset returns the offset in bytes of field Reserved0

func (*PM) Reserved0TotalSize

func (s *PM) Reserved0TotalSize() uint64

Reserved0Size returns the size in bytes of the value of field Reserved0

func (*PM) SetStructInfo

func (s *PM) SetStructInfo(newStructInfo cbnt.StructInfo)

SetStructInfo sets new value of StructInfo to the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*PM) StructInfoOffset

func (s *PM) StructInfoOffset() uint64

StructInfoOffset returns the offset in bytes of field StructInfo

func (*PM) StructInfoTotalSize

func (s *PM) StructInfoTotalSize() uint64

StructInfoSize returns the size in bytes of the value of field StructInfo

func (*PM) TotalSize

func (s *PM) TotalSize() uint64

Size returns the total size of the PM.

func (*PM) Validate

func (s *PM) Validate() error

Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.

func (*PM) WriteTo

func (s *PM) WriteTo(w io.Writer) (int64, error)

WriteTo writes the PM into 'w' in format defined in the document #575623.

type Reserved

type Reserved struct {
	StructInfo   `id:"__PFRS__" version:"0x21" var0:"0" var1:"uint16(s.TotalSize())"`
	ReservedData [32]byte `json:"ReservedData"`
}

Reserved is reducted

func NewReserved

func NewReserved() *Reserved

NewReserved returns a new instance of Reserved with all default values set.

func (*Reserved) GetStructInfo

func (s *Reserved) GetStructInfo() cbnt.StructInfo

GetStructInfo returns current value of StructInfo of the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*Reserved) PrettyString

func (s *Reserved) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the content of the structure in an easy-to-read format.

func (*Reserved) ReadDataFrom

func (s *Reserved) ReadDataFrom(r io.Reader) (int64, error)

ReadDataFrom reads the Reserved from 'r' excluding StructInfo, in format defined in the document #575623.

func (*Reserved) ReadFrom

func (s *Reserved) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the Reserved from 'r' in format defined in the document #575623.

func (*Reserved) Rehash

func (s *Reserved) Rehash()

Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.

func (*Reserved) RehashRecursive

func (s *Reserved) RehashRecursive()

RehashRecursive calls Rehash (see below) recursively.

func (*Reserved) ReservedDataOffset

func (s *Reserved) ReservedDataOffset() uint64

ReservedDataOffset returns the offset in bytes of field ReservedData

func (*Reserved) ReservedDataTotalSize

func (s *Reserved) ReservedDataTotalSize() uint64

ReservedDataSize returns the size in bytes of the value of field ReservedData

func (*Reserved) SetStructInfo

func (s *Reserved) SetStructInfo(newStructInfo cbnt.StructInfo)

SetStructInfo sets new value of StructInfo to the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*Reserved) StructInfoOffset

func (s *Reserved) StructInfoOffset() uint64

StructInfoOffset returns the offset in bytes of field StructInfo

func (*Reserved) StructInfoTotalSize

func (s *Reserved) StructInfoTotalSize() uint64

StructInfoSize returns the size in bytes of the value of field StructInfo

func (*Reserved) TotalSize

func (s *Reserved) TotalSize() uint64

Size returns the total size of the Reserved.

func (*Reserved) Validate

func (s *Reserved) Validate() error

Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.

func (*Reserved) WriteTo

func (s *Reserved) WriteTo(w io.Writer) (int64, error)

WriteTo writes the Reserved into 'w' in format defined in the document #575623.

type ResetAUXControl

type ResetAUXControl uint8

func (ResetAUXControl) PrettyString

func (v ResetAUXControl) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (ResetAUXControl) ReadFrom

func (v ResetAUXControl) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the ResetAUXControl from 'r' in binary format.

func (ResetAUXControl) String

func (c ResetAUXControl) String() string

String implements fmt.Stringer.

func (ResetAUXControl) TotalSize

func (v ResetAUXControl) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (ResetAUXControl) WriteTo

func (v ResetAUXControl) WriteTo(w io.Writer) (int64, error)

WriteTo writes the ResetAUXControl into 'w' in binary format.

type SE

type SE struct {
	StructInfo `id:"__IBBS__" version:"0x20" var0:"0" var1:"uint16(s.TotalSize())"`
	Reserved0  [1]byte   `require:"0" json:"seReserved0,omitempty"`
	SetNumber  uint8     `require:"0" json:"seSetNumber,omitempty"`
	Reserved1  [1]byte   `require:"0" json:"seReserved1,omitempty"`
	PBETValue  PBETValue `json:"sePBETValue"`
	Flags      SEFlags   `json:"seFlags"`

	// IBBMCHBAR <TO BE DOCUMENTED>
	// PrettyString: IBB MCHBAR
	IBBMCHBAR uint64 `json:"seIBBMCHBAR"`

	// VTdBAR <TO BE DOCUMENTED>
	// PrettyString: VT-d BAR
	VTdBAR uint64 `json:"seVTdBAR"`

	// DMAProtBase0 <TO BE DOCUMENTED>
	// PrettyString: DMA Protection 0 Base Address
	DMAProtBase0 uint32 `json:"seDMAProtBase0"`

	// DMAProtLimit0 <TO BE DOCUMENTED>
	// PrettyString: DMA Protection 0 Limit Address
	DMAProtLimit0 uint32 `json:"seDMAProtLimit0"`

	// DMAProtBase1 <TO BE DOCUMENTED>
	// PrettyString: DMA Protection 1 Base Address
	DMAProtBase1 uint64 `json:"seDMAProtBase1"`

	// DMAProtLimit1 <TO BE DOCUMENTED>
	// PrettyString: DMA Protection 2 Limit Address
	DMAProtLimit1 uint64 `json:"seDMAProtLimit1"`

	PostIBBHash cbnt.HashStructure `json:"sePostIBBHash"`

	IBBEntryPoint uint32 `json:"seIBBEntry"`

	DigestList cbnt.HashList `json:"seDigestList"`

	OBBHash cbnt.HashStructure `json:"seOBBHash"`

	Reserved2 [3]byte `require:"0" json:"seReserved2,omitempty"`

	IBBSegments []IBBSegment `countType:"uint8" json:"seIBBSegments,omitempty"`
}

SE is an IBB segments element

PrettyString: IBB Segments Element

func NewSE

func NewSE() *SE

NewSE returns a new instance of SE with all default values set.

func (*SE) DMAProtBase0Offset

func (s *SE) DMAProtBase0Offset() uint64

DMAProtBase0Offset returns the offset in bytes of field DMAProtBase0

func (*SE) DMAProtBase0TotalSize

func (s *SE) DMAProtBase0TotalSize() uint64

DMAProtBase0Size returns the size in bytes of the value of field DMAProtBase0

func (*SE) DMAProtBase1Offset

func (s *SE) DMAProtBase1Offset() uint64

DMAProtBase1Offset returns the offset in bytes of field DMAProtBase1

func (*SE) DMAProtBase1TotalSize

func (s *SE) DMAProtBase1TotalSize() uint64

DMAProtBase1Size returns the size in bytes of the value of field DMAProtBase1

func (*SE) DMAProtLimit0Offset

func (s *SE) DMAProtLimit0Offset() uint64

DMAProtLimit0Offset returns the offset in bytes of field DMAProtLimit0

func (*SE) DMAProtLimit0TotalSize

func (s *SE) DMAProtLimit0TotalSize() uint64

DMAProtLimit0Size returns the size in bytes of the value of field DMAProtLimit0

func (*SE) DMAProtLimit1Offset

func (s *SE) DMAProtLimit1Offset() uint64

DMAProtLimit1Offset returns the offset in bytes of field DMAProtLimit1

func (*SE) DMAProtLimit1TotalSize

func (s *SE) DMAProtLimit1TotalSize() uint64

DMAProtLimit1Size returns the size in bytes of the value of field DMAProtLimit1

func (*SE) DigestListOffset

func (s *SE) DigestListOffset() uint64

DigestListOffset returns the offset in bytes of field DigestList

func (*SE) DigestListTotalSize

func (s *SE) DigestListTotalSize() uint64

DigestListSize returns the size in bytes of the value of field DigestList

func (*SE) FlagsOffset

func (s *SE) FlagsOffset() uint64

FlagsOffset returns the offset in bytes of field Flags

func (*SE) FlagsTotalSize

func (s *SE) FlagsTotalSize() uint64

FlagsSize returns the size in bytes of the value of field Flags

func (*SE) GetStructInfo

func (s *SE) GetStructInfo() cbnt.StructInfo

GetStructInfo returns current value of StructInfo of the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*SE) IBBEntryPointOffset

func (s *SE) IBBEntryPointOffset() uint64

IBBEntryPointOffset returns the offset in bytes of field IBBEntryPoint

func (*SE) IBBEntryPointTotalSize

func (s *SE) IBBEntryPointTotalSize() uint64

IBBEntryPointSize returns the size in bytes of the value of field IBBEntryPoint

func (*SE) IBBMCHBAROffset

func (s *SE) IBBMCHBAROffset() uint64

IBBMCHBAROffset returns the offset in bytes of field IBBMCHBAR

func (*SE) IBBMCHBARTotalSize

func (s *SE) IBBMCHBARTotalSize() uint64

IBBMCHBARSize returns the size in bytes of the value of field IBBMCHBAR

func (*SE) IBBSegmentsOffset

func (s *SE) IBBSegmentsOffset() uint64

IBBSegmentsOffset returns the offset in bytes of field IBBSegments

func (*SE) IBBSegmentsTotalSize

func (s *SE) IBBSegmentsTotalSize() uint64

IBBSegmentsSize returns the size in bytes of the value of field IBBSegments

func (*SE) OBBHashOffset

func (s *SE) OBBHashOffset() uint64

OBBHashOffset returns the offset in bytes of field OBBHash

func (*SE) OBBHashTotalSize

func (s *SE) OBBHashTotalSize() uint64

OBBHashSize returns the size in bytes of the value of field OBBHash

func (*SE) PBETValueOffset

func (s *SE) PBETValueOffset() uint64

PBETValueOffset returns the offset in bytes of field PBETValue

func (*SE) PBETValueTotalSize

func (s *SE) PBETValueTotalSize() uint64

PBETValueSize returns the size in bytes of the value of field PBETValue

func (*SE) PostIBBHashOffset

func (s *SE) PostIBBHashOffset() uint64

PostIBBHashOffset returns the offset in bytes of field PostIBBHash

func (*SE) PostIBBHashTotalSize

func (s *SE) PostIBBHashTotalSize() uint64

PostIBBHashSize returns the size in bytes of the value of field PostIBBHash

func (*SE) PrettyString

func (s *SE) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the content of the structure in an easy-to-read format.

func (*SE) ReadDataFrom

func (s *SE) ReadDataFrom(r io.Reader) (int64, error)

ReadDataFrom reads the SE from 'r' excluding StructInfo, in format defined in the document #575623.

func (*SE) ReadFrom

func (s *SE) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the SE from 'r' in format defined in the document #575623.

func (*SE) Rehash

func (s *SE) Rehash()

Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.

func (*SE) RehashRecursive

func (s *SE) RehashRecursive()

RehashRecursive calls Rehash (see below) recursively.

func (*SE) Reserved0Offset

func (s *SE) Reserved0Offset() uint64

Reserved0Offset returns the offset in bytes of field Reserved0

func (*SE) Reserved0TotalSize

func (s *SE) Reserved0TotalSize() uint64

Reserved0Size returns the size in bytes of the value of field Reserved0

func (*SE) Reserved1Offset

func (s *SE) Reserved1Offset() uint64

Reserved1Offset returns the offset in bytes of field Reserved1

func (*SE) Reserved1TotalSize

func (s *SE) Reserved1TotalSize() uint64

Reserved1Size returns the size in bytes of the value of field Reserved1

func (*SE) Reserved2Offset

func (s *SE) Reserved2Offset() uint64

Reserved2Offset returns the offset in bytes of field Reserved2

func (*SE) Reserved2TotalSize

func (s *SE) Reserved2TotalSize() uint64

Reserved2Size returns the size in bytes of the value of field Reserved2

func (*SE) SetNumberOffset

func (s *SE) SetNumberOffset() uint64

SetNumberOffset returns the offset in bytes of field SetNumber

func (*SE) SetNumberTotalSize

func (s *SE) SetNumberTotalSize() uint64

SetNumberSize returns the size in bytes of the value of field SetNumber

func (*SE) SetStructInfo

func (s *SE) SetStructInfo(newStructInfo cbnt.StructInfo)

SetStructInfo sets new value of StructInfo to the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*SE) StructInfoOffset

func (s *SE) StructInfoOffset() uint64

StructInfoOffset returns the offset in bytes of field StructInfo

func (*SE) StructInfoTotalSize

func (s *SE) StructInfoTotalSize() uint64

StructInfoSize returns the size in bytes of the value of field StructInfo

func (*SE) TotalSize

func (s *SE) TotalSize() uint64

Size returns the total size of the SE.

func (*SE) VTdBAROffset

func (s *SE) VTdBAROffset() uint64

VTdBAROffset returns the offset in bytes of field VTdBAR

func (*SE) VTdBARTotalSize

func (s *SE) VTdBARTotalSize() uint64

VTdBARSize returns the size in bytes of the value of field VTdBAR

func (*SE) Validate

func (s *SE) Validate() error

Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.

func (*SE) WriteTo

func (s *SE) WriteTo(w io.Writer) (int64, error)

WriteTo writes the SE into 'w' in format defined in the document #575623.

type SEFlags

type SEFlags uint32

SEFlags <TO BE DOCUMENTED>

func (SEFlags) AuthorityMeasure

func (flags SEFlags) AuthorityMeasure() bool

AuthorityMeasure <TO BE DOCUMENTED>

PrettyString-true: Extend Authority Measurements into the Authority PCR 7 PrettyString-false: Do not extend into the Authority PCR 7

func (SEFlags) DMAProtection

func (flags SEFlags) DMAProtection() bool

DMAProtection <TO BE DOCUMENTED>

PrettyString-true: Enable DMA Protection PrettyString-false: Disable DMA Protection

func (SEFlags) Locality3Startup

func (flags SEFlags) Locality3Startup() bool

Locality3Startup <TO BE DOCUMENTED>

PrettyString-true: Issue TPM Start-up from Locality 3 PrettyString-false: Disabled

func (SEFlags) PrettyString

func (v SEFlags) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (SEFlags) ReadFrom

func (v SEFlags) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the SEFlags from 'r' in binary format.

func (SEFlags) Reserved0

func (flags SEFlags) Reserved0() uint32

Reserved0 <TO BE DOCUMENTED>

func (SEFlags) SupportsTopSwapRemediation

func (flags SEFlags) SupportsTopSwapRemediation() bool

SupportsTopSwapRemediation <TO BE DOCUMENTED>

PrettyString-true: BIOS supports Top Swap remediation action PrettyString-false: BIOS does not support Top Swap remediation action

func (SEFlags) TPMFailureLeavesHierarchiesEnabled

func (flags SEFlags) TPMFailureLeavesHierarchiesEnabled() bool

TPMFailureLeavesHierarchiesEnabled <TO BE DOCUMENTED>

PrettyString-true: Leave Hierarchies enabled. Cap all PCRs on failure. PrettyString-false: Do not leave enabled. Disable all Hierarchies or deactivate on failure.

func (SEFlags) TotalSize

func (v SEFlags) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (SEFlags) WriteTo

func (v SEFlags) WriteTo(w io.Writer) (int64, error)

WriteTo writes the SEFlags into 'w' in binary format.

type Signature

type Signature struct {
	StructInfo        `id:"__PMSG__" version:"0x20" var0:"0" var1:"0"`
	cbnt.KeySignature `json:"sigKeySignature"`
}

Signature contains the signature of the BPM.

func NewSignature

func NewSignature() *Signature

NewSignature returns a new instance of Signature with all default values set.

func (*Signature) GetStructInfo

func (s *Signature) GetStructInfo() cbnt.StructInfo

GetStructInfo returns current value of StructInfo of the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*Signature) KeySignatureOffset

func (s *Signature) KeySignatureOffset() uint64

KeySignatureOffset returns the offset in bytes of field KeySignature

func (*Signature) KeySignatureTotalSize

func (s *Signature) KeySignatureTotalSize() uint64

KeySignatureSize returns the size in bytes of the value of field KeySignature

func (*Signature) PrettyString

func (s *Signature) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the content of the structure in an easy-to-read format.

func (*Signature) ReadDataFrom

func (s *Signature) ReadDataFrom(r io.Reader) (int64, error)

ReadDataFrom reads the Signature from 'r' excluding StructInfo, in format defined in the document #575623.

func (*Signature) ReadFrom

func (s *Signature) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the Signature from 'r' in format defined in the document #575623.

func (*Signature) Rehash

func (s *Signature) Rehash()

Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.

func (*Signature) RehashRecursive

func (s *Signature) RehashRecursive()

RehashRecursive calls Rehash (see below) recursively.

func (*Signature) SetStructInfo

func (s *Signature) SetStructInfo(newStructInfo cbnt.StructInfo)

SetStructInfo sets new value of StructInfo to the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*Signature) StructInfoOffset

func (s *Signature) StructInfoOffset() uint64

StructInfoOffset returns the offset in bytes of field StructInfo

func (*Signature) StructInfoTotalSize

func (s *Signature) StructInfoTotalSize() uint64

StructInfoSize returns the size in bytes of the value of field StructInfo

func (*Signature) TotalSize

func (s *Signature) TotalSize() uint64

Size returns the total size of the Signature.

func (*Signature) Validate

func (s *Signature) Validate() error

Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.

func (*Signature) WriteTo

func (s *Signature) WriteTo(w io.Writer) (int64, error)

WriteTo writes the Signature into 'w' in format defined in the document #575623.

type Size4K

type Size4K uint16

Size4K is a size in units of 4096 bytes.

func NewSize4K

func NewSize4K(size uint32) Size4K

NewSize4K returns the given size as multiple of 4K

func (Size4K) InBytes

func (s Size4K) InBytes() uint32

InBytes returns the size in bytes.

func (Size4K) PrettyString

func (v Size4K) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (Size4K) ReadFrom

func (v Size4K) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the Size4K from 'r' in binary format.

func (Size4K) TotalSize

func (v Size4K) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (Size4K) WriteTo

func (v Size4K) WriteTo(w io.Writer) (int64, error)

WriteTo writes the Size4K into 'w' in binary format.

type StructInfo

type StructInfo = cbnt.StructInfo

StructInfo is the common header of any element.

type TXT

type TXT struct {
	StructInfo      `id:"__TXTS__" version:"0x21" var0:"0" var1:"uint16(s.TotalSize())"`
	Reserved0       [1]byte          `require:"0" json:"txtReserved0,omitempty"`
	SetNumber       [1]byte          `require:"0" json:"txtSetNumer,omitempty"`
	SInitMinSVNAuth uint8            `default:"0" json:"txtSVN"`
	Reserved1       [1]byte          `require:"0" json:"txtReserved1,omitempty"`
	ControlFlags    TXTControlFlags  `json:"txtFlags"`
	PwrDownInterval Duration16In5Sec `json:"txtPwrDownInterval"`
	// PrettyString: PTT CMOS Offset 0
	PTTCMOSOffset0 uint8 `default:"126" json:"txtPTTCMOSOffset0"`
	// PrettyString: PTT CMOS Offset 1
	PTTCMOSOffset1 uint8   `default:"127" json:"txtPTTCMOSOffset1"`
	ACPIBaseOffset uint16  `default:"0x400" json:"txtACPIBaseOffset,omitempty"`
	Reserved2      [2]byte `json:"txtReserved2,omitempty"`
	// PrettyString: ACPI MMIO Offset
	PwrMBaseOffset uint32        `default:"0xFE000000" json:"txtPwrMBaseOffset,omitempty"`
	DigestList     cbnt.HashList `json:"txtDigestList"`
	Reserved3      [3]byte       `require:"0" json:"txtReserved3,omitempty"`

	SegmentCount uint8 `require:"0" json:"txtSegmentCount,omitempty"`
}

TXT is the TXT element

func NewTXT

func NewTXT() *TXT

NewTXT returns a new instance of TXT with all default values set.

func (*TXT) ACPIBaseOffsetOffset

func (s *TXT) ACPIBaseOffsetOffset() uint64

ACPIBaseOffsetOffset returns the offset in bytes of field ACPIBaseOffset

func (*TXT) ACPIBaseOffsetTotalSize

func (s *TXT) ACPIBaseOffsetTotalSize() uint64

ACPIBaseOffsetSize returns the size in bytes of the value of field ACPIBaseOffset

func (*TXT) ControlFlagsOffset

func (s *TXT) ControlFlagsOffset() uint64

ControlFlagsOffset returns the offset in bytes of field ControlFlags

func (*TXT) ControlFlagsTotalSize

func (s *TXT) ControlFlagsTotalSize() uint64

ControlFlagsSize returns the size in bytes of the value of field ControlFlags

func (*TXT) DigestListOffset

func (s *TXT) DigestListOffset() uint64

DigestListOffset returns the offset in bytes of field DigestList

func (*TXT) DigestListTotalSize

func (s *TXT) DigestListTotalSize() uint64

DigestListSize returns the size in bytes of the value of field DigestList

func (*TXT) GetStructInfo

func (s *TXT) GetStructInfo() cbnt.StructInfo

GetStructInfo returns current value of StructInfo of the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*TXT) PTTCMOSOffset0Offset

func (s *TXT) PTTCMOSOffset0Offset() uint64

PTTCMOSOffset0Offset returns the offset in bytes of field PTTCMOSOffset0

func (*TXT) PTTCMOSOffset0TotalSize

func (s *TXT) PTTCMOSOffset0TotalSize() uint64

PTTCMOSOffset0Size returns the size in bytes of the value of field PTTCMOSOffset0

func (*TXT) PTTCMOSOffset1Offset

func (s *TXT) PTTCMOSOffset1Offset() uint64

PTTCMOSOffset1Offset returns the offset in bytes of field PTTCMOSOffset1

func (*TXT) PTTCMOSOffset1TotalSize

func (s *TXT) PTTCMOSOffset1TotalSize() uint64

PTTCMOSOffset1Size returns the size in bytes of the value of field PTTCMOSOffset1

func (*TXT) PrettyString

func (s *TXT) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the content of the structure in an easy-to-read format.

func (*TXT) PwrDownIntervalOffset

func (s *TXT) PwrDownIntervalOffset() uint64

PwrDownIntervalOffset returns the offset in bytes of field PwrDownInterval

func (*TXT) PwrDownIntervalTotalSize

func (s *TXT) PwrDownIntervalTotalSize() uint64

PwrDownIntervalSize returns the size in bytes of the value of field PwrDownInterval

func (*TXT) PwrMBaseOffsetOffset

func (s *TXT) PwrMBaseOffsetOffset() uint64

PwrMBaseOffsetOffset returns the offset in bytes of field PwrMBaseOffset

func (*TXT) PwrMBaseOffsetTotalSize

func (s *TXT) PwrMBaseOffsetTotalSize() uint64

PwrMBaseOffsetSize returns the size in bytes of the value of field PwrMBaseOffset

func (*TXT) ReadDataFrom

func (s *TXT) ReadDataFrom(r io.Reader) (int64, error)

ReadDataFrom reads the TXT from 'r' excluding StructInfo, in format defined in the document #575623.

func (*TXT) ReadFrom

func (s *TXT) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the TXT from 'r' in format defined in the document #575623.

func (*TXT) Rehash

func (s *TXT) Rehash()

Rehash sets values which are calculated automatically depending on the rest data. It is usually about the total size field of an element.

func (*TXT) RehashRecursive

func (s *TXT) RehashRecursive()

RehashRecursive calls Rehash (see below) recursively.

func (*TXT) Reserved0Offset

func (s *TXT) Reserved0Offset() uint64

Reserved0Offset returns the offset in bytes of field Reserved0

func (*TXT) Reserved0TotalSize

func (s *TXT) Reserved0TotalSize() uint64

Reserved0Size returns the size in bytes of the value of field Reserved0

func (*TXT) Reserved1Offset

func (s *TXT) Reserved1Offset() uint64

Reserved1Offset returns the offset in bytes of field Reserved1

func (*TXT) Reserved1TotalSize

func (s *TXT) Reserved1TotalSize() uint64

Reserved1Size returns the size in bytes of the value of field Reserved1

func (*TXT) Reserved2Offset

func (s *TXT) Reserved2Offset() uint64

Reserved2Offset returns the offset in bytes of field Reserved2

func (*TXT) Reserved2TotalSize

func (s *TXT) Reserved2TotalSize() uint64

Reserved2Size returns the size in bytes of the value of field Reserved2

func (*TXT) Reserved3Offset

func (s *TXT) Reserved3Offset() uint64

Reserved3Offset returns the offset in bytes of field Reserved3

func (*TXT) Reserved3TotalSize

func (s *TXT) Reserved3TotalSize() uint64

Reserved3Size returns the size in bytes of the value of field Reserved3

func (*TXT) SInitMinSVNAuthOffset

func (s *TXT) SInitMinSVNAuthOffset() uint64

SInitMinSVNAuthOffset returns the offset in bytes of field SInitMinSVNAuth

func (*TXT) SInitMinSVNAuthTotalSize

func (s *TXT) SInitMinSVNAuthTotalSize() uint64

SInitMinSVNAuthSize returns the size in bytes of the value of field SInitMinSVNAuth

func (*TXT) SegmentCountOffset

func (s *TXT) SegmentCountOffset() uint64

SegmentCountOffset returns the offset in bytes of field SegmentCount

func (*TXT) SegmentCountTotalSize

func (s *TXT) SegmentCountTotalSize() uint64

SegmentCountSize returns the size in bytes of the value of field SegmentCount

func (*TXT) SetNumberOffset

func (s *TXT) SetNumberOffset() uint64

SetNumberOffset returns the offset in bytes of field SetNumber

func (*TXT) SetNumberTotalSize

func (s *TXT) SetNumberTotalSize() uint64

SetNumberSize returns the size in bytes of the value of field SetNumber

func (*TXT) SetStructInfo

func (s *TXT) SetStructInfo(newStructInfo cbnt.StructInfo)

SetStructInfo sets new value of StructInfo to the structure.

StructInfo is a set of standard fields with presented in any element ("element" in terms of document #575623).

func (*TXT) StructInfoOffset

func (s *TXT) StructInfoOffset() uint64

StructInfoOffset returns the offset in bytes of field StructInfo

func (*TXT) StructInfoTotalSize

func (s *TXT) StructInfoTotalSize() uint64

StructInfoSize returns the size in bytes of the value of field StructInfo

func (*TXT) TotalSize

func (s *TXT) TotalSize() uint64

Size returns the total size of the TXT.

func (*TXT) Validate

func (s *TXT) Validate() error

Validate (recursively) checks the structure if there are any unexpected values. It returns an error if so.

func (*TXT) WriteTo

func (s *TXT) WriteTo(w io.Writer) (int64, error)

WriteTo writes the TXT into 'w' in format defined in the document #575623.

type TXTControlFlags

type TXTControlFlags uint32

func (TXTControlFlags) BackupActionPolicy

func (flags TXTControlFlags) BackupActionPolicy() BackupActionPolicy

func (TXTControlFlags) ExecutionProfile

func (flags TXTControlFlags) ExecutionProfile() ExecutionProfile

func (TXTControlFlags) IsSACMRequestedToExtendStaticPCRs

func (flags TXTControlFlags) IsSACMRequestedToExtendStaticPCRs() bool

PrettyString-true: Default setting. S-ACM is requested to extend static PCRs PrettyString-false: S-ACM is not requested to extend static PCRs

func (TXTControlFlags) MemoryScrubbingPolicy

func (flags TXTControlFlags) MemoryScrubbingPolicy() MemoryScrubbingPolicy

func (TXTControlFlags) PrettyString

func (v TXTControlFlags) PrettyString(depth uint, withHeader bool, opts ...pretty.Option) string

PrettyString returns the bits of the flags in an easy-to-read format.

func (TXTControlFlags) ReadFrom

func (v TXTControlFlags) ReadFrom(r io.Reader) (int64, error)

ReadFrom reads the TXTControlFlags from 'r' in binary format.

func (TXTControlFlags) ResetAUXControl

func (flags TXTControlFlags) ResetAUXControl() ResetAUXControl

func (TXTControlFlags) TotalSize

func (v TXTControlFlags) TotalSize() uint64

TotalSize returns the total size measured through binary.Size.

func (TXTControlFlags) WriteTo

func (v TXTControlFlags) WriteTo(w io.Writer) (int64, error)

WriteTo writes the TXTControlFlags into 'w' in binary format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL