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, PartialEq, Eq, Copy, Clone)]
13    kind: Command,
14    name: TpmStartupCommand,
15    cc: TpmCc::Startup,
16    handles: {},
17    parameters: {
18        pub startup_type: TpmSu,
19    }
20}
21
22tpm_struct! {
23    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
24    kind: Response,
25    name: TpmStartupResponse,
26    cc: TpmCc::Startup,
27    handles: {},
28    parameters: {}
29}
30
31tpm_struct! {
32    #[derive(Debug, PartialEq, Eq, Copy, Clone)]
33    kind: Command,
34    name: TpmShutdownCommand,
35    cc: TpmCc::Shutdown,
36    handles: {},
37    parameters: {
38        pub shutdown_type: TpmSu,
39    }
40}
41
42tpm_struct! {
43    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
44    kind: Response,
45    name: TpmShutdownResponse,
46    cc: TpmCc::Shutdown,
47    handles: {},
48    parameters: {}
49}