File tree 3 files changed +8
-4
lines changed
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 41
41
method has been removed; usually the ` guid! ` macro is a more convenient
42
42
choice, but ` new ` or ` from_bytes ` can also be used if needed. There are also a
43
43
number of new ` Guid ` methods.
44
+ - The ` MEMORY_DESCRIPTOR_VERSION ` constant has been moved to
45
+ ` MemoryDescriptor::VERSION ` .
44
46
45
47
## uefi-macros - [ Unreleased]
46
48
Original file line number Diff line number Diff line change @@ -1893,9 +1893,6 @@ impl MemoryType {
1893
1893
}
1894
1894
}
1895
1895
1896
- /// Memory descriptor version number
1897
- pub const MEMORY_DESCRIPTOR_VERSION : u32 = 1 ;
1898
-
1899
1896
/// A structure describing a region of memory.
1900
1897
#[ derive( Debug , Copy , Clone ) ]
1901
1898
#[ repr( C ) ]
@@ -1912,6 +1909,11 @@ pub struct MemoryDescriptor {
1912
1909
pub att : MemoryAttribute ,
1913
1910
}
1914
1911
1912
+ impl MemoryDescriptor {
1913
+ /// Memory descriptor version number.
1914
+ pub const VERSION : u32 = 1 ;
1915
+ }
1916
+
1915
1917
impl Default for MemoryDescriptor {
1916
1918
fn default ( ) -> MemoryDescriptor {
1917
1919
MemoryDescriptor {
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ impl SystemTable<Runtime> {
316
316
// See https://rust-lang.github.io/unsafe-code-guidelines/layout/arrays-and-slices.html
317
317
let map_size = core:: mem:: size_of_val ( map) ;
318
318
let entry_size = core:: mem:: size_of :: < MemoryDescriptor > ( ) ;
319
- let entry_version = crate :: table :: boot :: MEMORY_DESCRIPTOR_VERSION ;
319
+ let entry_version = MemoryDescriptor :: VERSION ;
320
320
let map_ptr = map. as_mut_ptr ( ) ;
321
321
( ( * ( * self . table ) . runtime ) . set_virtual_address_map ) (
322
322
map_size,
You can’t perform that action at this time.
0 commit comments