blob: 880864ee509e7aa8cafe20ad996151365786d3dd [file] [log] [blame]
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -07001/* This file is automatically generated */
2
3const struct s_tpm_extend_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -08004 uint8_t buffer[34];
5 uint16_t pcrNum;
6 uint16_t inDigest;
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -07007} tpm_extend_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0x14, },
810, 14, };
9
10const struct s_tpm_get_random_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080011 uint8_t buffer[14];
12 uint16_t bytesRequested;
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070013} tpm_get_random_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x46, },
1410, };
15
16const struct s_tpm_getownership_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080017 uint8_t buffer[22];
Lee Leahy73402172017-03-10 15:23:24 -080018} tpm_getownership_cmd = {
19 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65,
20 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x11, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070021};
22
23const struct s_tpm_getpermissions_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080024 uint8_t buffer[22];
25 uint16_t index;
Lee Leahy73402172017-03-10 15:23:24 -080026} tpm_getpermissions_cmd = {
27 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65,
28 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, 0x4, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -07002918, };
30
31const struct s_tpm_getstclearflags_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080032 uint8_t buffer[22];
Lee Leahy73402172017-03-10 15:23:24 -080033} tpm_getstclearflags_cmd = {
34 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65,
35 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x9, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070036};
37
38const struct s_tpm_getflags_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080039 uint8_t buffer[22];
Lee Leahy73402172017-03-10 15:23:24 -080040} tpm_getflags_cmd = {
41 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65,
42 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x8, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070043};
44
45const struct s_tpm_physicalsetdeactivated_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080046 uint8_t buffer[11];
47 uint16_t deactivated;
Lee Leahy73402172017-03-10 15:23:24 -080048} tpm_physicalsetdeactivated_cmd = {
49 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x72, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -07005010, };
51
52const struct s_tpm_physicalenable_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080053 uint8_t buffer[10];
Lee Leahy73402172017-03-10 15:23:24 -080054} tpm_physicalenable_cmd = {
55 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x6f, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070056};
57
58const struct s_tpm_physicaldisable_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080059 uint8_t buffer[10];
Lee Leahy73402172017-03-10 15:23:24 -080060} tpm_physicaldisable_cmd = {
61 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x70, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070062};
63
64const struct s_tpm_forceclear_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080065 uint8_t buffer[10];
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070066} tpm_forceclear_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x5d, },
67};
68
69const struct s_tpm_readpubek_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080070 uint8_t buffer[30];
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070071} tpm_readpubek_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x1e, 0x0, 0x0, 0x0, 0x7c, },
72};
73
74const struct s_tpm_continueselftest_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080075 uint8_t buffer[10];
Lee Leahy73402172017-03-10 15:23:24 -080076} tpm_continueselftest_cmd = {
77 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x53, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070078};
79
80const struct s_tpm_selftestfull_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080081 uint8_t buffer[10];
Lee Leahy73402172017-03-10 15:23:24 -080082} tpm_selftestfull_cmd = {
83 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x50, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070084};
85
86const struct s_tpm_resume_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080087 uint8_t buffer[12];
Lee Leahy73402172017-03-10 15:23:24 -080088} tpm_resume_cmd = {
89 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x2, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070090};
91
92const struct s_tpm_savestate_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080093 uint8_t buffer[10];
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -070094} tpm_savestate_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x98, },
95};
96
97const struct s_tpm_startup_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -080098 uint8_t buffer[12];
Lee Leahy73402172017-03-10 15:23:24 -080099} tpm_startup_cmd = {
100 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x1, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -0700101};
102
103const struct s_tpm_finalizepp_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -0800104 uint8_t buffer[12];
Lee Leahy73402172017-03-10 15:23:24 -0800105} tpm_finalizepp_cmd = {
106 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x2, 0xa0, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -0700107};
108
109const struct s_tpm_pplock_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -0800110 uint8_t buffer[12];
Lee Leahy73402172017-03-10 15:23:24 -0800111} tpm_pplock_cmd = {
112 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x4, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -0700113};
114
115const struct s_tpm_ppenable_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -0800116 uint8_t buffer[12];
Lee Leahy73402172017-03-10 15:23:24 -0800117} tpm_ppenable_cmd = {
118 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x20, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -0700119};
120
121const struct s_tpm_ppassert_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -0800122 uint8_t buffer[12];
Lee Leahy73402172017-03-10 15:23:24 -0800123} tpm_ppassert_cmd = {
124 {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x8, },
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -0700125};
126
127const struct s_tpm_pcr_read_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -0800128 uint8_t buffer[14];
129 uint16_t pcrNum;
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -0700130} tpm_pcr_read_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x15, },
13110, };
132
133const struct s_tpm_nv_read_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -0800134 uint8_t buffer[22];
135 uint16_t index;
136 uint16_t length;
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -0700137} tpm_nv_read_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0xcf, },
13810, 18, };
139
140const struct s_tpm_nv_write_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -0800141 uint8_t buffer[256];
142 uint16_t index;
143 uint16_t length;
144 uint16_t data;
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -0700145} tpm_nv_write_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcd, },
14610, 18, 22, };
147
148const struct s_tpm_nv_definespace_cmd{
Lee Leahye20a3192017-03-09 16:21:34 -0800149 uint8_t buffer[101];
150 uint16_t index;
151 uint16_t perm;
152 uint16_t size;
Lee Leahy73402172017-03-10 15:23:24 -0800153} tpm_nv_definespace_cmd = {
154 {0x0, 0xc1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0xcc,
155 0x0, 0x18, 0, 0, 0, 0, 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0,
156 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
157 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
158 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x17,
159 },
160 12, 70, 77,
161};
Daisuke Nojiriefb5cde2014-07-02 08:37:23 -0700162
163const int kWriteInfoLength = 12;
164const int kNvDataPublicPermissionsOffset = 60;