1 use crate::table::boot::MemoryAttribute;
2 use crate::{guid, Guid, PhysicalAddress, Status};
3 
4 #[derive(Debug)]
5 #[repr(C)]
6 pub struct MemoryAttributeProtocol {
7     pub get_memory_attributes: unsafe extern "efiapi" fn(
8         this: *const Self,
9         base_address: PhysicalAddress,
10         length: u64,
11         attributes: *mut MemoryAttribute,
12     ) -> Status,
13 
14     pub set_memory_attributes: unsafe extern "efiapi" fn(
15         this: *const Self,
16         base_address: PhysicalAddress,
17         length: u64,
18         attributes: MemoryAttribute,
19     ) -> Status,
20 
21     pub clear_memory_attributes: unsafe extern "efiapi" fn(
22         this: *const Self,
23         base_address: PhysicalAddress,
24         length: u64,
25         attributes: MemoryAttribute,
26     ) -> Status,
27 }
28 
29 impl MemoryAttributeProtocol {
30     pub const GUID: Guid = guid!("f4560cf6-40ec-4b4a-a192-bf1d57d0b189");
31 }
32