Skip to content

Commit 5c436c1

Browse files
committed
layout: Add MMIO memory attribute
Signed-off-by: Akira Moroo <retrage01@gmail.com>
1 parent a6f1d17 commit 5c436c1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/efi/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@ fn populate_allocator(info: &dyn bootinfo::Info, image_address: u64, image_size:
976976
layout::MemoryAttribute::Code => efi::RUNTIME_SERVICES_CODE,
977977
layout::MemoryAttribute::Data => efi::RUNTIME_SERVICES_DATA,
978978
layout::MemoryAttribute::Unusable => efi::UNUSABLE_MEMORY,
979+
layout::MemoryAttribute::Mmio => efi::MEMORY_MAPPED_IO,
979980
};
980981
ALLOCATOR.borrow_mut().allocate_pages(
981982
efi::ALLOCATE_ADDRESS,

src/layout.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33

44
use core::ops::Range;
55

6+
#[allow(dead_code)]
67
#[derive(Clone, Copy)]
78
pub enum MemoryAttribute {
89
Code,
910
Data,
10-
#[allow(dead_code)]
1111
Unusable,
12+
Mmio,
1213
}
1314

1415
#[derive(Clone, Copy)]

0 commit comments

Comments
 (0)