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 / media.rs
| 1 | // SPDX-License-Identifier: MIT OR Apache-2.0 |
| 2 | |
| 3 | use crate::protocol::device_path::DevicePathProtocol; |
| 4 | use crate::{Boolean, Guid, Status, guid}; |
| 5 | use core::ffi::c_void; |
| 6 | |
| 7 | #[derive(Debug)] |
| 8 | #[repr(C)] |
| 9 | pub struct LoadFileProtocol { |
| 10 | pub load_file: unsafe extern "efiapi" fn( |
| 11 | this: *mut Self, |
| 12 | file_path: *const DevicePathProtocol, |
| 13 | boot_policy: Boolean, |
| 14 | buffer_size: *mut usize, |
| 15 | buffer: *mut c_void, |
| 16 | ) -> Status, |
| 17 | } |
| 18 | |
| 19 | impl LoadFileProtocol { |
| 20 | pub const GUID: Guid = guid!("56ec3091-954c-11d2-8e3f-00a0c969723b"); |
| 21 | } |
| 22 | |
| 23 | #[derive(Debug)] |
| 24 | #[repr(C)] |
| 25 | pub struct LoadFile2Protocol { |
| 26 | pub load_file: unsafe extern "efiapi" fn( |
| 27 | this: *mut Self, |
| 28 | file_path: *const DevicePathProtocol, |
| 29 | boot_policy: Boolean, |
| 30 | buffer_size: *mut usize, |
| 31 | buffer: *mut c_void, |
| 32 | ) -> Status, |
| 33 | } |
| 34 | |
| 35 | impl LoadFile2Protocol { |
| 36 | pub const GUID: Guid = guid!("4006c0c1-fcb3-403e-996d-4a6c8724e06d"); |
| 37 | } |
| 38 | |
| 39 | #[derive(Debug)] |
| 40 | #[repr(C)] |
| 41 | pub struct StorageSecurityCommandProtocol { |
| 42 | pub receive_data: unsafe extern "efiapi" fn( |
| 43 | this: *mut Self, |
| 44 | media_id: u32, |
| 45 | timeout: u64, |
| 46 | security_protocol: u8, |
| 47 | security_protocol_specific_data: u16, |
| 48 | buffer_size: usize, |
| 49 | buffer: *mut c_void, |
| 50 | transfer_size: *mut usize, |
| 51 | ) -> Status, |
| 52 | |
| 53 | pub send_data: unsafe extern "efiapi" fn( |
| 54 | this: *mut Self, |
| 55 | media_id: u32, |
| 56 | timeout: u64, |
| 57 | security_protocol: u8, |
| 58 | security_protocol_specific_data: u16, |
| 59 | buffer_size: usize, |
| 60 | buffer: *const c_void, |
| 61 | ) -> Status, |
| 62 | } |
| 63 | |
| 64 | impl StorageSecurityCommandProtocol { |
| 65 | pub const GUID: Guid = guid!("c88b0b6d-0dfc-49a7-9cb4-49074b4c3a78"); |
| 66 | } |