apcb

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: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTokenIDString

func GetTokenIDString(tokenID TokenID) string

GetTokenIDString returns literal representation of known Token IDs otherwise an empty string

func UpsertToken

func UpsertToken(tokenID TokenID, priorityMask PriorityMask, boardMask uint16, newValue interface{}, apcbBinary []byte) error

UpsertToken inserts a new token or updates current into apcb binary

Types

type PriorityLevel

type PriorityLevel uint8

PriorityLevel describes APCB BInary token priority level (APCB_PRIORITY_LEVEL in AGESA source code)

const (
	PriorityLevelHardForce    PriorityLevel = 1
	PriorityLevelHigh         PriorityLevel = 2
	PriorityLevelMedium       PriorityLevel = 3
	PriorityLevelEventLogging PriorityLevel = 4
	PriorityLevelLow          PriorityLevel = 5
	PriorityLevelDefault      PriorityLevel = 6
)

Defines existing APCB token priority levels

func (PriorityLevel) String

func (pl PriorityLevel) String() string

type PriorityMask

type PriorityMask uint8

PriorityMask specifies a combined set of APCBPriorityLevels

func CreatePriorityMask

func CreatePriorityMask(levels ...PriorityLevel) PriorityMask

CreatePriorityMask combines PriorityLevel into a APCBPriorityMask

func (PriorityMask) String

func (m PriorityMask) String() string

type Token

type Token struct {
	ID           TokenID
	PriorityMask PriorityMask
	BoardMask    uint16
	Value        interface{} // One of the following bool, uint8, uint16, uint32
}

Token represents an APCB token

func ParseAPCBBinaryTokens

func ParseAPCBBinaryTokens(apcbBinary []byte) ([]Token, error)

ParseAPCBBinaryTokens returns all tokens contained in the APCB Binary

func (Token) NumValue

func (t Token) NumValue() uint32

NumValue returns Token's value as uint32

type TokenID

type TokenID uint32

TokenID is a unique token identifier

const (
	TokenIDPSPMeasureConfig   TokenID = 0xDD3AD029
	TokenIDPSPEnableDebugMode TokenID = 0xD1091CD0
	TokenIDPSPErrorDisplay    TokenID = 0xDC33FF21
	TokenIDPSPStopOnError     TokenID = 0xE7024A21
)

See: AgesaPkg/Addendum/Apcb/Inc/GN/ApcbV3TokenUid.h

Jump to

Keyboard shortcuts

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