forked from rust-osdev/uefi-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uefi-raw: Add MemoryAttributeProtocol
- Loading branch information
1 parent
ccddbcc
commit 87804d3
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use crate::table::boot::MemoryAttribute; | ||
use crate::{guid, Guid, PhysicalAddress, Status}; | ||
|
||
#[repr(C)] | ||
pub struct MemoryAttributeProtocol { | ||
pub get_memory_attributes: unsafe extern "efiapi" fn( | ||
this: *const Self, | ||
base_address: PhysicalAddress, | ||
length: u64, | ||
attributes: *mut MemoryAttribute, | ||
) -> Status, | ||
|
||
pub set_memory_attributes: unsafe extern "efiapi" fn( | ||
this: *const Self, | ||
base_address: PhysicalAddress, | ||
length: u64, | ||
attributes: MemoryAttribute, | ||
) -> Status, | ||
|
||
pub clear_memory_attributes: unsafe extern "efiapi" fn( | ||
this: *const Self, | ||
base_address: PhysicalAddress, | ||
length: u64, | ||
attributes: MemoryAttribute, | ||
) -> Status, | ||
} | ||
|
||
impl MemoryAttributeProtocol { | ||
pub const GUID: Guid = guid!("f4560cf6-40ec-4b4a-a192-bf1d57d0b189"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
pub mod console; | ||
pub mod device_path; | ||
pub mod loaded_image; | ||
pub mod memory_protection; | ||
pub mod rng; |