|
1 |
| -//! This module bundles all relevant types and helpers to work with the UEFI |
2 |
| -//! memory map. Specifically, it provides |
| 1 | +//! Bundles all relevant types and helpers to work with the UEFI memory map. |
| 2 | +//! |
| 3 | +//! To work with the memory map, you should use one of the structs |
| 4 | +//! [`MemoryMapOwned`], [`MemoryMapRef`], or [`MemoryMapRefMut`] - depending on |
| 5 | +//! your use-case. The traits [`MemoryMap`] and [`MemoryMapMut`] mainly exist |
| 6 | +//! to guarantee a streamlined API across these types. We recommend to work with |
| 7 | +//! the specific implementation. |
| 8 | +//! |
| 9 | +//! # Usecase: Obtain UEFI Memory Map |
| 10 | +//! |
| 11 | +//! You can use [`SystemTable::exit_boot_services`] or |
| 12 | +//! [`BootServices::memory_map`], which returns an properly initialized |
| 13 | +//! [`MemoryMapOwned`]. |
| 14 | +//! |
| 15 | +//! # Usecase: Parse Memory Slice as UEFI Memory Map |
| 16 | +//! |
| 17 | +//! If you have a chunk of memory and want to parse it as UEFI memory map, which |
| 18 | +//! might be the case if a bootloader such as GRUB or Limine passes its boot |
| 19 | +//! information, you can use [`MemoryMapRef`] or [`MemoryMapRefMut`]. |
| 20 | +//! TODO add constructors. |
| 21 | +//! |
| 22 | +//! # All relevant exports: |
3 | 23 | //!
|
4 | 24 | //! - the traits [`MemoryMap`] and [`MemoryMapMut`],
|
5 | 25 | //! - the trait implementations [`MemoryMapOwned`], [`MemoryMapRef`], and
|
6 | 26 | //! [`MemoryMapRefMut`],
|
7 | 27 | //! - the iterator [`MemoryMapIter`]
|
8 |
| -//! - various associated helper types, such as [`MemoryMapKey`] and |
| 28 | +//! - various associated helper types, such as [`MemoryMapKey`] and |
9 | 29 | //! [`MemoryMapMeta`],
|
10 |
| -//! - and re-exports the types [`MemoryDescriptor`], [`MemoryType`], |
11 |
| -//! [`MemoryAttribute`] |
| 30 | +//! - re-exports [`MemoryDescriptor`], [`MemoryType`], and [`MemoryAttribute`]. |
| 31 | +//! |
| 32 | +//! [`SystemTable::exit_boot_services`]: uefi::table::SystemTable::exit_boot_services |
| 33 | +//! [`BootServices::memory_map`]: uefi::table::boot::BootServices::memory_map |
12 | 34 |
|
13 | 35 | mod api;
|
14 | 36 | mod impl_;
|
|
0 commit comments