Documentation
¶
Overview ¶
Copyright 2020 Johanna Amélie Schander <[email protected]>
Copyright 2018 the LinuxBoot Authors. All rights reserved Copyright 2020 Johanna Amélie Schander <[email protected]>
Copyright 2018 the LinuxBoot Authors. All rights reserved Copyright 2020 Johanna Amélie Schander <[email protected]>
Copyright 2018 the LinuxBoot Authors. All rights reserved Copyright 2020 Johanna Amélie Schander <[email protected]>
Copyright 2018 the LinuxBoot Authors. All rights reserved Copyright 2020 Johanna Amélie Schander <[email protected]>
Index ¶
Constants ¶
const ( FSPHeaderSignature = "FSPH" FSPExtHeaderSignature = "FSPE" FixedInfoHeaderLength = 12 HeaderFSP1Length = 64 HeaderFSP2Length = 72 HeaderFSP3Length = 72 HeaderFSP4Length = 72 FixedExtendedInfoHeaderLength = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryExtendedFSPHeader ¶
type BinaryFSPHeader ¶
type BinaryFSPHeader interface {
Summary() string
GetImageSize() uint32
GetImageAttributes() *ImageAttributes
GetComponentAttributes() *ComponentAttributes
}
func ParseHeader ¶
func ParseHeader(b []byte) (*BinaryFSPHeader, error)
type CommonInfoHeader ¶
type CommonInfoHeader struct {
Signature [4]byte
HeaderLength uint32
Reserved1 uint16
SpecVersion SpecVersion
HeaderRevision HeaderRevision
}
type ComponentAttributes ¶
type ComponentAttributes struct {
ReleaseBuild bool
OfficialRelease bool
Type Type
TypeName string
}
func (ComponentAttributes) String ¶
func (ca ComponentAttributes) String() string
func (ComponentAttributes) ValidateType ¶
func (ca ComponentAttributes) ValidateType() Type
type ExtendedFSPHeader ¶
type ExtendedFSPHeader struct {
BinaryExtendedFSPHeader
FspProducerData []byte
}
func ParseExtendedHeader ¶
func ParseExtendedHeader(b []byte) (*ExtendedFSPHeader, error)
func (ExtendedFSPHeader) Summary ¶
func (eh ExtendedFSPHeader) Summary() string
type HeaderRevision ¶
type HeaderRevision uint8
ImageRevision is the image revision field of the FSP info header.
func (HeaderRevision) GetHeader ¶
func (hr HeaderRevision) GetHeader() (BinaryFSPHeader, error)
type ImageAttributes ¶
func (ImageAttributes) String ¶
func (ia ImageAttributes) String() string
type InfoHeaderV1 ¶
type InfoHeaderV1 struct {
CommonInfoHeader
ImageRevision uint32
ImageID [8]byte
ImageSize uint32
ImageBase uint32
ImageAttribute uint32
CfgRegionOffset uint32
CfgRegionSize uint32
ApiEntryNum uint32
TempRAMInitEntryOffset uint32
FspInitEntryOffset uint32
NotifyPhaseEntryOffset uint32
Reserved uint32
}
func (InfoHeaderV1) GetComponentAttributes ¶
func (ih InfoHeaderV1) GetComponentAttributes() *ComponentAttributes
func (InfoHeaderV1) GetImageAttributes ¶
func (ih InfoHeaderV1) GetImageAttributes() *ImageAttributes
func (InfoHeaderV1) GetImageSize ¶
func (ih InfoHeaderV1) GetImageSize() uint32
func (InfoHeaderV1) Summary ¶
func (ih InfoHeaderV1) Summary() string
type InfoHeaderV2 ¶
type InfoHeaderV2 struct {
CommonInfoHeader
ImageRevision uint32
ImageID [8]byte
ImageSize uint32
ImageBase uint32
ImageAttribute uint32
CfgRegionOffset uint32
CfgRegionSize uint32
ApiEntryNum uint32
TempRAMInitEntryOffset uint32
FspInitEntryOffset uint32
NotifyPhaseEntryOffset uint32
FSPMemoryInitEntryOffset uint32
TempRAMExitEntryOffset uint32
FSPSiliconInitEntryOffset uint32
}
func (InfoHeaderV2) GetComponentAttributes ¶
func (ih InfoHeaderV2) GetComponentAttributes() *ComponentAttributes
func (InfoHeaderV2) GetImageAttributes ¶
func (ih InfoHeaderV2) GetImageAttributes() *ImageAttributes
func (InfoHeaderV2) GetImageSize ¶
func (ih InfoHeaderV2) GetImageSize() uint32
func (InfoHeaderV2) Summary ¶
func (ih InfoHeaderV2) Summary() string
type InfoHeaderV3 ¶
type InfoHeaderV3 struct {
CommonInfoHeader
ImageRevision uint32
ImageID [8]byte
ImageSize uint32
ImageBase uint32
ImageAttribute uint16
ComponentAttribute uint16
CfgRegionOffset uint32
CfgRegionSize uint32
Reserved2 uint32
TempRAMInitEntryOffset uint32
Reserved3 uint32
NotifyPhaseEntryOffset uint32
FSPMemoryInitEntryOffset uint32
TempRAMExitEntryOffset uint32
FSPSiliconInitEntryOffset uint32
}
func (InfoHeaderV3) GetComponentAttributes ¶
func (ih InfoHeaderV3) GetComponentAttributes() *ComponentAttributes
func (InfoHeaderV3) GetImageAttributes ¶
func (ih InfoHeaderV3) GetImageAttributes() *ImageAttributes
func (InfoHeaderV3) GetImageSize ¶
func (ih InfoHeaderV3) GetImageSize() uint32
func (InfoHeaderV3) Summary ¶
func (ih InfoHeaderV3) Summary() string
type InfoHeaderV4 ¶
type InfoHeaderV4 struct {
InfoHeaderV3
}
func (InfoHeaderV4) GetImageAttributes ¶
func (ih InfoHeaderV4) GetImageAttributes() *ImageAttributes
type IntelFSP ¶
type IntelFSP struct {
Info *BinaryFSPHeader
ImageAttributes *ImageAttributes
ComponentAttribute *ComponentAttributes
ExtendedInfo *ExtendedFSPHeader
Raw []byte
}
func FindAndParse ¶
type SpecVersion ¶
type SpecVersion uint8
SpecVersion represents the spec version as a packed BCD two-digit, dot-separated unsigned integer.
func (SpecVersion) String ¶
func (sv SpecVersion) String() string