tpm2_protocol/message/
startup.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2// Copyright (c) 2025 Opinsys Oy
3// Copyright (c) 2024-2025 Jarkko Sakkinen
4
5use crate::{
6    data::{TpmCc, TpmSu},
7    tpm_struct,
8};
9use core::fmt::Debug;
10
11tpm_struct! {
12    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
13    TpmStartupCommand,
14    TpmCc::Startup,
15    true,
16    false,
17    0,
18    {
19        pub startup_type: TpmSu,
20    }
21}
22
23tpm_struct! {
24    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
25    TpmStartupResponse,
26    TpmCc::Startup,
27    true,
28    false,
29    0,
30    {}
31}
32
33tpm_struct! {
34    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
35    TpmShutdownCommand,
36    TpmCc::Shutdown,
37    true,
38    true,
39    0,
40    {
41        pub shutdown_type: TpmSu,
42    }
43}
44
45tpm_struct! {
46    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
47    TpmShutdownResponse,
48    TpmCc::Shutdown,
49    true,
50    true,
51    0,
52    {}
53}