uefi

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: BSD-3-Clause Imports: 8 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrUnableToUnwrapHPSignedFile

type ErrUnableToUnwrapHPSignedFile struct{}

ErrUnableToUnwrapHPSignedFile means it was unable to find the beginning of the real image within the HP signed image container.

func (ErrUnableToUnwrapHPSignedFile) Error

type ErrZeroImage

type ErrZeroImage struct{}

ErrZeroImage means the image has no other data than zeros.

func (ErrZeroImage) Error

func (err ErrZeroImage) Error() string

type UEFI

type UEFI struct {
	// Node contains the root node of the parsed UEFI structure of the image
	ffs.Node
}

UEFI is a PCR0-measurements-aware extension over "github.com/linuxboot/fiano/pkg/uefi".

func ParseUEFIFirmwareBytes

func ParseUEFIFirmwareBytes(imageBytes []byte) (*UEFI, error)

ParseUEFIFirmwareBytes parses the UEFI firmware image from bytes

func ParseUEFIFirmwareFile

func ParseUEFIFirmwareFile(imagePath string) (*UEFI, error)

ParseUEFIFirmwareFile parses the UEFI firmware image by path `imagePath`

func (*UEFI) GetFIT

func (uefi *UEFI) GetFIT() ([]fit.Entry, error)

GetFIT returns parsed FIT-entries

func (*UEFI) ImageBytes

func (uefi *UEFI) ImageBytes() []byte

ImageBytes just returns the image as `[]byte`.

func (*UEFI) OffsetToPhysAddr

func (uefi *UEFI) OffsetToPhysAddr(offset uint64) uint64

OffsetToPhysAddr returns the `physAddr` of offset relatively to the beginning of the firmware.

func (*UEFI) PhysAddrToOffset

func (uefi *UEFI) PhysAddrToOffset(physAddr uint64) uint64

PhysAddrToOffset returns the offset of `physAddr` relatively to the beginning of the firmware.

Directories

Path Synopsis
ffs

Jump to

Keyboard shortcuts

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