| 1 |
//! Memory Attribute Protocol |
| 2 |
//! |
| 3 |
//! Provides an interface to abstract setting or getting of memory attributes in the UEFI environment. |
| 4 |
|
| 5 |
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields( |
| 6 |
0xf4560cf6, |
| 7 |
0x40ec, |
| 8 |
0x4b4a, |
| 9 |
0xa1, |
| 10 |
0x92, |
| 11 |
&[0xbf, 0x1d, 0x57, 0xd0, 0xb1, 0x89], |
| 12 |
); |
| 13 |
|
| 14 |
pub type GetMemoryAttributes = eficall! {fn( |
| 15 |
*mut Protocol, |
| 16 |
crate::base::PhysicalAddress, |
| 17 |
u64, |
| 18 |
*mut u64, |
| 19 |
) -> crate::base::Status}; |
| 20 |
|
| 21 |
pub type SetMemoryAttributes = eficall! {fn( |
| 22 |
*mut Protocol, |
| 23 |
crate::base::PhysicalAddress, |
| 24 |
u64, |
| 25 |
u64, |
| 26 |
) -> crate::base::Status}; |
| 27 |
|
| 28 |
pub type ClearMemoryAttributes = eficall! {fn( |
| 29 |
*mut Protocol, |
| 30 |
crate::base::PhysicalAddress, |
| 31 |
u64, |
| 32 |
u64, |
| 33 |
) -> crate::base::Status}; |
| 34 |
|
| 35 |
#[repr(C)] |
| 36 |
pub struct Protocol { |
| 37 |
pub get_memory_attributes: GetMemoryAttributes, |
| 38 |
pub set_memory_attributes: SetMemoryAttributes, |
| 39 |
pub clear_memory_attributes: ClearMemoryAttributes, |
| 40 |
} |