EdidActiveProtocol.
- Breaking: The MSRV is now 1.91 for
extended_varargs_abi_support. - Breaking: Changed ABI of c-variadic function pointers from
extern "C"toextern "efiapi". - Breaking:
udp_read()'sheader_sizeparameter is now mutable. The spec declares it as in but EDK2 may shrink if the payload is too small to fill in a whole header.
Most of this release is the outcome of an LLM-assisted audit of the crate
against UEFI 2.11 and the EDK2 headers. Accordingly, the bulk of the entries
below are pointer declarations that now express who writes through a pointer and
who owns the pointee, as described in api_guidelines.md. None of them change
the ABI or the memory that the firmware sees, so adapting to them usually means
adding or dropping a cast_mut()/cast_const(). Everything under ## Changed
is breaking.
We use LLMs to find problems, not to write code we do not understand. Nothing unreviewed lands in this crate.
- HII Internal Forms Representation (IFR) bindings in
protocol::hii::ifr. EdidDiscoveredProtocol.MemoryAttribute::HOT_PLUGGABLE(UEFI 2.11) andHttpStatusCode::STATUS_429_TOO_MANY_REQUESTS.CloneandCopyderives forPciRootBridgeIoAccess.
IpAddress::new_v4and the correspondingFromimpl left 12 of the 16 union bytes uninitialized, which is undefined behavior.EdkiiIommuAttribute::INVALID_FOR_ALLOCATE_BUFFERwas always0, becausefrom_bits_truncatedrops every bit that is not a named attribute.
- The pool-allocating functions of
DevicePathUtilitiesProtocol,DevicePathToTextProtocolandDevicePathFromTextProtocol. device_pathofbuild_device_pathofExtScsiPassThruProtocol,AtaPassThruProtocolandNvmExpressPassThruProtocol.infoofGraphicsOutputProtocol::query_mode.- The result strings of
ConfigKeywordHandlerProtocol::get_data,HiiConfigAccessProtocol::extract_configandHiiConfigRoutingProtocol::{extract_config, export_config, block_to_config, get_alt_cfg}. ShellProtocol::{get_device_path_from_file_path, get_file_path_from_device_path, get_file_info}, plusShellFileHandle, which is now*mut c_voidlike the other opaque handles.host_addrofPciRootBridgeIoProtocol::allocate_buffer, which is writable memory owned by the caller.
dataofUsb2HostControllerProtocol::{bulk_transfer, isochronous_transfer, async_isochronous_transfer}is*const *mut c_void. The buffers areIN OUT; the controller writes received data into them.targetofExtScsiPassThruProtocol::get_target_lunandScsiIoProtocol::get_device_locationis*const *mut u8. The firmware fills the caller's array and only reads the pointer to it.HttpRequestOrResponse::responseandHttpAccessPoint::{ipv4_node, ipv6_node}.- The inner pointer of the outputs
registrationofBootServices::register_protocol_notify,entry_bufferofBootServices::open_protocol_informationandaddressofRuntimeServices::convert_pointer. ShellProtocol::{free_file_list, remove_dup_in_file_list}take*mut *mut ShellFileInfo, as the shell frees the list and clears the pointer.- The
new_packetoutput of the DHCP4 callback is*mut *mut Dhcp4Packet, as the driver takes ownership of the returned packet. thisofAbsolutePointerProtocol::get_state. The call consumes the state it reports: it returnsEFI_NOT_READYunless the state changed since the last call, and clears the change flag.SimplePointerProtocol::get_statealready declaresthisthis way.
- USB:
requestofUsbIoProtocol::control_transfer,dataofAsyncUsbTransferCallback, and thecontextparameters of the asynchronous transfer functions and the callback. - Boot services:
event_groupandnotify_ctxofcreate_event_ex,eventsofwait_for_event, andregistrationoflocate_protocol. virtual_mapofRuntimeServices::set_virtual_address_map.EdkiiIommuProtocol:host_addressoffree_buffer, andmappingofset_attributeandunmap.bufferofFirmwareVolumeBlock2Protocol::write.- DHCP4:
seed_packetanddelete_listofbuild, andpacketofparse. notify_handleofSimpleTextInputExProtocol::unregister_key_notify.- The
write_filebuffer ofShellProtocol. thisofSimpleTextOutputProtocol::query_mode, which only reads the protocol.
- The mode and info pointers
SimpleNetworkProtocol::mode,AbsolutePointerProtocol::mode,SimpleTextOutputProtocol::mode,GraphicsOutputProtocol::modeandGraphicsOutputProtocolMode::info, matching the other mode pointers in the crate. - The name returned by
ShellProtocol::get_guid_nameandShellFileInfo::{full_name, file_name}, which point into the shell.
PxeBaseCodeSrvlist::server_typeand theserver_typeparameter ofPxeBaseCodeSrvlist::newuse the newtype-enumPxeBaseCodeBootTypeinstead ofu16.- The callback of
UsbIoProtocol::async_interrupt_transferandUsb2HostControllerProtocol::async_interrupt_transferisOption<AsyncUsbTransferCallback>. The specification marks itOPTIONAL, and NULL cancels the transfer. HiiPackageListHeaderandHiiPackageHeaderare packed, as the specification mandates.HiiRef,HiiTimeandHiiDatemoved fromprotocol::hii::configtoprotocol::hii, andIfrTypeValuemoved toprotocol::hii::ifr.
- Added the revision constants
BlockIoProtocol::{REVISION, REVISION_2, REVISION_3}. - Added
Boolean::is_true()andBoolean::is_false()for a quick conversion of an EFI boolean to a Rust boolean.
- Breaking:
MemoryDescriptornow has a new member to ensure correct layout on all non-UEFI 32-bit targets. - Breaking: Corrected the
volatileparameter ofShellProtocol::get_aliasfromBooleanto*mut Boolean. - Breaking: The USB descriptor types in
protocol::usbare now packed to match their layout in the USB specification.ConfigDescriptorandEndpointDescriptorpreviously had a too-largesize_of. - Breaking:
HiiKeyboardLayoutandKeyDescriptorare now packed to match the layout mandated by the UEFI specification. Previously, allHiiKeyboardLayoutfields afterlayout_lengthwere at wrong offsets. - Breaking:
IfrTypeValue,HiiRef,HiiTime, andHiiDateare now packed to match the size and alignment mandated by the UEFI specification.
- Added additional derives to IOMMU types.
- Added
SimpleTextInputExProtocol. - Added
PciRootBridgeIoProtocolAttributes
- Corrected the type of the
driver_imageparameter inBootServices::connect_controllerfromHandleto*const Handle. - Corrected signature of
BootServices::exitfrom!toStatus. - We made changes to the
Booleantype, especially switching to manual implementations ofPartialEq,Eq,PartialOrd,Ord, andHashto match the type's logical properties. If you rely on the specific bit pattern, please use.0to access the underlying value. - Added
PxeBaseCodeDhcpV4Flags. - Added
PxeBaseCodeDhcpV4Packet::{DHCP_MAGIK, bootp_ident(), bootp_seconds(), bootp_flags(), dhcp_magik()}. - Added
PxeBaseCodeDhcpV6Packet::transaction_id(). - Added
AsRefimplementations toPxeBaseCodePacket. - Added
PxeBaseCodeIpFilter::{new(), ip_list()}. - Added
PxeBaseCodeSrvlist::{new(), ip_addr()}. PxeBaseCodeIcmpErrorandPxeBaseCodeTftpErrornow implementDisplayandcore::error::Error.
- Added
Tcpv4Protocol. - Added
StorageSecurityCommandProtocol. - Added
FirmwareManagementProtocol. - Added
HiiFontProtocol,HiiFontExProtocol. - Added
HiiImageProtocol,HiiImageExProtocol. - Added
HiiStringProtocol. - Added
HiiPopupProtocol. - Added
FormBrowser2Protocol. - Added new type
SerialIoProtocolRevision - Added new type
SerialIoProtocol_1_1as companion forSerialIoProtocolthat includes thedevice_type_guidparameter
- Switched
*const Selfto*mut SelfinSerialIoProtocol::set_attributes() - Switched field
revisioninSerialIoProtocolfromu32to new typeSerialIoProtocolRevision
- Breaking: Various uses of
boolhave been replaced withBoolean. - Fixing build on https://docs.rs/uefi
- Added
AllocateType. - Added
PciRootBridgeIoProtocol. - Added
ConfigKeywordHandlerProtocol. - Added
HiiConfigAccessProtocol. - Added
::octets()forIpv4Address,Ipv6Address, andMacAddressto streamline the API withcore::net. - Added
::into_core_addr()forIpAddress - Added
::into_ethernet_addr()forMacAddress - Added
::ZEROconstant forIpAddress Ipv4AddressandIpv6Addressnow implementDisplay. They use the same formatting ascore::net::{Ipv4Addr, Ipv6Addr}- Added comprehensive integration with
core::net::{IpAddr, Ipv4Addr, Ipv6Addr}viaFromimpls to better integrate uefi-raw typesIpAddress,Ipv4Address, andIpv6Addresswith the Rust ecosystem. - Added convenient
Fromimpls:[u8; 6]<-->MacAddress[u8; 32]-->MacAddress[u8; 4]-->Ipv4Address,IpAddress[u8; 16]-->Ipv6Address,IpAddress
- Added
HiiConfigRoutingProtocol.
- Breaking: The MSRV is now 1.85.1 and the crate uses the Rust 2024 edition.
- The documentation for UEFI protocols has been streamlined and improved.
- MSRV increased to 1.77.
- Added
Booleantype - Added
protocol::network::pxemodule. - Added conversions between
MacAddressand the[u8; 6]type that's more commonly used to represent MAC addresses. - Implemented
Fromconversions between thecore::netanduefi_rawIP address types. - Added
DiskInfoProtocol. - Added
ExtScsiPassThruProtocol. - Added
NvmExpressPassThruProtocol. - Added
AtaPassThruProtocol. - Added
DevicePathUtilitiesProtocol. - Added
UsbIoProtocol. - Added
Usb2HostControllerProtocol. - Added
DevicePathProtocol::length()properly constructing theu16value
DevicePathProtocolnow derivesClone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash
As of this release, the project has been relicensed from MPL-2.0 to Apache-2.0/MIT, to better align with the Rust crate ecosystem. (This does not alter the license of previous releases.) Details at #1470.
- Added
protocol::string::UnicodeCollationProtocol. - Added
protocol::tcgmodule, containing the TCG v1 and v2 protocols. - Added
DriverBindingProtocol. - Added
FirmwareVolume2Protocol. - Added
FirmwareVolumeBlock2Protocol. - Added
HiiDatabaseProtocol. - Added
ScsiIoProtocol. - Added
Defaultand other common impls for HTTP types. - Added
boot::TimerDelay.
- The definition of
BootServices::set_timernow usesTimerDelayrather than a plain integer.
- Added
DeviceTypeandDeviceSubTypeenums. - Added device path node types in the
protocol::device_pathmodule.
- Added
PAGE_SIZEconstant.
- New
MemoryTypeconstants:UNACCEPTED,MAX,RESERVED_FOR_OEM, andRESERVED_FOR_OS_LOADER.
- Added
ResetNotificationProtocol.
maximum_capsule_sizeofquery_capsule_capabilitiesnow takes a *mut u64 instead of a *mut usize.ResetTypenow derives theDefaulttrait.
- Added
TimestampProtocol. - Added
DevicePathToTextProtocolandDevicePathFromTextProtocol.
- Added
IpAddress,Ipv4Address,Ipv6Address, andMacAddresstypes. - Added
ServiceBindingProtocol,Dhcp4Protocol,HttpProtocol,Ip4Config2Protocol,TlsConfigurationProtocol, and related types. - Added
LoadFileProtocolandLoadFile2Protocol. - Added
firmware_storagemodule.
- Added
AbsolutePointerProtocol. - Added
SimpleFileSystemProtocoland related types.
{install,reinstall,uninstall}_protocol_interfacenow takeconstinterface pointers.{un}install_multiple_protocol_interfacesare now defined as c-variadic function pointers. The ABI isextern "C"until such time asextended_varargs_abi_supportis stabilized.