edk2

package
v0.0.0-...-4df9163 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const OVMFDebugFirmware = "OVMF_CODE.4MB.debug.fd"

OVMFDebugFirmware is the debug version of the "preferred" firmware.

Variables

This section is empty.

Functions

func GetAchitectureFirmwareVarsCandidates

func GetAchitectureFirmwareVarsCandidates(hostArch int) (varsNames []string)

GetAchitectureFirmwareVarsCandidates returns a unique list of candidate vars names for hostArch for all usages. It does not check whether the associated firmware files are present on the host now. This can be used to check for the existence of previously used firmware vars files in an existing VM instance.

func GetenvEdk2Paths

func GetenvEdk2Paths(defaultPath string) []string

GetenvEdk2Paths returns a list of paths to search for VM firmwares. If LXD_QEMU_FW_PATH or LXD_OVMF_PATH env vars are set then these values are split on ":" and prefixed to the returned slice of paths. The defaultPath argument is returned as the last element in the slice.

Types

type FirmwarePair

type FirmwarePair struct {
	Code string
	Vars string
}

FirmwarePair represents a combination of firmware code (Code) and storage (Vars).

func GetArchitectureFirmwarePairsForUsage

func GetArchitectureFirmwarePairsForUsage(hostArch int, usage FirmwareUsage) []FirmwarePair

GetArchitectureFirmwarePairsForUsage returns FirmwarePair slice for a host architecture and usage combination. It only includes FirmwarePairs where both the firmware and its vars file are found on the host.

type FirmwareUsage

type FirmwareUsage int

FirmwareUsage represents the situation in which a given firmware file will be used.

const (
	// GENERIC is a generic EDK2 firmware.
	GENERIC FirmwareUsage = iota

	// SECUREBOOT is a UEFI Secure Boot enabled firmware.
	SECUREBOOT

	// CSM is a firmware with the UEFI Compatibility Support Module enabled to boot BIOS-only operating systems.
	CSM
)

type Installation

type Installation struct {
	Paths []string
	Usage map[FirmwareUsage][]FirmwarePair
}

Installation represents a set of available firmware at a given location on the system.

Jump to

Keyboard shortcuts

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