Documentation
¶
Overview ¶
Package fsp implements FSP info header parsing
Index ¶
Constants ¶
const ( // size of the shared part of the header across FSP spec revisions FixedInfoHeaderLength = 12 HeaderV3Length = 72 // FSP 2.0 CurrentSpecVersion = SpecVersion(0x20) HeaderV3Revision = 3 )
constants from the FSP 2.0 spec
Variables ¶
var (
Signature = [4]byte{'F', 'S', 'P', 'H'}
)
values from the FSP 2.0 spec
Functions ¶
This section is empty.
Types ¶
type ComponentAttribute ¶
type ComponentAttribute uint16
ComponentAttribute represents the component attribute.
func (ComponentAttribute) IsDebugBuild ¶
func (ca ComponentAttribute) IsDebugBuild() bool
IsDebugBuild returns true if the FSP build is a debug build, and false if it's a release build.
func (ComponentAttribute) IsTestRelease ¶
func (ca ComponentAttribute) IsTestRelease() bool
IsTestRelease returns true if the release is a test release, and false if it's an official release.
func (ComponentAttribute) String ¶
func (ca ComponentAttribute) String() string
func (ComponentAttribute) Type ¶
func (ca ComponentAttribute) Type() Type
Type returns the FSP type.
type FixedInfoHeader ¶
type FixedInfoHeader struct { Signature [4]byte HeaderLength uint32 Reserved1 [2]uint8 SpecVersion SpecVersion HeaderRevision uint8 }
FixedInfoHeader is the common header among the various revisions of the FSP info header.
type ImageAttribute ¶
type ImageAttribute uint16
ImageAttribute represents the image attributes.
func (ImageAttribute) IsGraphicsDisplaySupported ¶
func (ia ImageAttribute) IsGraphicsDisplaySupported() bool
IsGraphicsDisplaySupported returns true if FSP supports enabling graphics display.
func (ImageAttribute) String ¶
func (ia ImageAttribute) String() string
type ImageRevision ¶
type ImageRevision uint32
ImageRevision is the image revision field of the FSP info header.
func (ImageRevision) String ¶
func (ir ImageRevision) String() string
type InfoHeaderRev3 ¶
type InfoHeaderRev3 struct { FixedInfoHeader ImageRevision ImageRevision ImageID [8]byte ImageSize uint32 ImageBase uint32 ImageAttribute ImageAttribute ComponentAttribute ComponentAttribute CfgRegionOffset uint32 CfgRegionSize uint32 Reserved2 [4]byte TempRAMInitEntryOffset uint32 Reserved3 [4]byte NotifyPhaseEntryOffset uint32 FSPMemoryInitEntryOffset uint32 TempRAMExitEntryOffset uint32 FSPSiliconInitEntryOffset uint32 }
InfoHeaderRev3 represents the FSP_INFO_HEADER structure revision 3 (FSP 2.0) as defined by Intel.
func NewInfoHeader ¶
func NewInfoHeader(b []byte) (*InfoHeaderRev3, error)
NewInfoHeader creates an InfoHeaderRev3 from a byte buffer. TODO in the future this should return a generic info header, independently from
the revision, but need to implement other header revisions first.
func (InfoHeaderRev3) Summary ¶
func (ih InfoHeaderRev3) Summary() string
Summary prints a multi-line summary of the header's content.
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