Skip to content

Commit 0c76d94

Browse files
committed
multiboot2: fix misleading doc of efi_memory_map_tag()
1 parent 43bc66d commit 0c76d94

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

multiboot2/Changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
`Option<Result<FramebufferTag, UnknownFramebufferType>>` instead of
99
`Option<FramebufferTag>` which prevents a possible panic. If the `--unstable`
1010
feature is used, `UnknownFramebufferType` implements `core::error::Error`.
11+
- Fixed misleading documentation of the `BootInformation::efi_memory_map_tag`
12+
tag.
1113

1214
## 0.14.2 (2023-03-17)
1315
- documentation fixes

multiboot2/src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,10 @@ impl BootInformation {
276276
.map(|tag| unsafe { &*(tag as *const Tag as *const RsdpV2Tag) })
277277
}
278278

279-
/// Search for the EFI Memory map tag.
279+
/// Search for the EFI Memory map tag, if the boot services were exited.
280+
/// Otherwise, if the [`TagType::EfiBs`] tag is present, this returns `None`
281+
/// as it is strictly recommended to get the memory map from the `uefi`
282+
/// services.
280283
pub fn efi_memory_map_tag(&self) -> Option<&EFIMemoryMapTag> {
281284
// If the EFIBootServicesNotExited is present, then we should not use
282285
// the memory map, as it could still be in use.

0 commit comments

Comments
 (0)