diff options
Diffstat (limited to 'vendor/r-efi/src/protocols/timestamp.rs')
-rw-r--r-- | vendor/r-efi/src/protocols/timestamp.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/r-efi/src/protocols/timestamp.rs b/vendor/r-efi/src/protocols/timestamp.rs new file mode 100644 index 000000000..3e8f6b575 --- /dev/null +++ b/vendor/r-efi/src/protocols/timestamp.rs @@ -0,0 +1,32 @@ +//! EFI Timestamp Protocol +//! +//! The Timestamp protocol provides a platform independent interface for +//! retrieving a high resolution timestamp counter. + +pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields( + 0xafbfde41, + 0x2e6e, + 0x4262, + 0xba, + 0x65, + &[0x62, 0xb9, 0x23, 0x6e, 0x54, 0x95], +); + +#[repr(C)] +#[derive(Clone, Copy, Debug)] +pub struct Properties { + pub frequency: u64, + pub end_value: u64, +} + +pub type ProtocolGetTimestamp = eficall! {fn() -> u64}; + +pub type ProtocolGetProperties = eficall! {fn( + *mut Properties, +) -> crate::base::Status}; + +#[repr(C)] +pub struct Protocol { + pub get_timestamp: ProtocolGetTimestamp, + pub get_properties: ProtocolGetProperties, +} |