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