Struct Tcg2Protocol

Source
#[repr(C)]
pub struct Tcg2Protocol { pub get_capability: unsafe extern "efiapi" fn(this: *mut Self, protocol_capability: *mut Tcg2BootServiceCapability) -> Status, pub get_event_log: unsafe extern "efiapi" fn(this: *mut Self, event_log_format: Tcg2EventLogFormat, event_log_location: *mut PhysicalAddress, event_log_last_entry: *mut PhysicalAddress, event_log_truncated: *mut u8) -> Status, pub hash_log_extend_event: unsafe extern "efiapi" fn(this: *mut Self, flags: Tcg2HashLogExtendEventFlags, data_to_hash: PhysicalAddress, data_to_hash_len: u64, event: *const c_void) -> Status, pub submit_command: unsafe extern "efiapi" fn(this: *mut Self, input_parameter_block_size: u32, input_parameter_block: *const u8, output_parameter_block_size: u32, output_parameter_block: *mut u8) -> Status, pub get_active_pcr_banks: unsafe extern "efiapi" fn(this: *mut Self, active_pcr_banks: *mut Tcg2HashAlgorithmBitmap) -> Status, pub set_active_pcr_banks: unsafe extern "efiapi" fn(this: *mut Self, active_pcr_banks: Tcg2HashAlgorithmBitmap) -> Status, pub get_result_of_set_active_pcr_banks: unsafe extern "efiapi" fn(this: *mut Self, operation_present: *mut u32, response: *mut u32) -> Status, }
Expand description

Protocol for interacting with TPM devices.

This protocol can be used for interacting with older TPM 1.1/1.2 devices, but most firmware only uses it for TPM 2.0.

The corresponding C type is EFI_TCG2_PROTOCOL.

Fields§

§get_capability: unsafe extern "efiapi" fn(this: *mut Self, protocol_capability: *mut Tcg2BootServiceCapability) -> Status§get_event_log: unsafe extern "efiapi" fn(this: *mut Self, event_log_format: Tcg2EventLogFormat, event_log_location: *mut PhysicalAddress, event_log_last_entry: *mut PhysicalAddress, event_log_truncated: *mut u8) -> Status§hash_log_extend_event: unsafe extern "efiapi" fn(this: *mut Self, flags: Tcg2HashLogExtendEventFlags, data_to_hash: PhysicalAddress, data_to_hash_len: u64, event: *const c_void) -> Status§submit_command: unsafe extern "efiapi" fn(this: *mut Self, input_parameter_block_size: u32, input_parameter_block: *const u8, output_parameter_block_size: u32, output_parameter_block: *mut u8) -> Status§get_active_pcr_banks: unsafe extern "efiapi" fn(this: *mut Self, active_pcr_banks: *mut Tcg2HashAlgorithmBitmap) -> Status§set_active_pcr_banks: unsafe extern "efiapi" fn(this: *mut Self, active_pcr_banks: Tcg2HashAlgorithmBitmap) -> Status§get_result_of_set_active_pcr_banks: unsafe extern "efiapi" fn(this: *mut Self, operation_present: *mut u32, response: *mut u32) -> Status

Implementations§

Trait Implementations§

Source§

impl Debug for Tcg2Protocol

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.