Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Rikitav/Unified.Firmware/llms.txt
Use this file to discover all available pages before exploring further.
LoadOptionBase is the abstract base class in Unified.Firmware.BootService.LoadOption from which all UEFI load-option types derive. It models the four fields defined by the UEFI specification’s EFI_LOAD_OPTION structure — Attributes, Description, FilePathList (exposed here as Protocols), and OptionalData — and provides sensible defaults so that concrete subclasses only need to supply the values relevant to their use case.
You will rarely instantiate a LoadOptionBase subclass yourself for everyday work; FirmwareBootOption is the concrete implementation designed for that purpose. LoadOptionBase becomes relevant when you want a strongly-typed boot-entry model with additional properties mapped from OptionalData or another source — in that case, extend LoadOptionBase, add your properties, and pass the generic type parameter to FirmwareBootService.ReadLoadOption<T>() or FirmwareBootService.EnumrateBootOptions<T>().
Namespace
Properties
Gets or sets the boot-behavior flags for this load option. The default value is
See
LoadOptionAttributes.CATEGORY_BOOT, which classifies the entry as a standard boot path processed during normal startup.Combine flag members with the bitwise OR operator:| Value | Hex | Effect |
|---|---|---|
ACTIVE | 0x00000001 | The firmware will attempt to boot this entry automatically. |
FORCE_RECONNECT | 0x00000002 | All UEFI drivers are disconnected and reconnected after all Driver#### options are processed. |
HIDDEN | 0x00000008 | The entry is excluded from any boot-selection menu. |
CATEGORY | 0x00001F00 | Sub-field mask describing how the boot manager groups Boot#### load options. |
CATEGORY_BOOT | 0x00000000 | Normal boot entry (default). |
CATEGORY_APP | 0x00000100 | Selectable application, not part of the normal boot sequence. |
LoadOptionAttributes for the full flags reference.Gets or sets the human-readable name for this load option, displayed in the UEFI boot selection menu. The default value is an empty string (
string.Empty).Gets or sets the packed device-path protocol array. Corresponds to the
FilePathList field of EFI_LOAD_OPTION. The first element identifies the device and location of the EFI image; subsequent elements are optional and OS-vendor-specific. Each element is a variable-length DevicePathProtocolBase instance. The default value is an empty array ([]).Gets or sets the binary data buffer that the firmware passes verbatim to the loaded EFI image. Corresponds to the
OptionalData field of EFI_LOAD_OPTION. The firmware passes a NULL pointer to the image when this array is empty. The default value is an empty array ([]).Subclassing
To create a custom load-option type, inherit fromLoadOptionBase and add a public parameterless constructor. The deserialization infrastructure used by FirmwareBootService requires the new() constraint, so a parameterless constructor is mandatory.
FirmwareBootService methods:
LoadOptionBase itself carries no serialization logic. The marshalling layer in Unified.Firmware.BootService handles reading from and writing to NVRAM for any type that satisfies the LoadOptionBase, new() constraints. Your subclass properties that go beyond the four base fields are not automatically persisted — populate them from the base fields (e.g. by parsing Description or OptionalData) in your own code after deserialization.Related Pages
- FirmwareBootOption — the standard concrete implementation of
LoadOptionBase - LoadOptionAttributes — the
[Flags]enum for theAttributesproperty - FirmwareBootService — the static service class that reads and writes
LoadOptionBaseinstances