@@ -1793,15 +1793,22 @@ impl MemoryMapMeta {
1793
1793
}
1794
1794
}
1795
1795
1796
- /// An accessory to the UEFI memory map that can be either iterated or indexed
1797
- /// like an array.
1796
+ /// An accessory to the UEFI memory map and associated metadata that can be
1797
+ /// either iterated or indexed like an array.
1798
1798
///
1799
1799
/// A [`MemoryMap`] is always associated with the unique [`MemoryMapKey`]
1800
- /// bundled with the ma .
1800
+ /// bundled with the map .
1801
1801
///
1802
1802
/// To iterate over the entries, call [`MemoryMap::entries`].
1803
1803
///
1804
1804
/// ## UEFI pitfalls
1805
+ /// Note that a MemoryMap can quickly become outdated, as soon as any explicit
1806
+ /// or hidden allocation happens.
1807
+ ///
1808
+ /// As soon as boot services are excited, all previous obtained memory maps must
1809
+ /// be considered as outdated, except if the [`MemoryMapKey`] equals the one
1810
+ /// returned by `exit_boot_services()`.
1811
+ ///
1805
1812
/// **Please note** that when working with memory maps, the `entry_size` is
1806
1813
/// usually larger than `size_of::<MemoryDescriptor` [[0]]. So to be safe,
1807
1814
/// always use `entry_size` as step-size when interfacing with the memory map on
@@ -2455,7 +2462,7 @@ mod tests_mmap_real {
2455
2462
7 , 1048576 , 0 , 1792 , 15 , 0 , 10 , 8388608 , 0 , 8 , 15 , 0 , 7 , 8421376 , 0 , 3 , 15 , 0 , 10 , 8433664 ,
2456
2463
0 , 1 , 15 , 0 , 7 , 8437760 , 0 , 4 , 15 , 0 , 10 , 8454144 , 0 , 240 , 15 , 0 ,
2457
2464
] ;
2458
-
2465
+
2459
2466
#[ test]
2460
2467
fn basic_functionality ( ) {
2461
2468
let mut buf = MMAP_RAW ;
0 commit comments