Searched refs:TPM_HEADER_SIZE (Results 1 – 8 of 8) sorted by relevance
/Linux-v4.19/drivers/char/tpm/ |
D | tpm2-space.c | 115 *handle = be32_to_cpup((__be32 *)&tbuf.data[TPM_HEADER_SIZE]); in tpm2_load_context() 152 body_size = tpm_buf_length(&tbuf) - TPM_HEADER_SIZE; in tpm2_save_context() 159 memcpy(&buf[*offset], &tbuf.data[TPM_HEADER_SIZE], body_size); in tpm2_save_context() 256 handle = (__be32 *)&cmd[TPM_HEADER_SIZE]; in tpm2_map_command() 356 phandle = be32_to_cpup((__be32 *)&rsp[TPM_HEADER_SIZE]); in tpm2_map_response_header() 365 *(__be32 *)&rsp[TPM_HEADER_SIZE] = cpu_to_be32(vhandle); in tpm2_map_response_header() 410 if (len < TPM_HEADER_SIZE + 9) in tpm2_map_response_body() 413 data = (void *)&rsp[TPM_HEADER_SIZE]; in tpm2_map_response_body() 417 if (len != TPM_HEADER_SIZE + 9 + 4 * be32_to_cpu(data->count)) in tpm2_map_response_body() 442 header->length = cpu_to_be32(TPM_HEADER_SIZE + 9 + 4 * j); in tpm2_map_response_body()
|
D | tpm2-cmd.c | 211 out = (struct tpm2_pcr_read_out *)&buf.data[TPM_HEADER_SIZE]; in tpm2_pcr_read() 329 &buf.data[TPM_HEADER_SIZE]; in tpm2_get_random() 494 blob_len = be32_to_cpup((__be32 *) &buf.data[TPM_HEADER_SIZE]); in tpm2_seal_trusted() 499 if (tpm_buf_length(&buf) < TPM_HEADER_SIZE + 4 + blob_len) { in tpm2_seal_trusted() 504 memcpy(payload->blob, &buf.data[TPM_HEADER_SIZE + 4], blob_len); in tpm2_seal_trusted() 576 (__be32 *) &buf.data[TPM_HEADER_SIZE]); in tpm2_load_cmd() 630 (__be16 *) &buf.data[TPM_HEADER_SIZE + 4]); in tpm2_unseal_cmd() 636 if (tpm_buf_length(&buf) < TPM_HEADER_SIZE + 6 + data_len) { in tpm2_unseal_cmd() 640 data = &buf.data[TPM_HEADER_SIZE + 6]; in tpm2_unseal_cmd() 717 &buf.data[TPM_HEADER_SIZE]; in tpm2_get_tpm_pt() [all …]
|
D | tpm_i2c_infineon.c | 479 if (count < TPM_HEADER_SIZE) { in tpm_tis_i2c_recv() 485 size = recv_data(chip, buf, TPM_HEADER_SIZE); in tpm_tis_i2c_recv() 486 if (size < TPM_HEADER_SIZE) { in tpm_tis_i2c_recv() 492 if (((size_t) expected > count) || (expected < TPM_HEADER_SIZE)) { in tpm_tis_i2c_recv() 497 size += recv_data(chip, &buf[TPM_HEADER_SIZE], in tpm_tis_i2c_recv() 498 expected - TPM_HEADER_SIZE); in tpm_tis_i2c_recv()
|
D | tpm-interface.c | 341 if (len < TPM_HEADER_SIZE) in tpm_validate_command() 360 if (len < TPM_HEADER_SIZE + 4 * nr_handles) in tpm_validate_command() 535 } else if (len < TPM_HEADER_SIZE) { in tpm_try_transmit() 591 u8 save[TPM_HEADER_SIZE + 3*sizeof(u32)]; in tpm_transmit() 595 const size_t save_size = min(space ? sizeof(save) : TPM_HEADER_SIZE, in tpm_transmit() 672 if (len < min_rsp_body_length + TPM_HEADER_SIZE) in tpm_transmit_cmd() 759 *cap = *(cap_t *)&buf.data[TPM_HEADER_SIZE + 4]; in tpm_getcap()
|
D | tpm_tis_core.c | 318 if (count < TPM_HEADER_SIZE) { in tpm_tis_recv() 323 size = recv_data(chip, buf, TPM_HEADER_SIZE); in tpm_tis_recv() 325 if (size < TPM_HEADER_SIZE) { in tpm_tis_recv() 331 if (expected > count || expected < TPM_HEADER_SIZE) { in tpm_tis_recv() 336 size += recv_data(chip, &buf[TPM_HEADER_SIZE], in tpm_tis_recv() 337 expected - TPM_HEADER_SIZE); in tpm_tis_recv()
|
D | tpm_i2c_nuvoton.c | 44 #define TPM_HEADER_SIZE 10 macro 290 if (count < TPM_HEADER_SIZE) { in i2c_nuvoton_recv() 320 if (size < TPM_HEADER_SIZE) { in i2c_nuvoton_recv()
|
D | tpm.h | 84 #define TPM_HEADER_SIZE 10 macro
|
/Linux-v4.19/drivers/char/tpm/st33zp24/ |
D | st33zp24.c | 376 if (len < TPM_HEADER_SIZE) in st33zp24_send() 463 if (count < TPM_HEADER_SIZE) { in st33zp24_recv() 468 size = recv_data(chip, buf, TPM_HEADER_SIZE); in st33zp24_recv() 469 if (size < TPM_HEADER_SIZE) { in st33zp24_recv() 475 if (expected > count || expected < TPM_HEADER_SIZE) { in st33zp24_recv() 480 size += recv_data(chip, &buf[TPM_HEADER_SIZE], in st33zp24_recv() 481 expected - TPM_HEADER_SIZE); in st33zp24_recv()
|