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