intelfsp

package module
v0.0.0-...-79d9838 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: LGPL-3.0 Imports: 4 Imported by: 2

Documentation

Overview

Copyright 2020 Johanna Amélie Schander <git@mimoja.de>

Copyright 2018 the LinuxBoot Authors. All rights reserved Copyright 2020 Johanna Amélie Schander <git@mimoja.de>

Copyright 2018 the LinuxBoot Authors. All rights reserved Copyright 2020 Johanna Amélie Schander <git@mimoja.de>

Copyright 2018 the LinuxBoot Authors. All rights reserved Copyright 2020 Johanna Amélie Schander <git@mimoja.de>

Copyright 2018 the LinuxBoot Authors. All rights reserved Copyright 2020 Johanna Amélie Schander <git@mimoja.de>

Index

Constants

View Source
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 BinaryExtendedFSPHeader struct {
	Signature           [4]byte
	HeaderLength        uint32
	Revision            uint8
	Reserved1           uint8
	FspProducerId       [6]byte
	FspProducerRevision uint32
	FspProducerDataSize uint32
}

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

type ImageAttributes struct {
	GraphicsSupport     *bool
	DispatchModeSupport *bool
}

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

func FindAndParse(bts []byte) []IntelFSP

func Parse

func Parse(b []byte) (*IntelFSP, error)

func (IntelFSP) Summary

func (fsp IntelFSP) Summary() string

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

type Type

type Type uint8
var (
	TypeT Type = 1
	TypeM Type = 2
	TypeS Type = 3
	TypeO Type = 8
	// TypeReserved is a fake type that represents a reserved FSP type.
	TypeReserved Type
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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