aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / vendor / uefi-raw / src / protocol / memory_protection.rs
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | |
| 3 | use crate::table::boot::MemoryAttribute; |
| 4 | use crate::{Guid, PhysicalAddress, Status, guid}; |
| 5 | |
| 6 | #[derive(Debug)] |
| 7 | #[repr(C)] |
| 8 | pub 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 | |
| 31 | impl MemoryAttributeProtocol { |
| 32 | pub const GUID: Guid = guid!("f4560cf6-40ec-4b4a-a192-bf1d57d0b189"); |
| 33 | } |