| 1 | /* This file is automatically generated */ |
| 2 | |
| 3 | const struct s_tpm_delegate_read_table_cmd{ |
| 4 | uint8_t buffer[10]; |
| 5 | } tpm_delegate_read_table_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xdb, }, |
| 6 | }; |
| 7 | |
| 8 | const struct s_tpm_create_delegation_family_cmd{ |
| 9 | uint8_t buffer[23]; |
| 10 | uint16_t familyLabel; |
| 11 | } tpm_create_delegation_family_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x17, 0x0, 0x0, 0x0, 0xd2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, }, |
| 12 | 22, }; |
| 13 | |
| 14 | const struct s_tpm_takeownership_cmd{ |
| 15 | uint8_t buffer[624]; |
| 16 | uint16_t encOwnerAuth; |
| 17 | uint16_t encSrkAuth; |
| 18 | } tpm_takeownership_cmd = {{0x0, 0xc2, 0x0, 0x0, 0x2, 0x70, 0x0, 0x0, 0x0, 0xd, 0x0, 0x5, 0x0, 0x0, 0x1, 0x0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x3, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, }, |
| 19 | 16, 276, }; |
| 20 | |
| 21 | const struct s_tpm_osap_cmd{ |
| 22 | uint8_t buffer[36]; |
| 23 | uint16_t entityType; |
| 24 | uint16_t entityValue; |
| 25 | uint16_t nonceOddOSAP; |
| 26 | } tpm_osap_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x0, 0xb, }, |
| 27 | 10, 12, 16, }; |
| 28 | |
| 29 | const struct s_tpm_oiap_cmd{ |
| 30 | uint8_t buffer[10]; |
| 31 | } tpm_oiap_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xa, }, |
| 32 | }; |
| 33 | |
| 34 | const struct s_tpm_ifx_fieldupgradeinforequest2_cmd{ |
| 35 | uint8_t buffer[13]; |
| 36 | } tpm_ifx_fieldupgradeinforequest2_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0x0, 0xaa, 0x11, 0x0, 0x0, }, |
| 37 | }; |
| 38 | |
| 39 | const struct s_tpm_getversionval_cmd{ |
| 40 | uint8_t buffer[18]; |
| 41 | } tpm_getversionval_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x0, 0x0, 0x0, }, |
| 42 | }; |
| 43 | |
| 44 | const struct s_tpm_extend_cmd{ |
| 45 | uint8_t buffer[34]; |
| 46 | uint16_t pcrNum; |
| 47 | uint16_t inDigest; |
| 48 | } tpm_extend_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0x14, }, |
| 49 | 10, 14, }; |
| 50 | |
| 51 | const struct s_tpm_get_random_cmd{ |
| 52 | uint8_t buffer[14]; |
| 53 | uint16_t bytesRequested; |
| 54 | } tpm_get_random_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x46, }, |
| 55 | 10, }; |
| 56 | |
| 57 | const struct s_tpm_getownership_cmd{ |
| 58 | uint8_t buffer[22]; |
| 59 | } tpm_getownership_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x11, }, |
| 60 | }; |
| 61 | |
| 62 | const struct s_tpm_getspaceinfo_cmd{ |
| 63 | uint8_t buffer[22]; |
| 64 | uint16_t index; |
| 65 | } tpm_getspaceinfo_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, 0x4, }, |
| 66 | 18, }; |
| 67 | |
| 68 | const struct s_tpm_getstclearflags_cmd{ |
| 69 | uint8_t buffer[22]; |
| 70 | } tpm_getstclearflags_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x9, }, |
| 71 | }; |
| 72 | |
| 73 | const struct s_tpm_getflags_cmd{ |
| 74 | uint8_t buffer[22]; |
| 75 | } tpm_getflags_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x8, }, |
| 76 | }; |
| 77 | |
| 78 | const struct s_tpm_physicalsetdeactivated_cmd{ |
| 79 | uint8_t buffer[11]; |
| 80 | uint16_t deactivated; |
| 81 | } tpm_physicalsetdeactivated_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x72, }, |
| 82 | 10, }; |
| 83 | |
| 84 | const struct s_tpm_physicalenable_cmd{ |
| 85 | uint8_t buffer[10]; |
| 86 | } tpm_physicalenable_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x6f, }, |
| 87 | }; |
| 88 | |
| 89 | const struct s_tpm_physicaldisable_cmd{ |
| 90 | uint8_t buffer[10]; |
| 91 | } tpm_physicaldisable_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x70, }, |
| 92 | }; |
| 93 | |
| 94 | const struct s_tpm_forceclear_cmd{ |
| 95 | uint8_t buffer[10]; |
| 96 | } tpm_forceclear_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x5d, }, |
| 97 | }; |
| 98 | |
| 99 | const struct s_tpm_readpubek_cmd{ |
| 100 | uint8_t buffer[30]; |
| 101 | uint16_t antiReplay; |
| 102 | } tpm_readpubek_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x1e, 0x0, 0x0, 0x0, 0x7c, }, |
| 103 | 10, }; |
| 104 | |
| 105 | const struct s_tpm_continueselftest_cmd{ |
| 106 | uint8_t buffer[10]; |
| 107 | } tpm_continueselftest_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x53, }, |
| 108 | }; |
| 109 | |
| 110 | const struct s_tpm_selftestfull_cmd{ |
| 111 | uint8_t buffer[10]; |
| 112 | } tpm_selftestfull_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x50, }, |
| 113 | }; |
| 114 | |
| 115 | const struct s_tpm_resume_cmd{ |
| 116 | uint8_t buffer[12]; |
| 117 | } tpm_resume_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x2, }, |
| 118 | }; |
| 119 | |
| 120 | const struct s_tpm_savestate_cmd{ |
| 121 | uint8_t buffer[10]; |
| 122 | } tpm_savestate_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x98, }, |
| 123 | }; |
| 124 | |
| 125 | const struct s_tpm_startup_cmd{ |
| 126 | uint8_t buffer[12]; |
| 127 | } tpm_startup_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x1, }, |
| 128 | }; |
| 129 | |
| 130 | const struct s_tpm_finalizepp_cmd{ |
| 131 | uint8_t buffer[12]; |
| 132 | } tpm_finalizepp_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x2, 0xa0, }, |
| 133 | }; |
| 134 | |
| 135 | const struct s_tpm_pplock_cmd{ |
| 136 | uint8_t buffer[12]; |
| 137 | } tpm_pplock_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x4, }, |
| 138 | }; |
| 139 | |
| 140 | const struct s_tpm_ppenable_cmd{ |
| 141 | uint8_t buffer[12]; |
| 142 | } tpm_ppenable_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x20, }, |
| 143 | }; |
| 144 | |
| 145 | const struct s_tpm_ppassert_cmd{ |
| 146 | uint8_t buffer[12]; |
| 147 | } tpm_ppassert_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x8, }, |
| 148 | }; |
| 149 | |
| 150 | const struct s_tpm_pcr_read_cmd{ |
| 151 | uint8_t buffer[14]; |
| 152 | uint16_t pcrNum; |
| 153 | } tpm_pcr_read_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x15, }, |
| 154 | 10, }; |
| 155 | |
| 156 | const struct s_tpm_nv_read_cmd{ |
| 157 | uint8_t buffer[22]; |
| 158 | uint16_t index; |
| 159 | uint16_t length; |
| 160 | } tpm_nv_read_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0xcf, }, |
| 161 | 10, 18, }; |
| 162 | |
| 163 | const struct s_tpm_nv_write_cmd{ |
| 164 | uint8_t buffer[256]; |
| 165 | uint16_t index; |
| 166 | uint16_t length; |
| 167 | uint16_t data; |
| 168 | } tpm_nv_write_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcd, }, |
| 169 | 10, 18, 22, }; |
| 170 | |
| 171 | const struct s_tpm_nv_definespace_cmd{ |
| 172 | uint8_t buffer[101]; |
| 173 | uint16_t index; |
| 174 | uint16_t pcr_info_read; |
| 175 | uint16_t pcr_info_write; |
| 176 | uint16_t perm; |
| 177 | uint16_t size; |
| 178 | } tpm_nv_definespace_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x18, 0, 0, 0, 0, 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x17, }, |
| 179 | 12, 16, 42, 70, 77, }; |
| 180 | |
| 181 | const int kWriteInfoLength = 12; |