tpm2_protocol/message/
clocks_and_timers.rs1use crate::{
8 data::{TpmCc, TpmClockAdjust, TpmsTimeInfo},
9 tpm_struct,
10};
11use core::fmt::Debug;
12
13tpm_struct! {
14 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
15 kind: Command,
16 name: TpmReadClockCommand,
17 cc: TpmCc::ReadClock,
18 handles: {},
19 parameters: {}
20}
21
22tpm_struct! {
23 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
24 kind: Response,
25 name: TpmReadClockResponse,
26 cc: TpmCc::ReadClock,
27 handles: {},
28 parameters: {
29 pub current_time: TpmsTimeInfo,
30 }
31}
32
33tpm_struct! {
34 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
35 kind: Command,
36 name: TpmClockSetCommand,
37 cc: TpmCc::ClockSet,
38 handles: {
39 pub auth: crate::data::TpmiRhHierarchy,
40 },
41 parameters: {
42 pub new_time: u64,
43 }
44}
45
46tpm_struct! {
47 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
48 kind: Response,
49 name: TpmClockSetResponse,
50 cc: TpmCc::ClockSet,
51 handles: {},
52 parameters: {}
53}
54
55tpm_struct! {
56 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
57 kind: Command,
58 name: TpmClockRateAdjustCommand,
59 cc: TpmCc::ClockRateAdjust,
60 handles: {
61 pub auth: crate::data::TpmiRhHierarchy,
62 },
63 parameters: {
64 pub rate_adjust: TpmClockAdjust,
65 }
66}
67
68tpm_struct! {
69 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
70 kind: Response,
71 name: TpmClockRateAdjustResponse,
72 cc: TpmCc::ClockRateAdjust,
73 handles: {},
74 parameters: {}
75}