- Added
PhysicalAddressandVirtualAddresstype aliases. - Added
Guid::from_bytesandGuid::to_bytes. - Added
UnalignedSlicefor representing a reference to an unaligned slice. - Added
DeviceSubType::MESSAGING_REST_SERVICEandDeviceSubType::MESSAGING_NVME_OF_NAMESPACE. - Added
MemoryAttribute::SPECIAL_PURPOSE,MemoryAttribute::CPU_CRYPTO,MemoryAttribute::ISA_VALID, andMemoryAttribute::ISA_MASK.
- Fixed the definition of
AllocateTypeso thatMaxAddressandAddressalways take a 64-bit value, regardless of target platform. - The conversion methods on
DevicePathToTextandDevicePathFromTextnow return auefi::Resultinstead of anOption. Eventis now a newtype aroundNonNull<c_void>instead of*mut c_void.- Changed
SystemTable::firmware_revisionto return au32instead of aRevision. The firmware revision's format is vendor specific and may not have the same semantics as the UEFI revision. - Changed
Revisiontorepr(transparent). - Add
Revision::EFI_2_100constant. - The
Revisiontype now implementsDisplaywith correct formatting for all UEFI versions. The customDebugimpl has been removed and replaced with a derivedDebugimpl. CStr16::from_u16_with_nul_uncheckedandcstr16!are now allowed inconstcontexts.
- Removed
UnalignedCStr16; useUnalignedSliceinstead. AnUnalignedSlice<u16>can be converted to a string withto_cstr16orto_cstring16.
- Added a
guid!macro. This is similar toGuid::from_values, but takes a more convenient string argument like theunsafe_guid!attribute macro.
-
Changed the panic handler log message to use
println!instead oferror!. This removes an extraneous file name and line number from the log message. -
Added a
loggerfeature which reflects the same feature inuefi. This allows using both crates while disablingloggerinuefi, which was previously impossible.
- Added
DerefandDerefMuttrait implementations toScopedProtocol. This eliminates the need to explicitly access theinterfacefield, which is now marked as deprecated. - Implemented
core::fmt::Writefor theSerialprotocol. - Added the
MemoryProtectionprotocol. - Added
BootServices::get_handle_for_protocol. - Added trait
EqStrUntilNuland implemented it forCStr8,CStr16, andCString16(CString8 doesn't exist yet). Now you can compare everything that isAsRef<str>(such asStringandstrfrom the standard library) to UEFI strings. Please head to the documentation ofEqStrUntilNulto find out limitations and further information. - Added
BootServices::image_handleto get the handle of the executing image. The image is set automatically by the#[entry]macro; if a program does not use that macro then it should callBootServices::set_image_handle. - Added
BootServices::open_protocol_exclusive. This provides a safe and convenient subset ofopen_protocolthat can be used whenever a resource doesn't need to be shared. In same cases sharing is useful (e.g. you might want to draw to the screen using the graphics protocol, but still allow stdout output to go to the screen as well), and in those casesopen_protocolcan still be used. - Added
DiskIoandDiskIo2protocols. - Added
HardDriveMediaDevicePathand related types. - Added
PartialOrdandOrdto the traits derived byGuid. - The
Filetrait now knows the methodsis_regular_fileandis_directory. Developers profit from this on the structFileHandle, for example.
- Marked
BootServices::handle_protocolasunsafe. (This method is also deprecated -- useopen_protocol_exclusiveoropen_protocolinstead.) - Deprecated
BootServices::locate_protocoland marked itunsafe. UseBootServices::get_handle_for_protocolandBootServices::open_protocol_exclusive(orBootServices::open_protocol) instead. - Renamed feature
ignore-logger-errorstopanic-on-logger-errorsso that it is additive. It is now a default feature. - Corrected the name of
BlockIOMedia::is_media_presettois_media_present.
- Removed the
exts::allocate_bufferfunction. This function could cause undefined behavior when called with aLayoutwith an alignment other than 1. A safe alternative is to useVec::into_boxed_slice. - Removed
Fromconversions fromucs2::ErrortoStatusandError. - Removed use of the unstable
try_trait_v2feature, which allowed?to be used withStatusin a function returninguefi::Result. This can be replaced by callingstatus.into(), orResult::from(status)in cases where the compiler needs a type hint.
- The
#[entry]macro now callsBootServices::set_image_handleto set the global image handle. Due to this change, the two arguments to main must both be named (e.g.image: Handleand_image: Handleare both OK, but not_: Handle).
- Added
print!andprintln!macros.
- The
no_panic_handlerfeature has been replaced with an additivepanic_handlerfeature. The new feature is enabled by default.
- Added EFI revision constants to
Revision.
- The table
Headerstruct'sDebugimpl now prints the correct signature. - The
BootServices::create_event_exandRuntimeServices::query_variable_infomethods now check the table version to make sure it's 2.0 or higher before calling the associated function pointers. This prevents potential invalid pointer access. - Fixed an incorrect pointer cast in the
Rngprotocol that could cause undefined behavior.
- Relaxed the version requirements for the
bitflagsandlogdependencies to allow earlier patch versions. - Enabled
doc_auto_cfgon docs.rs to show badges on items that are gated behind a feature.
- Relaxed the version requirements for the
proc-macro2,quote, andsyncdependencies to allow earlier patch versions.
- Relaxed the version requirements for the
logdependency to allow earlier patch versions.
- Added
FileHandle::into_directoryandFileHandle::into_regular_file. - Added
TimeParams,Time::invalid, andTime::is_invalid. - Added
RuntimeServices::query_variable_infoandVariableStorageInfo. - Added
DevicePathToTextandDevicePathFromText. - Added
LoadedImage::file_path - Implemented
TryFrom<Vec<u16>> for CString16. - Added
UnalignedCStr16. - Added
FilePathMediaDevicePath. - Added
DevicePath::as_acpi_device_pathandDevicePath::as_file_path_media_device_path. - Included
cstr8andcstr16macros fromuefi-macrosin the prelude. - Added
DevicePathInstance,DevicePathNode, andFfiDevicePath.
Time::newnow takes a singleTimeParamsargument so that date and time fields can be explicitly named at the call site.- The file info types now derive
PartialEqandEq. - The
FileAttributestype is nowrepr(transparent). DevicePathis now a DST that represents an entire device path. TheDevicePathInstanceandDevicePathNodeprovide views of path instances and nodes, respectively.- The methods of
Revisionare nowconst.
- Fixed undefined behavior in
proto::media::file::File::get_boxed_info.
- Added
cstr8andcstr16macros for creatingCStr8/CStr16string literals at compile time.
- Bumped
uefidependency to latest version.
- Added
PartialEqimpls forCStr16 == CStr16,&CStr16 == CString, andCString == &CStr16. - Added
Displayimpl forCString16. - Added
Handle::from_ptrandSystemTable<View>::from_ptr, which areunsafemethods for initializing from a raw pointer. - Added
CStr16::as_slice_with_nulto provide immutable access to the underlying slice. - Added
LoadedImage::load_options_as_bytesandLoadedImage::load_options_as_cstr16. - Added
Align::offset_up_to_alignment,Align::round_up_to_alignment, andAlign::align_buf. - Added
BootServices::connect_controllerandBootServices::disconnect_controller. - Added
BootServices::load_imageandLoadImageSource. Together these replaceBootServices::load_image_from_bufferand also allow an image to be loaded via theSimpleFileSystemprotocol. - Added
Rngprotocol. - Added
GptPartitionAttributesstruct and associated constants. - Added
Output::output_string_lossy. - Added
ResultExt::handle_warning.
- Updated to the 2021 edition.
File::opennow takes the filename as&CStr16instead of&str, avoiding an implicit string conversion.FileInfo::new,FileSystemInfo::new, andFileSystemVolumeLabel::newnow take theirnameparameter as&CStr16instead of&str, avoiding an implicit string conversion. Additionally, an unaligned storage buffer is now allowed as long as it is big enough to provide an aligned subslice.LoadImage::set_load_optionsnow takes au8pointer instead ofChar16.- The
Errortype is now public. - The type of
GptPartitionEntry.attributesis nowGptPartitionAttributes. - The
uefi::Resulttype now treats UEFI warnings as errors by default. Theuefi::Result::Okvariant no longer contains aCompletion, so the type behaves more like a regular RustResulttype.
- Removed
CStr16::as_stringmethod. UseToStringinstead. - Removed
FileInfoCreationError::InvalidChar. This error type is no longer needed due to the removal of implicit string conversions in file info types. - Removed
LoadedImage::load_options, useLoadedImage::load_options_as_bytesorLoadedImage::load_options_as_cstr16instead. - Removed
NamedFileProtocolInfo,FileInfoHeader,FileSystemInfoHeader, andFileSystemVolumeLabelHeader. UseFileInfo,FileSystemInfo, andFileSystemVolumeLabelinstead. - Removed
BootServices::load_image_from_buffer. UseBootServices::load_imageinstead. - Removed
Completiontype. Warnings are now treated as errors. - Removed many
ResultExtmethods, for most of them the standardResultmethods can be used instead. Useunwrapinstead ofunwrap_success,expectinstead ofexpect_success,expect_errinstead ofexpect_error, andmapinstead ofmap_inner. Thelog_warningmethod has also been removed, use the newResultExt::handle_warningmethod instead.
- Fixed compilation with Rust 1.60 by no longer enabling the
vec_spare_capacityfeature, which has been stabilized. - Fixed the header size calculated by
FileInfo::newandFileSystemInfo::new. - Fixed incorrect alignment of the volume label field in
FileSystemInfo. This caused the beginning of the string to be truncated and could result in out-of-bounds reads. - Fixed size check for file info types so that alignment padding is taken into account. This fixes potential out-of-bounds writes.
- Updated to the 2021 edition.
- Updated to the 2021 edition.