We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4b08270 + 3feb78b commit ec9ffa3Copy full SHA for ec9ffa3
CHANGELOG.md
@@ -41,6 +41,8 @@
41
method has been removed; usually the `guid!` macro is a more convenient
42
choice, but `new` or `from_bytes` can also be used if needed. There are also a
43
number of new `Guid` methods.
44
+- The `MEMORY_DESCRIPTOR_VERSION` constant has been moved to
45
+ `MemoryDescriptor::VERSION`.
46
47
## uefi-macros - [Unreleased]
48
uefi/src/table/boot.rs
@@ -1893,9 +1893,6 @@ impl MemoryType {
1893
}
1894
1895
1896
-/// Memory descriptor version number
1897
-pub const MEMORY_DESCRIPTOR_VERSION: u32 = 1;
1898
-
1899
/// A structure describing a region of memory.
1900
#[derive(Debug, Copy, Clone)]
1901
#[repr(C)]
@@ -1912,6 +1909,11 @@ pub struct MemoryDescriptor {
1912
1909
pub att: MemoryAttribute,
1913
1910
1914
1911
+impl MemoryDescriptor {
+ /// Memory descriptor version number.
+ pub const VERSION: u32 = 1;
1915
+}
1916
+
1917
impl Default for MemoryDescriptor {
1918
fn default() -> MemoryDescriptor {
1919
MemoryDescriptor {
uefi/src/table/system.rs
@@ -316,7 +316,7 @@ impl SystemTable<Runtime> {
316
// See https://rust-lang.github.io/unsafe-code-guidelines/layout/arrays-and-slices.html
317
let map_size = core::mem::size_of_val(map);
318
let entry_size = core::mem::size_of::<MemoryDescriptor>();
319
- let entry_version = crate::table::boot::MEMORY_DESCRIPTOR_VERSION;
+ let entry_version = MemoryDescriptor::VERSION;
320
let map_ptr = map.as_mut_ptr();
321
((*(*self.table).runtime).set_virtual_address_map)(
322
map_size,
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments