1 /* SPDX-License-Identifier: GPL-2.0-only */
5 const struct s_tpm_extend_cmd
{
9 } tpm_extend_cmd
= {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0x14, },
12 const struct s_tpm_get_random_cmd
{
14 uint16_t bytesRequested
;
15 } tpm_get_random_cmd
= {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x46, },
18 const struct s_tpm_getownership_cmd
{
20 } tpm_getownership_cmd
= {
21 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65,
22 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x11, },
25 const struct s_tpm_getpermissions_cmd
{
28 } tpm_getpermissions_cmd
= {
29 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65,
30 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, 0x4, },
33 const struct s_tpm_getstclearflags_cmd
{
35 } tpm_getstclearflags_cmd
= {
36 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65,
37 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x9, },
40 const struct s_tpm_getflags_cmd
{
42 } tpm_getflags_cmd
= {
43 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65,
44 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x8, },
47 const struct s_tpm_physicalsetdeactivated_cmd
{
50 } tpm_physicalsetdeactivated_cmd
= {
51 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x72, },
54 const struct s_tpm_physicalenable_cmd
{
56 } tpm_physicalenable_cmd
= {
57 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x6f, },
60 const struct s_tpm_physicaldisable_cmd
{
62 } tpm_physicaldisable_cmd
= {
63 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x70, },
66 const struct s_tpm_forceclear_cmd
{
68 } tpm_forceclear_cmd
= {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x5d, },
71 const struct s_tpm_readpubek_cmd
{
73 } tpm_readpubek_cmd
= {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x1e, 0x0, 0x0, 0x0, 0x7c, },
76 const struct s_tpm_continueselftest_cmd
{
78 } tpm_continueselftest_cmd
= {
79 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x53, },
82 const struct s_tpm_selftestfull_cmd
{
84 } tpm_selftestfull_cmd
= {
85 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x50, },
88 const struct s_tpm_resume_cmd
{
91 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x2, },
94 const struct s_tpm_savestate_cmd
{
96 } tpm_savestate_cmd
= {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x98, },
99 const struct s_tpm_startup_cmd
{
101 } tpm_startup_cmd
= {
102 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x1, },
105 const struct s_tpm_finalizepp_cmd
{
107 } tpm_finalizepp_cmd
= {
108 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x2, 0xa0, },
111 const struct s_tpm_pplock_cmd
{
114 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x4, },
117 const struct s_tpm_ppenable_cmd
{
119 } tpm_ppenable_cmd
= {
120 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x20, },
123 const struct s_tpm_ppassert_cmd
{
125 } tpm_ppassert_cmd
= {
126 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x8, },
129 const struct s_tpm_pcr_read_cmd
{
132 } tpm_pcr_read_cmd
= {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x15, },
135 const struct s_tpm_nv_read_cmd
{
139 } tpm_nv_read_cmd
= {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0xcf, },
142 const struct s_tpm_nv_write_cmd
{
147 } tpm_nv_write_cmd
= {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcd, },
150 const struct s_tpm_nv_definespace_cmd
{
155 } tpm_nv_definespace_cmd
= {
156 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0xcc,
157 0x0, 0x18, 0, 0, 0, 0, 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0,
158 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
159 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
160 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x17,
165 const int kWriteInfoLength
= 12;
166 const int kNvDataPublicPermissionsOffset
= 60;