uefi-rs/uefi
Philipp Schuster 4f8ca7069c
mem/memory_map: validate desc_size in MemoryMapOwned constructor
`from_initialized_mem` only checked that `desc_size` was large enough,
unlike the `MemoryMapRef`/`MemoryMapRefMut` constructors, which also
require it to be a multiple of the descriptor alignment. With an
unaligned `desc_size`, every entry but the first was accessed through a
misaligned `&MemoryDescriptor`.

Reuse `validate_meta` so all constructors enforce the same invariant.
2026-08-24 20:24:28 +02:00
..
src mem/memory_map: validate desc_size in MemoryMapOwned constructor 2026-08-24 20:24:28 +02:00
tests uefi-raw: make MemoryDescriptor layout portable across x86 targets 2026-08-19 08:28:13 +02:00
Cargo.toml release: uefi-raw-0.15.1 and uefi-0.39.0 2026-07-11 16:09:36 -04:00
CHANGELOG.md uefi: fix result handling of UnicodeCollation::str_to_fat 2026-08-24 10:02:38 +02:00
LICENSE-APACHE Add LICENSE-APACHE 2025-02-05 16:52:14 -05:00
LICENSE-MIT Add LICENSE-MIT 2025-02-05 16:52:14 -05:00
README.md doc: final streamlining of README files 2024-08-24 17:06:05 +02:00

uefi

Rusty wrapper for the Unified Extensible Firmware Interface.

This crate makes it easy to develop Rust software that leverages safe, convenient, and performant abstractions for UEFI functionality.

Crates.io Docs.rs License Build status Stars

Value-add and Use Cases

uefi supports writing code for both pre- and post-exit boot services epochs, but its true strength shines when you create UEFI images that heavily interact with UEFI boot services. Still, you have the flexibility to just integrate selected types and abstractions into your project, for example to parse the UEFI memory map.

Note that for producing UEFI images, you also need to use a corresponding uefi compiler target of Rust, such as x86_64-unknown-uefi.

API and User Documentation

Please refer to docs.rs for comprehensive documentation of the latest stable release. The latest not necessarily yet published documentation can be found in src/lib.rs, which can also be locally viewed by running $ cargo xtask doc --open.

For an introduction to the uefi-rs project and this repository, please refer to our main README.