| 1 |
|
| 2 |
|
| 3 |
#ifndef TSS2_H_ |
| 4 |
#define TSS2_H_ |
| 5 |
|
| 6 |
#include <types.h> |
| 7 |
#include <vb2_sha.h> |
| 8 |
|
| 9 |
#include <security/tpm/tss/tcg-2.0/tss_structures.h> |
| 10 |
#include <security/tpm/tss_errors.h> |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
tpm_result_t tlcl2_define_space(uint32_t space_index, size_t space_size, |
| 28 |
const TPMA_NV nv_attributes, |
| 29 |
const uint8_t *nv_policy, size_t nv_policy_size); |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
tpm_result_t tlcl2_get_capability(TPM_CAP capability, uint32_t property, |
| 35 |
uint32_t property_count, |
| 36 |
TPMS_CAPABILITY_DATA *capability_data); |
| 37 |
|
| 38 |
|
| 39 |
tpm_result_t tlcl2_set_bits(uint32_t index, uint64_t bits); |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
void *tlcl2_process_command(TPM_CC command, void *command_body); |
| 46 |
|
| 47 |
|
| 48 |
uint16_t tlcl2_get_hash_size_from_algo(TPMI_ALG_HASH hash_algo); |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
tpm_result_t tlcl2_clear_control(bool disable); |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
tpm_result_t tlcl2_lock_nv_write(uint32_t index); |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
tpm_result_t tlcl2_disable_platform_hierarchy(void); |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
tpm_result_t tlcl2_save_state(void); |
| 71 |
tpm_result_t tlcl2_resume(void); |
| 72 |
tpm_result_t tlcl2_startup(void); |
| 73 |
tpm_result_t tlcl2_self_test_full(void); |
| 74 |
tpm_result_t tlcl2_read(uint32_t index, void *data, uint32_t length); |
| 75 |
tpm_result_t tlcl2_write(uint32_t index, const void *data, uint32_t length); |
| 76 |
tpm_result_t tlcl2_assert_physical_presence(void); |
| 77 |
tpm_result_t tlcl2_physical_presence_cmd_enable(void); |
| 78 |
tpm_result_t tlcl2_finalize_physical_presence(void); |
| 79 |
tpm_result_t tlcl2_force_clear(void); |
| 80 |
tpm_result_t tlcl2_extend(int pcr_num, const uint8_t *digest_data, |
| 81 |
enum vb2_hash_algorithm digest_algo); |
| 82 |
|
| 83 |
#endif |