uefi_raw/protocol/
misc.rs1use crate::table::runtime;
4use crate::{Guid, Status, guid};
5
6#[derive(Debug)]
7#[repr(C)]
8pub struct TimestampProtocol {
9 pub get_timestamp: unsafe extern "efiapi" fn() -> u64,
10 pub get_properties: unsafe extern "efiapi" fn(*mut TimestampProperties) -> Status,
11}
12
13impl TimestampProtocol {
14 pub const GUID: Guid = guid!("afbfde41-2e6e-4262-ba65-62b9236e5495");
15}
16
17#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
19#[repr(C)]
20pub struct TimestampProperties {
21 pub frequency: u64,
23
24 pub end_value: u64,
27}
28
29#[derive(Debug)]
31#[repr(C)]
32pub struct ResetNotificationProtocol {
33 pub register_reset_notify:
34 unsafe extern "efiapi" fn(this: *mut Self, reset_function: ResetSystemFn) -> Status,
35 pub unregister_reset_notify:
36 unsafe extern "efiapi" fn(this: *mut Self, reset_function: ResetSystemFn) -> Status,
37}
38
39impl ResetNotificationProtocol {
40 pub const GUID: Guid = guid!("9da34ae0-eaf9-4bbf-8ec3-fd60226c44be");
41}
42
43pub type ResetSystemFn = unsafe extern "efiapi" fn(
45 rt: runtime::ResetType,
46 status: Status,
47 data_size: usize,
48 data: *const u8,
49);