UEFI Firmware Volumes: FV Headers, FFS, HOBs, and Access
Understanding the internal structure of a UEFI firmware image is essential for BIOS development, firmware debugging, platform customization, and low-level security analysis. A typical firmware image contains multiple logical regions, each serving a different purpose, from early boot code and DXE drivers to persistent configuration data.
The central abstraction is the Firmware Volume (FV), which organizes firmware code and data into a defined binary format. Firmware files inside an FV follow the Firmware File System (FFS) format, while Platform Initialization (PI) interfaces allow firmware components to discover and access these volumes during boot.
This guide examines the relationship between physical firmware devices and logical firmware volumes, the role of Firmware Volume HOBs in the PEI-to-DXE handoff, the layout of FV and FFS headers, and the protocols used to access firmware at the file and block levels. It also discusses common ROM layouts, NVRAM organization, and a platform-specific SMI mechanism encountered in some legacy AMI Aptio implementations.
The binary structures described below follow the UEFI Platform Initialization specification. Older Aptio implementations may use definitions or vendor extensions that differ from newer PI revisions, so firmware engineers should always compare the structures against the headers supplied with their target source tree.
For a broader introduction to the firmware boot sequence, see UEFI BIOS Architecture and Boot Flow.
🧩 1. Understanding Firmware Devices and Firmware Volumes #
A Firmware Device (FD) is a persistent physical storage repository containing firmware code or data. SPI NOR flash is a common example, although other types of persistent storage can also serve this purpose.
A Firmware Volume (FV) is a logical firmware storage unit defined by the PI architecture. It organizes code and data according to a specified firmware file format, allowing the firmware to locate and process individual components without depending directly on the layout of the underlying storage hardware.
1.1 Firmware Device versus Firmware Volume #
The distinction between an FD and an FV is important when analyzing a BIOS image.
A physical firmware device can be divided into multiple logical regions. Conversely, multiple physical devices can be aggregated into a larger logical storage arrangement. Firmware volumes may also be loaded into memory or extracted from other firmware files.
The relationship can be summarized as follows:
| Concept | Description |
|---|---|
| Firmware Device (FD) | Persistent physical storage containing firmware code or data |
| Firmware Volume (FV) | Logical firmware storage region containing a defined header and firmware data |
| Firmware File System (FFS) | Format that describes how files are organized inside a firmware volume |
| Firmware File | An individual component identified by a GUID and file-type metadata |
| Firmware File Section | A typed data structure within an FFS file, such as a PE32 image or compressed section |
The FV header specifies the format used to organize the volume’s contents. In an ordinary PI firmware volume, this is commonly one of the standardized FFS formats.
The official UEFI PI firmware storage specification defines the standard binary representations for firmware volumes, firmware files, and sections.
1.2 Why firmware images contain multiple volumes #
Dividing a firmware image into logical volumes allows different categories of firmware data to be managed independently.
For example, a platform may use separate volumes for recovery code, the main DXE driver collection, and other firmware components.
This arrangement can simplify firmware updates and recovery, but the actual partitioning depends on the platform design.
A single physical SPI flash chip may contain multiple firmware volumes, platform configuration regions, management-engine data, boot-recovery regions, and other vendor-specific structures. Not every region is an FV, and not every FV needs to reside in a separate physical flash device.
🔄 2. Firmware Volume HOB and the PEI-to-DXE Handoff #
The Hand-Off Block (HOB) list is a standardized mechanism for communicating initialization results and resource information between firmware phases.
A Firmware Volume HOB identifies the location and size of a firmware volume that subsequent components may need to access.
2.1 Structure of a Firmware Volume HOB #
The standard EFI_HOB_FIRMWARE_VOLUME structure contains the following fields:
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length;
} EFI_HOB_FIRMWARE_VOLUME;
The fields have the following meanings:
| Field | Description |
|---|---|
Header |
Common HOB metadata, including the HOB type and structure length |
BaseAddress |
Physical base address of the firmware volume in memory |
Length |
Total length of the firmware volume in bytes |
The generic header identifies this structure as an EFI_HOB_TYPE_FV HOB.
The base address and length let a HOB consumer identify the volume’s memory-mapped extent. The consumer can then inspect its FV header and locate the files needed for subsequent initialization.
A related EFI_HOB_FIRMWARE_VOLUME2 structure can include additional information, such as the name of the volume and the file from which an extracted FV originated.
2.2 How PEI uses firmware volume information #
During PEI, platform firmware establishes the information required by later initialization stages and builds the HOB list.
The DXE Initial Program Load (DXE IPL) PEIM uses available firmware-volume information to locate the DXE Foundation. After the DXE Foundation starts, the DXE dispatcher discovers and loads eligible DXE drivers from the firmware volumes made available to it.
The overall flow is:
PEI initialization
|
v
Discover or load firmware volumes
|
v
Create relevant FV HOBs
|
v
Construct the HOB handoff
|
v
DXE IPL locates the DXE Foundation
|
v
DXE Foundation starts
|
v
DXE dispatcher processes drivers
The HOB list is therefore more than a list of volume addresses. It is part of the formal handoff contract between firmware phases.
The producer must describe the firmware volumes required by the consumer and by the platform drivers needed to discover subsequent volumes. It should not be assumed that every reserved region in the physical flash automatically has a corresponding FV HOB.
The specification is documented in the UEFI PI HOB definitions.
🗺️ 3. ROM Layout and Firmware Volume Partitioning #
Firmware volumes can be arranged according to platform requirements, recovery needs, update policies, and the available flash capacity.
Names such as FV_RECOVERY, FV_MAIN, and FV_NVRAM are common in particular firmware projects, but they are not mandatory universal names defined by UEFI.
3.1 A representative BIOS layout #
A simplified platform might organize its firmware storage as follows:
| Region | Typical contents | Purpose |
|---|---|---|
FV_RECOVERY |
SEC, PEI, recovery-related modules | Provides the minimum code needed for early initialization and supported recovery operations |
FV_MAIN |
DXE drivers, firmware applications, option ROMs, and related sections | Contains much of the normal firmware execution environment |
| NVRAM region | Variable stores, FTW metadata, event logs, and platform configuration | Persists configuration or other platform data across reboots |
The exact arrangement varies by motherboard and firmware vendor. Some designs contain multiple main or recovery volumes, while others place configuration data in storage regions that are not formatted as conventional firmware volumes.
The physical ROM layout should therefore be derived from the actual firmware image and platform documentation rather than inferred from these example names.
3.2 Typical NVRAM organization #
Some Aptio-style firmware implementations use a dedicated flash region for persistent variable storage.
A representative layout may contain:
FTW_SPARE: A spare region used by the fault-tolerant write mechanism.FTW_WORKING: Metadata and working information required by the fault-tolerant write process.EVENT LOG: A platform-specific storage area for firmware event records, if supported.Variable: The persistent UEFI variable store.
These elements do not necessarily appear in every implementation, and a logical variable store should not be confused with the entire flash region.
The actual partition map and region sizes must be confirmed for the target firmware. A 64 KiB NVRAM layout is one possible platform configuration, not a general UEFI requirement.
3.3 Fault-Tolerant Write #
Flash devices typically impose restrictions on how data can be written. Some devices allow programmed bits to change in only one direction until the relevant block is erased.
The Fault-Tolerant Write (FTW) mechanism helps protect supported firmware-volume updates against interrupted writes.
At a high level, a fault-tolerant update uses working metadata and spare storage to preserve enough information to recover from an interrupted operation. The precise implementation depends on the firmware’s FTW driver and flash layout.
FTW does not eliminate every possible failure mode. Its guarantees depend on the storage implementation, correct configuration, and the assumptions made by the firmware update procedure.
Firmware engineers should inspect the actual FTW implementation and region definitions rather than assume every variable store uses the same spare-area layout.
🧱 4. Firmware Volume Header Structure #
Every standard PI firmware volume begins with an FV header. This header describes the volume’s length, format, capabilities, alignment information, and block organization.
The header is a primary landmark when parsing a raw firmware image.
4.1 Definition of EFI_FIRMWARE_VOLUME_HEADER
#
A current PI specification defines the structure in the following form:
typedef struct {
UINT8 ZeroVector[16];
EFI_GUID FileSystemGuid;
UINT64 FvLength;
UINT32 Signature;
EFI_FVB_ATTRIBUTES_2 Attributes;
UINT16 HeaderLength;
UINT16 Checksum;
UINT16 ExtHeaderOffset;
UINT8 Reserved[1];
UINT8 Revision;
EFI_FV_BLOCK_MAP_ENTRY BlockMap[];
} EFI_FIRMWARE_VOLUME_HEADER;
Older EFI Framework and Aptio releases may use a legacy definition with a different reserved-field arrangement. When parsing a specific BIOS image, use the definition appropriate to that firmware format rather than applying a structure blindly.
The principal fields are:
| Field | Size | Description |
|---|---|---|
ZeroVector |
16 bytes | Reserved initial vector |
FileSystemGuid |
16 bytes | Identifies the filesystem format stored in the volume |
FvLength |
8 bytes | Total FV length, including the header |
Signature |
4 bytes | FV signature, represented by the bytes _FVH |
Attributes |
4 bytes | Volume capabilities and related attributes |
HeaderLength |
2 bytes | Length of the FV header |
Checksum |
2 bytes | Header checksum |
ExtHeaderOffset |
2 bytes | Offset to the optional extended header, or zero |
Reserved |
1 byte | Reserved field in the current PI definition |
Revision |
1 byte | FV header revision |
BlockMap |
Variable | Entries describing the volume’s block layout |
The block-map array is variable-length, so the header is not fully described by the fixed-size fields alone.
4.2 Understanding the FV signature #
The signature bytes are ASCII _FVH, which correspond to the standard firmware-volume signature.
The bytes appear in this order in the image:
5F 46 56 48
When those bytes are interpreted as a little-endian 32-bit integer, the value is:
0x4856465F
This distinction matters when searching for firmware structures. A hex editor showing the raw bytes and a debugger displaying the integer field may present different-looking representations of the same value.
The signature by itself is not enough to establish that a valid FV header has been found. A parser should also verify the reported length, header length, checksum, alignment, and bounds against the available image data.
4.3 Firmware Volume block map #
Each block-map entry describes a number of blocks and the size of each block.
typedef struct {
UINT32 NumBlocks;
UINT32 BlockLength;
} EFI_FV_BLOCK_MAP_ENTRY;
A block map can contain several entries, allowing a volume to describe groups of blocks with different sizes.
For example, a map might contain:
NumBlocks = 4, BlockLength = 0x1000
NumBlocks = 8, BlockLength = 0x2000
NumBlocks = 0, BlockLength = 0
The final pair of zeros terminates the list. The example illustrates the format only; real values must be taken from the target header.
The block map describes the storage organization associated with the volume. To validate it, calculate the total size represented by the entries and compare it with the FV’s reported extent, taking account of the format’s rules.
4.4 FV header checksum and extended header #
HeaderLength specifies the complete length of the header, including the block-map data and any extended header-related structures included within that range.
The Checksum field contains the 16-bit checksum of the FV header. A valid header has a zero sum when processed according to the specified checksum rules.
If ExtHeaderOffset is nonzero, it points to the optional extended header relative to the beginning of the FV header. This extended header can contain a volume name and additional extension entries.
These fields are useful when validating a suspected volume signature or distinguishing a complete header from a coincidental byte sequence inside firmware data.
🔬 5. Analyzing an FV Header in a Firmware Dump #
When examining a raw ROM image, the FV signature provides an efficient starting point for locating candidate firmware volumes.
However, robust parsing requires more than searching for a four-byte pattern.
5.1 Interpreting the header bytes #
The first part of a standard FV header can be interpreted as follows:
| Offset | Size | Field |
|---|---|---|
0x00 |
16 bytes | ZeroVector |
0x10 |
16 bytes | FileSystemGuid |
0x20 |
8 bytes | FvLength |
0x28 |
4 bytes | Signature |
0x2C |
4 bytes | Attributes |
0x30 |
2 bytes | HeaderLength |
0x32 |
2 bytes | Checksum |
These offsets describe the common current PI header layout through the checksum field. The locations of subsequent fields should be interpreted according to the applicable definition.
The GUID fields also require attention to EFI GUID byte ordering. The first three GUID components have specific integer representations, so their raw bytes should not always be displayed as a direct left-to-right textual GUID.
5.2 Validating candidate firmware volumes #
A reliable parser should perform several checks before accepting a candidate:
- Confirm that the signature bytes are
_FVH. - Check whether the filesystem GUID identifies a supported volume format.
- Verify that
FvLengthis nonzero and fits within the available image range. - Confirm that
HeaderLengthis consistent with the available data. - Verify the header checksum.
- Inspect the block map and its terminating entry.
- Check the volume’s required alignment and any format-specific constraints.
These checks reduce false positives caused by coincidental signature bytes embedded in compressed data, executable images, or arbitrary binary content.
The total number of firmware volumes can then be estimated by enumerating validated volume boundaries, taking into account nested or extracted FVs, padding, and platform-specific regions. A simple global count of _FVH byte sequences is not a reliable volume count.
📦 6. Understanding the Firmware File System (FFS) #
The Firmware File System defines how firmware files are stored inside a supported firmware volume.
Unlike a conventional filesystem such as FAT or NTFS, the standard PI FFS format does not define a directory hierarchy. Files are organized in sequence within the volume.
6.1 Flat file organization #
An FFS file begins with an FFS file header containing a GUID and metadata that describe the file.
The file data follows the header. After accounting for the file length and required alignment, a parser can locate the next file header.
The logical sequence is:
Firmware Volume Header
|
v
FFS File A
|
v
Alignment Padding
|
v
FFS File B
|
v
FFS File C
|
v
Remaining FV space
The padding is important. The end of one file’s declared content does not necessarily coincide with the beginning of the next header because FFS file headers must be aligned on eight-byte boundaries relative to the start of the FV.
A volume can also contain free space and pad files. Parsers must account for these structures when walking the image.
6.2 Identifying files by GUID and type #
Each standard FFS file has a GUID-based name, a file type, attributes, size information, integrity metadata, and a state field.
The file type identifies the role of the file. Common types include:
| File type | Typical role |
|---|---|
EFI_FV_FILETYPE_SECURITY_CORE |
SEC-related core code |
EFI_FV_FILETYPE_PEI_CORE |
PEI Foundation |
EFI_FV_FILETYPE_DXE_CORE |
DXE Foundation |
EFI_FV_FILETYPE_PEIM |
PEI module |
EFI_FV_FILETYPE_DRIVER |
DXE driver |
EFI_FV_FILETYPE_APPLICATION |
UEFI application |
EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE |
Firmware volume image |
EFI_FV_FILETYPE_FFS_PAD |
Padding file used to manage space or alignment |
The actual contents of the file depend on the type and the file’s section structure. For example, a DXE driver is commonly stored as a PE32 or PE32+ image within a suitable firmware-file section, possibly with compression or other encapsulation.
The name GUID identifies the file, while the type field describes its general purpose. These two fields are not interchangeable.
🧱 7. FFS File Image Layout and Alignment #
A standard FFS file consists of a file header followed by file data. Depending on the file format and attributes, the header may be a standard header or an extended header for larger files.
7.1 Standard FFS file header #
The standard EFI_FFS_FILE_HEADER is 24 bytes long:
typedef struct {
EFI_GUID Name;
EFI_FFS_INTEGRITY_CHECK IntegrityCheck;
EFI_FV_FILETYPE Type;
EFI_FFS_FILE_ATTRIBUTES Attributes;
UINT8 Size[3];
EFI_FFS_FILE_STATE State;
} EFI_FFS_FILE_HEADER;
The field layout is:
| Field | Size | Description |
|---|---|---|
Name |
16 bytes | File GUID |
IntegrityCheck |
2 bytes | Header checksum and file integrity value |
Type |
1 byte | File-type identifier |
Attributes |
1 byte | File attributes |
Size |
3 bytes | File length, including the header, in 24-bit form |
State |
1 byte | State of the file in the firmware volume |
The file header is aligned on an eight-byte boundary relative to the beginning of the FV. The declared file size, however, does not need to be a multiple of eight.
A parser must round the next file-header position up to the next required eight-byte boundary after accounting for the current file’s declared length.
7.2 File size and zero-length files #
The standard Size field is a three-byte integer that describes the total file length, including the header.
A zero-length file has no data payload but still requires its 24-byte header. Its file size is therefore 24 bytes rather than zero.
The size field should be decoded according to the FFS format’s byte ordering and file-header rules. The 24-bit representation is insufficient for larger files, which use the extended format described below.
7.3 Extended FFS file headers #
The PI specification defines EFI_FFS_FILE_HEADER2 for files too large to be represented by the standard 24-bit size field.
Its structure extends the regular header with an additional 64-bit size:
typedef struct {
EFI_GUID Name;
EFI_FFS_INTEGRITY_CHECK IntegrityCheck;
EFI_FV_FILETYPE Type;
EFI_FFS_FILE_ATTRIBUTES Attributes;
UINT8 Size[3];
EFI_FFS_FILE_STATE State;
UINT64 ExtendedSize;
} EFI_FFS_FILE_HEADER2;
When the FFS_ATTRIB_LARGE_FILE attribute is set, the extended header is used, and the ordinary Size field must be zero.
The correct header size must therefore be selected from the file attributes rather than assumed to be 24 bytes for every FFS file.
In the standard PI definition, the extended header is used when the file exceeds the representable 24-bit size range. The firmware-volume filesystem format and applicable PI revision determine whether these large files are supported.
7.4 File integrity and state #
The IntegrityCheck field contains integrity information used to verify the header and, where configured, the file data.
The header checksum is calculated according to the rules defined by the PI specification. The interpretation of the file checksum depends on the FFS_ATTRIB_CHECKSUM attribute.
The State field tracks the file’s lifecycle, including whether its header is valid, its data is valid, or it has been marked for update or deletion.
These fields are important when parsing flash images because a file’s existence in the raw byte stream does not automatically mean that the firmware treats it as a valid, active file.
7.5 File tails and legacy formats #
Some older firmware formats and vendor-specific implementations may include additional integrity or tail conventions.
These should not be assumed to be part of every standard PI FFS file. Modern PI FFS definitions use the header integrity fields, file attributes, and state information described above, with extended header handling for larger files.
When analyzing an older Aptio image, confirm the applicable file-format revision and the actual implementation rather than applying a legacy file-tail interpretation universally.
🔍 8. Parsing an FFS File Header Dump #
Once an FV has been validated, the files inside it can be enumerated by walking the image from the beginning of the file region.
8.1 Interpreting the standard header #
For a standard 24-byte EFI_FFS_FILE_HEADER, the fields appear at these offsets relative to the start of the file header:
| Offset | Size | Field |
|---|---|---|
0x00 |
16 bytes | Name |
0x10 |
2 bytes | IntegrityCheck |
0x12 |
1 byte | Type |
0x13 |
1 byte | Attributes |
0x14 |
3 bytes | Size |
0x17 |
1 byte | State |
The first 16 bytes represent the file’s GUID, stored using the EFI GUID representation.
The next two bytes contain the integrity information. The type and attributes occupy one byte each, followed by the three-byte size and one-byte state.
If the large-file attribute is set, the parser must read the additional eight-byte ExtendedSize field and interpret the header accordingly.
8.2 Enumerating files safely #
A robust FFS parser should:
- Start at a validated firmware-volume data boundary.
- Read and validate the file header.
- Decode the header size based on the file attributes.
- Decode the file size and ensure it fits within the enclosing FV.
- Check the file state and relevant integrity conditions.
- Process the file’s data according to its declared type.
- Advance to the next aligned file-header position.
- Stop when the volume’s bounds or format-specific termination conditions are reached.
The parser should reject malformed lengths, integer overflows, invalid alignment, and file extents that extend beyond the volume.
This is especially important for firmware-analysis tools that process untrusted or partially corrupted images. Malformed firmware metadata should never be allowed to produce out-of-bounds reads or incorrect file boundaries.
🔌 9. Firmware Volume Block Protocol #
The Firmware Volume Block (FVB) protocol is the low-level interface for accessing the storage backing a firmware volume.
It exposes operations such as byte-range reads, writes, block-size queries, and block erasure. It also reports or modifies supported protection attributes, subject to the underlying hardware and implementation.
9.1 Main FVB operations #
The FVB interface includes operations for:
- Reading data from a specified block and offset.
- Writing data into the firmware volume.
- Determining the size and number of blocks.
- Erasing one or more blocks.
- Querying the current volume attributes.
- Setting supported access and protection attributes.
Although its read and write interfaces accept byte counts, the physical storage may impose additional constraints. Flash writes can require prior erasure, and erasure usually occurs at whole-block granularity.
The protocol must also respect any read-disable, write-disable, or lock attributes supported by the underlying firmware device.
9.2 Why FVB is considered a low-level interface #
FVB provides access to the storage itself rather than an abstraction for locating firmware files by GUID.
A driver that implements the filesystem layer can use FVB operations to access the underlying blocks and then expose a higher-level Firmware Volume Protocol to other firmware components.
This layering separates hardware-specific storage operations from the logic used to read and update files inside the volume.
FVB should not be treated as a general-purpose API for directly editing arbitrary FFS structures. Correct file updates must preserve the volume’s format, integrity requirements, alignment, write constraints, and protection policies.
📚 10. Firmware Volume Protocol #
The Firmware Volume Protocol provides a higher-level, file-oriented interface for interacting with an FV.
In the DXE environment, this is commonly exposed through EFI_FIRMWARE_VOLUME2_PROTOCOL.
The protocol hides many details of the underlying storage implementation. A firmware volume may be backed by flash, loaded into memory, or sourced from a file within another firmware volume.
10.1 File-level operations #
The protocol supports operations such as:
| Operation | Purpose |
|---|---|
ReadFile |
Reads a file identified by GUID |
ReadSection |
Reads a specified section from an FFS file |
GetNextFile |
Enumerates files within a firmware volume |
WriteFile |
Updates a file where the implementation supports writing |
GetVolumeAttributes |
Retrieves the volume’s reported attributes |
SetVolumeAttributes |
Changes supported attributes where permitted |
The actual operations available and their behavior depend on the protocol implementation, access rights, and the capabilities of the underlying storage.
For example, a read-only volume may support file enumeration and reads but reject write requests.
10.2 Relationship between FV and FVB protocols #
The two interfaces operate at different abstraction levels.
Firmware Volume Protocol
File lookup and access
|
v
Firmware filesystem layer
|
v
Firmware Volume Block Protocol
Read / write / erase blocks
|
v
Physical or mapped storage
The FVB protocol exposes lower-level block access. The FV protocol provides file-oriented operations that abstract the underlying filesystem format and storage constraints.
This separation allows DXE drivers and other firmware components to work with firmware files without needing to implement physical flash access or FFS parsing themselves.
For an example of working with storage interfaces in UEFI, see Retrieving Disk Information in UEFI Using Disk Protocols. Disk protocols and firmware-volume protocols serve different purposes, but both illustrate how standardized interfaces abstract lower-level hardware details.
🔐 11. Accessing Firmware Through Protocols or SMI #
Firmware can be accessed through different mechanisms depending on the execution environment, the operation required, and the platform’s security design.
Two broad approaches are firmware protocols in the EFI environment and platform-specific System Management Interrupt (SMI) interfaces.
11.1 Standard firmware protocol access #
Within the appropriate EFI environment, firmware components can use the Firmware Volume Protocol to locate and read files or use FVB where low-level storage access is required.
This is the preferred approach for ordinary firmware components because it uses the available firmware interfaces and respects the implementation’s reported access and protection behavior.
However, file-level access and physical flash access are not interchangeable. The ability to read an FFS file does not imply permission to rewrite the entire flash region containing it.
11.2 Operating-system access and SMM-mediated operations #
From an operating system, direct access to physical flash is subject to platform-specific hardware mapping and protection policies.
Some platforms expose firmware storage through documented operating-system interfaces or dedicated update services. Other designs use SMM-mediated operations for selected privileged firmware tasks.
An SMI can transfer control to a handler running in System Management Mode (SMM), where platform firmware performs the requested operation.
This does not make SMI a standard UEFI mechanism for arbitrary OS-level firmware access. The command format, port address, permissions, supported operations, and validation rules are platform-specific.
In particular, an OEM-specific SMI handler that permits flash writes can expose a high-impact interface. Unauthorized or incorrectly validated writes can corrupt firmware, bypass intended update controls, or make a system unbootable.
For production firmware updates, use the vendor’s documented and authenticated update mechanism rather than assuming a private SMI interface is safe or portable.
⚠️ 12. Platform-Specific SMI Flash Access in AMI Aptio 4.5 #
Some legacy AMI Aptio 4.5 implementations include OEM-specific SMI handlers for operations involving firmware flash.
A reported implementation uses an OEM-defined discovery convention involving a $ASF signature and an SMI I/O port, with 0xB2 mentioned as a fallback in that implementation.
These details are not defined by the UEFI or PI specifications and are not universal across Aptio versions or motherboard vendors. They should only be used when the relevant platform’s source code or official OEM documentation confirms the interface.
12.1 SMI command interfaces #
The supplied Aptio 4.5 example associates several private command values with flash-management operations:
| Example command | Reported operation | Description |
|---|---|---|
0x20 |
SMI_EnableFlash |
Enables a platform-specific flash-write path |
0x21 |
SMI_ReadFlash |
Requests a flash read |
0x22 |
SMI_EraseFlash |
Requests a flash-block erase |
0x23 |
SMI_WriteFlash |
Requests a flash write |
0x24 |
SMI_DisableFlash |
Disables the platform-specific write path |
0x25 |
SMI_GetFlashInfo |
Requests information about the flash device |
This table documents the reported interface of a particular implementation. It is not a standard command table for AMI Aptio, UEFI, or SMM.
The actual handler may require additional parameters, validation structures, buffer locations, state checks, or authorization conditions. Command values alone do not fully describe the protocol.
12.2 Security and reliability considerations #
An OS-triggered SMI interface that can enable, erase, or write firmware storage must be treated as a privileged firmware service.
Before investigating such an interface, confirm that the system is owned or explicitly authorized for testing, review the SMI handler implementation, and establish a recoverable firmware configuration.
Do not assume that an SMI command is authenticated or that hardware write protection is necessarily restored after an error. Those properties depend on the implementation.
For read-only analysis, prefer supported firmware-image extraction tools or vendor-documented interfaces. For firmware modification, use the approved update mechanism with image validation, recovery support, and the relevant platform protection controls.
🧭 13. Practical Workflow for Firmware Volume Analysis #
A repeatable analysis process helps avoid errors when examining a BIOS image.
13.1 Identify volume boundaries #
Start with the firmware image and locate candidate _FVH signatures.
Validate each candidate’s volume length, header length, filesystem GUID, checksum, block map, and image bounds before treating it as a valid volume.
Do not infer volume boundaries from the signature alone.
13.2 Enumerate FFS files #
For each validated FV, walk the file region using the appropriate file-header format.
Decode the file GUID, type, attributes, integrity fields, state, and size. Select the standard or extended header according to the file attributes, and advance to the next correctly aligned header.
Reject invalid sizes or file extents that exceed the parent volume.
13.3 Inspect file sections #
Many FFS files contain section headers that describe the payload. A file may contain a PE32 image, a compressed payload, a GUID-defined section, raw data, or other standardized section types.
The FFS file type tells the firmware how the file is categorized; the section type provides additional information about the data within the file.
Use the section format defined by the applicable PI revision and account for compression or guided-section processing where present.
13.4 Correlate the image with firmware metadata #
When possible, compare the parsed image against build manifests, eKernel tables, firmware-volume declarations, and platform configuration files.
This can help establish whether an FV corresponds to a recovery component, a main firmware volume, or another region.
If memory dumps are available, compare the mapped data against the original image while accounting for runtime modifications, decompression, relocation, and device-specific differences.
13.5 Keep parsing and modification separate #
A successful parse establishes the structure of an image; it does not establish that changing the image and writing it back is safe.
Before modifying a volume, account for its checksums, file state, alignment, volume attributes, erase polarity, and platform-specific update requirements.
For production systems, prefer an authenticated firmware update path with appropriate validation and recovery support.
✅ Conclusion: Understanding Firmware Volumes from Storage to Execution #
Firmware volumes are a foundational abstraction in the UEFI Platform Initialization architecture. They organize firmware code and data into logical regions that firmware components can locate and process through standardized interfaces.
The FV header describes the volume’s size, filesystem format, attributes, checksum, and block organization. The FFS format organizes files inside the volume using GUID-based names, type metadata, integrity fields, and alignment rules. Firmware Volume HOBs communicate the locations of relevant volumes between PEI and DXE, allowing later phases to discover and execute required firmware components.
The FVB and Firmware Volume Protocols provide complementary levels of access. FVB exposes low-level block operations, while the Firmware Volume Protocol offers file-oriented operations that hide the underlying storage implementation.
Legacy Aptio firmware may also provide vendor-specific SMI handlers for particular flash operations, but those mechanisms are not standard UEFI interfaces and must be handled with appropriate authorization, validation, and recovery precautions.
For firmware engineers, the key is to understand both the binary layout and the interfaces that govern how volumes are discovered, accessed, and updated. By validating FV headers, correctly parsing FFS files and sections, following the PEI-to-DXE handoff, and respecting platform protection mechanisms, developers can analyze firmware images more reliably and avoid common errors in low-level BIOS tooling.