Lines Matching refs:TPM_CHECK
13 #define TPM_CHECK(tpm_command) do { \ macro
105 TPM_CHECK(tpm_startup(TPM_ST_CLEAR)); in test_early_extend()
106 TPM_CHECK(tpm_continue_self_test()); in test_early_extend()
107 TPM_CHECK(tpm_extend(1, value_in, value_out)); in test_early_extend()
118 TPM_CHECK(tpm_startup(TPM_ST_CLEAR)); in test_early_nvram()
119 TPM_CHECK(tpm_continue_self_test()); in test_early_nvram()
120 TPM_CHECK(tpm_tsc_physical_presence(PRESENCE)); in test_early_nvram()
121 TPM_CHECK(tpm_nv_read_value(INDEX0, (uint8_t *)&x, sizeof(x))); in test_early_nvram()
132 TPM_CHECK(tpm_startup(TPM_ST_CLEAR)); in test_early_nvram2()
133 TPM_CHECK(tpm_continue_self_test()); in test_early_nvram2()
134 TPM_CHECK(tpm_tsc_physical_presence(PRESENCE)); in test_early_nvram2()
135 TPM_CHECK(tpm_nv_write_value(INDEX0, (uint8_t *)&x, sizeof(x))); in test_early_nvram2()
146 TPM_CHECK(TlclStartupIfNeeded()); in test_enable()
147 TPM_CHECK(tpm_self_test_full()); in test_enable()
148 TPM_CHECK(tpm_tsc_physical_presence(PRESENCE)); in test_enable()
149 TPM_CHECK(tpm_get_flags(&disable, &deactivated, NULL)); in test_enable()
151 TPM_CHECK(tpm_physical_enable()); in test_enable()
152 TPM_CHECK(tpm_physical_set_deactivated(0)); in test_enable()
153 TPM_CHECK(tpm_get_flags(&disable, &deactivated, NULL)); in test_enable()
173 TPM_CHECK(TlclStartupIfNeeded()); in test_fast_enable()
174 TPM_CHECK(tpm_self_test_full()); in test_fast_enable()
175 TPM_CHECK(tpm_tsc_physical_presence(PRESENCE)); in test_fast_enable()
176 TPM_CHECK(tpm_get_flags(&disable, &deactivated, NULL)); in test_fast_enable()
179 TPM_CHECK(tpm_force_clear()); in test_fast_enable()
180 TPM_CHECK(tpm_get_flags(&disable, &deactivated, NULL)); in test_fast_enable()
184 TPM_CHECK(tpm_physical_enable()); in test_fast_enable()
185 TPM_CHECK(tpm_physical_set_deactivated(0)); in test_fast_enable()
186 TPM_CHECK(tpm_get_flags(&disable, &deactivated, NULL)); in test_fast_enable()
203 TPM_CHECK(TlclStartupIfNeeded()); in test_global_lock()
204 TPM_CHECK(tpm_self_test_full()); in test_global_lock()
205 TPM_CHECK(tpm_tsc_physical_presence(PRESENCE)); in test_global_lock()
206 TPM_CHECK(tpm_nv_read_value(INDEX0, (uint8_t *)&x, sizeof(x))); in test_global_lock()
207 TPM_CHECK(tpm_nv_write_value(INDEX0, (uint8_t *)&zero, in test_global_lock()
209 TPM_CHECK(tpm_nv_read_value(INDEX1, (uint8_t *)&x, sizeof(x))); in test_global_lock()
210 TPM_CHECK(tpm_nv_write_value(INDEX1, (uint8_t *)&zero, in test_global_lock()
212 TPM_CHECK(tpm_set_global_lock()); in test_global_lock()
217 TPM_CHECK(tpm_nv_read_value(INDEX0, (uint8_t *)&x, sizeof(x))); in test_global_lock()
221 TPM_CHECK(tpm_nv_write_value(INDEX1, (uint8_t *)&x, sizeof(x))); in test_global_lock()
222 TPM_CHECK(tpm_nv_read_value(INDEX1, (uint8_t *)&x, sizeof(x))); in test_global_lock()
230 TPM_CHECK(tpm_nv_read_value(INDEX1, (uint8_t *)&x, sizeof(x))); in test_global_lock()
325 TPM_CHECK(TlclStartupIfNeeded()); in test_redefine_unowned()
326 TPM_CHECK(tpm_self_test_full()); in test_redefine_unowned()
327 TPM_CHECK(tpm_tsc_physical_presence(PRESENCE)); in test_redefine_unowned()
331 TPM_CHECK(tpm_nv_read_value(INDEX0, (uint8_t *)&x, sizeof(x))); in test_redefine_unowned()
332 TPM_CHECK(tpm_nv_read_value(INDEX1, (uint8_t *)&x, sizeof(x))); in test_redefine_unowned()
336 TPM_CHECK(tpm_nv_define_space(INDEX0, perm, 2 * sizeof(uint32_t))); in test_redefine_unowned()
337 TPM_CHECK(tpm_nv_define_space(INDEX0, perm, sizeof(uint32_t))); in test_redefine_unowned()
339 TPM_CHECK(tpm_nv_define_space(INDEX1, perm, 2 * sizeof(uint32_t))); in test_redefine_unowned()
340 TPM_CHECK(tpm_nv_define_space(INDEX1, perm, sizeof(uint32_t))); in test_redefine_unowned()
350 TPM_CHECK(tpm_nv_define_space(INDEX1, perm, 2 * sizeof(uint32_t))); in test_redefine_unowned()
351 TPM_CHECK(tpm_nv_define_space(INDEX1, perm, sizeof(uint32_t))); in test_redefine_unowned()
375 TPM_CHECK(TlclStartupIfNeeded()); in test_space_perm()
376 TPM_CHECK(tpm_continue_self_test()); in test_space_perm()
377 TPM_CHECK(tpm_tsc_physical_presence(PRESENCE)); in test_space_perm()
378 TPM_CHECK(tpm_get_permissions(INDEX0, &perm)); in test_space_perm()
380 TPM_CHECK(tpm_get_permissions(INDEX1, &perm)); in test_space_perm()
458 TPM_CHECK(TlclStartupIfNeeded()); in test_write_limit()
459 TPM_CHECK(tpm_self_test_full()); in test_write_limit()
460 TPM_CHECK(tpm_tsc_physical_presence(PRESENCE)); in test_write_limit()
461 TPM_CHECK(tpm_force_clear()); in test_write_limit()
462 TPM_CHECK(tpm_physical_enable()); in test_write_limit()
463 TPM_CHECK(tpm_physical_set_deactivated(0)); in test_write_limit()
480 TPM_CHECK(tpm_force_clear()); in test_write_limit()
481 TPM_CHECK(tpm_physical_enable()); in test_write_limit()
482 TPM_CHECK(tpm_physical_set_deactivated(0)); in test_write_limit()
485 TPM_CHECK(tpm_nv_write_value(INDEX0, (uint8_t *)&i, sizeof(i))); in test_write_limit()