# Functions
Align aligns an address.
Align4 aligns an address to 4 bytes.
Align8 aligns an address to 8 bytes.
Checksum16 does a 16 bit checksum of the byte slice passed in.
Checksum8 does a 8 bit checksum of the slice passed in.
CreatePadFile creates an empty pad file in order to align the next file.
CreateSection creates a new section from minimal components.
Erase sets the buffer to be ErasePolarity.
FindFirmwareVolumeOffset searches for a firmware volume signature, "_FVH" using 8-byte alignment.
FindMEDescriptor searches for an Intel ME FTP signature.
FindSignature searches for an Intel flash signature.
IsErased check if the buffer is ErasePolarity.
MakeTyped takes a Firmware interface and makes a (type, value) pair.
MarshalFirmware marshals the firmware element to JSON, including the type information at the top.
NewBIOSPadding parses a sequence of bytes and returns a BIOSPadding object.
NewBIOSRegion parses a sequence of bytes and returns a Region object, if a valid one is passed, or an error.
NewFile parses a sequence of bytes and returns a File object, if a valid one is passed, or an error.
NewFirmwareVolume parses a sequence of bytes and returns a FirmwareVolume object, if a valid one is passed, or an error.
NewFlashDescriptorMap initializes a FlashDescriptor from a slice of bytes.
NewFlashImage tries to create a FlashImage structure, and returns a FlashImage and an error if any.
NewFlashMasterSection parses a sequence of bytes and returns a FlashMasterSection object, if a valid one is passed, or an error.
NewFlashParams initializes a FlashParam struct from a slice of bytes.
NewFlashRegionSection initializes a FlashRegionSection from a slice of bytes.
NewMEFPT tries to create a MEFPT.
NewMERegion creates a new region.
NewNVarStore parses a sequence of bytes and returns an NVarStore object, if a valid one is passed, or an error.
NewRawRegion creates a new region.
NewSection parses a sequence of bytes and returns a Section object, if a valid one is passed, or an error.
Parse exposes a high-level parser for generic firmware types.
Read3Size reads a 3-byte size and returns it as a uint64.
SetErasePolarity sets the Erase Polarity for the flash image.
UnmarshalFirmware unmarshals the firmware element from JSON, using the type information at the top.
Write3Size writes a size into a 3-byte array.
# Constants
Types.
EmptyBodyChecksum is the value placed in the File IntegrityCheck field if the body checksum bit isn't set.
FileHeaderExtMinLength is the minimum length of an extended firmware file header.
FileHeaderMinLength is the minimum length of a firmware file header.
File State Bits.
File State Bits.
File State Bits.
File State Bits.
File State Bits.
File State Bits.
File State Bits.
FirmwareVolume constants.
FirmwareVolume constants.
+8 for the null block that terminates the block list.
FlashDescriptorLength represents the size of the descriptor region.
FlashDescriptorMapMaxBase is the maximum base address for a flash descriptor region.
FlashDescriptorMapSize is the size in byte of the FlashDescriptorMap.
FlashMasterSectionSize is the size in bytes of the FlashMaster section.
FlashParamsSize is the size of a FlashParams struct.
FlashRegionSectionSize is the size of the Region descriptor.
Flash frequency constants.
Flash frequency constants.
Flash frequency constants.
Flash frequency constants.
Flash frequency constants.
Types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI FV File types.
UEFI GUIDED Section Attributes.
UEFI GUIDED Section Attributes.
Types.
Types.
Types.
MEPartitionDescriptorMinLength is the min size of the descriptor.
MEPartitionTableEntryLength is the size of a partition table entry.
Attributes.
Attributes.
Attributes.
Extended attributes values.
Extended attributes values.
Attributes.
Extended attributes values.
Extended attributes values.
Attributes.
Attributes.
Attributes.
NVarEntrySignature value for 'NVAR' signature.
Attributes.
RegionBlockSize assumes the region struct values correspond to blocks of 0x1000 in size.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
IFD Region types.
SectionExtMinLength is the minimum length of an extended file section header.
SectionMinLength is the minimum length of a file section header.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
UEFI Section types.
# Variables
Valid FV GUIDs.
Attributes holds the global attributes.
DepExNamesToOpCodes maps the operation back to the code.
DepExOpCodes maps the numeric code to the string.
DisableDecompression disables section decompression.
Valid FV GUIDs.
Valid FV GUIDs.
Stock GUIDS.
Valid FV GUIDs.
Valid FV GUIDs.
Valid FV GUIDs.
FlashFrequencyStringMap maps frequency constants to strings.
FlashSignature is the sequence of bytes that a Flash image is expected to start with.
FVGUIDs holds common FV type names.
MEFTPSignature is the sequence of bytes that an ME Flash Partition Table is expected to start with ie "$FPT".
NamesToFileType maps from common file type strings to the actual type.
Valid FV GUIDs.
Valid FV GUIDs.
Valid FV GUIDs.
ReadOnly breaks firmware modification operations, but optimizes memory and CPU consumption for read-only operations.
SupportedFiles is a list of files types which will be parsed.
SuppressErasePolarityError forces to ignore the "conflicting erase polarities" error.
Stock GUIDS.
# Structs
BIOSPadding holds the padding in between firmware volumes This may sometimes hold data, even though it shouldn't.
BIOSRegion represents the Bios Region in the firmware.
Block describes number and size of the firmware volume blocks.
DepExOp contains one operation for the dependency expression.
File represents an EFI File.
FileHeader represents an EFI File header.
FileHeaderExtended represents an EFI File header with the large file attribute set.
FirmwareVolume represents a firmware volume.
FirmwareVolumeExtHeader contains the fields of an extended firmware volume header.
FirmwareVolumeFixedHeader contains the fixed fields of a firmware volume header.
FlashDescriptor is the main structure that represents an Intel Flash Descriptor.
FlashDescriptorMap represent an Intel flash descriptor.
FlashImage is the main structure that represents an Intel Flash image.
FlashMasterSection holds all the IDs and read/write permissions for other regions This controls whether the bios region can read/write to the ME for example.
FlashRegion holds the base and limit of every type of region.
FlashRegionSection holds the metadata of all the different flash regions like PDR, Gbe and the Bios region.
IntegrityCheck holds the two 8 bit checksums for the file header and body separately.
MEFPT is the main structure that represents an ME Flash Partition Table.
MEPartitionEntry is an entry in FTP.
MERegion implements Region for a raw chunk of bytes in the firmware image.
NVar represent an NVAR entry.
NVarHeader represents an NVAR entry header.
NVarStore represent an NVAR store.
RawRegion implements Region for a raw chunk of bytes in the firmware image.
RegionPermissions holds the read/write permissions for other regions.
ROMAttributes is used to hold global variables that apply across the whole image.
Section represents a Firmware File Section.
SectionExtHeader represents an EFI_COMMON_SECTION_HEADER2 as specified in UEFI PI Spec 3.2.4 Firmware File Section.
SectionGUIDDefined contains the type specific fields for a EFI_SECTION_GUID_DEFINED section.
SectionGUIDDefinedHeader contains the fields for a EFI_SECTION_GUID_DEFINED encapsulated section header.
SectionHeader represents an EFI_COMMON_SECTION_HEADER as specified in UEFI PI Spec 3.2.4 Firmware File Section.
TypedFirmware includes the Firmware interface's type when exporting it to JSON.
TypeSpecificHeader is used for marshalling and unmarshalling from JSON.
# Interfaces
Firmware is an interface to describe generic firmware types.
Region contains the start and end of a region in flash.
TypeHeader interface forces type specific headers to report their length.
Visitor represents an operation which can be applied to the Firmware.
# Type aliases
DepExOpCode is one opcode for the dependency expression section.
FileState (needs to be xored with Attributes.ErasePolarity).
FlashFrequency is the type used for Frequency fields.
FlashParams is a 4-byte object that holds the flash parameters information.
FlashRegionType represents the different types possible in a flash region.
FVFileType represents the different types possible in an EFI file.
GUIDEDSectionAttribute holds a GUIDED section attribute bitfield.
MEName represent 4 bytes with JSON string support.
NVarAttribute represent Attributes.
NVarEntryType represent the computed type of an NVAR entry.
NVarExtAttribute represent extended attributes.
SectionType holds a section type value.