r_efi/protocols/
memory_attribute.rs

1//! Memory Attribute Protocol
2//!
3//! Provides an interface to abstract setting or getting of memory attributes in the UEFI environment.
4
5pub 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
14pub type GetMemoryAttributes = eficall! {fn(
15    *mut Protocol,
16    crate::base::PhysicalAddress,
17    u64,
18    *mut u64,
19) -> crate::base::Status};
20
21pub type SetMemoryAttributes = eficall! {fn(
22    *mut Protocol,
23    crate::base::PhysicalAddress,
24    u64,
25    u64,
26) -> crate::base::Status};
27
28pub type ClearMemoryAttributes = eficall! {fn(
29    *mut Protocol,
30    crate::base::PhysicalAddress,
31    u64,
32    u64,
33) -> crate::base::Status};
34
35#[repr(C)]
36pub struct Protocol {
37    pub get_memory_attributes: GetMemoryAttributes,
38    pub set_memory_attributes: SetMemoryAttributes,
39    pub clear_memory_attributes: ClearMemoryAttributes,
40}