Home
last modified time | relevance | path

Searched refs:TPM_HEADER_SIZE (Results 1 – 17 of 17) sorted by relevance

/OK3568_Linux_fs/kernel/drivers/char/tpm/
H A Dtpm2-space.c115 *handle = be32_to_cpup((__be32 *)&tbuf.data[TPM_HEADER_SIZE]); in tpm2_load_context()
151 body_size = tpm_buf_length(&tbuf) - TPM_HEADER_SIZE; in tpm2_save_context()
158 memcpy(&buf[*offset], &tbuf.data[TPM_HEADER_SIZE], body_size); in tpm2_save_context()
254 handle = (__be32 *)&cmd[TPM_HEADER_SIZE]; in tpm2_map_command()
275 if (len < TPM_HEADER_SIZE || !chip->nr_commands) in tpm_find_and_validate_cc()
290 if (len < TPM_HEADER_SIZE + 4 * nr_handles) in tpm_find_and_validate_cc()
397 phandle = be32_to_cpup((__be32 *)&rsp[TPM_HEADER_SIZE]); in tpm2_map_response_header()
406 *(__be32 *)&rsp[TPM_HEADER_SIZE] = cpu_to_be32(vhandle); in tpm2_map_response_header()
451 if (len < TPM_HEADER_SIZE + 9) in tpm2_map_response_body()
454 data = (void *)&rsp[TPM_HEADER_SIZE]; in tpm2_map_response_body()
[all …]
H A Dtpm2-cmd.c202 out = (struct tpm2_pcr_read_out *)&buf.data[TPM_HEADER_SIZE]; in tpm2_pcr_read()
320 &buf.data[TPM_HEADER_SIZE]; in tpm2_get_random()
323 TPM_HEADER_SIZE + in tpm2_get_random()
402 &buf.data[TPM_HEADER_SIZE]; in tpm2_get_tpm_pt()
576 (__be32 *)&buf.data[TPM_HEADER_SIZE + 5]); in tpm2_get_pcr_allocation()
586 marker = &buf.data[TPM_HEADER_SIZE + 9]; in tpm2_get_pcr_allocation()
667 be32_to_cpup((__be32 *)&buf.data[TPM_HEADER_SIZE + 5])) { in tpm2_get_cc_attrs_tbl()
675 attrs = (__be32 *)&buf.data[TPM_HEADER_SIZE + 9]; in tpm2_get_cc_attrs_tbl()
H A Dtpm_i2c_infineon.c474 if (count < TPM_HEADER_SIZE) { in tpm_tis_i2c_recv()
480 size = recv_data(chip, buf, TPM_HEADER_SIZE); in tpm_tis_i2c_recv()
481 if (size < TPM_HEADER_SIZE) { in tpm_tis_i2c_recv()
487 if (((size_t) expected > count) || (expected < TPM_HEADER_SIZE)) { in tpm_tis_i2c_recv()
492 size += recv_data(chip, &buf[TPM_HEADER_SIZE], in tpm_tis_i2c_recv()
493 expected - TPM_HEADER_SIZE); in tpm_tis_i2c_recv()
H A Dtpm-interface.c69 if (bufsiz < TPM_HEADER_SIZE) in tpm_try_transmit()
130 } else if (len < TPM_HEADER_SIZE || len != be32_to_cpu(header->length)) in tpm_try_transmit()
157 u8 save[TPM_HEADER_SIZE + 3*sizeof(u32)]; in tpm_transmit()
232 if (len < min_rsp_body_length + TPM_HEADER_SIZE) in tpm_transmit_cmd()
H A Dtpm1-cmd.c508 *cap = *(cap_t *)&buf.data[TPM_HEADER_SIZE + 4]; in tpm1_getcap()
555 out = (struct tpm1_get_random_out *)&buf.data[TPM_HEADER_SIZE]; in tpm1_get_random()
563 if (tpm_buf_length(&buf) < TPM_HEADER_SIZE + in tpm1_get_random()
605 memcpy(res_buf, &buf.data[TPM_HEADER_SIZE], TPM_DIGEST_SIZE); in tpm1_pcr_read()
H A Dtpm_tis_core.c293 if (count < TPM_HEADER_SIZE) { in tpm_tis_recv()
298 size = recv_data(chip, buf, TPM_HEADER_SIZE); in tpm_tis_recv()
300 if (size < TPM_HEADER_SIZE) { in tpm_tis_recv()
306 if (expected > count || expected < TPM_HEADER_SIZE) { in tpm_tis_recv()
311 size += recv_data(chip, &buf[TPM_HEADER_SIZE], in tpm_tis_recv()
312 expected - TPM_HEADER_SIZE); in tpm_tis_recv()
H A Dtpm_i2c_nuvoton.c276 if (count < TPM_HEADER_SIZE) { in i2c_nuvoton_recv()
306 if (size < TPM_HEADER_SIZE) { in i2c_nuvoton_recv()
H A Dtpm_crb.c289 if (count < TPM_HEADER_SIZE) in crb_recv()
305 if (expected > count || expected < TPM_HEADER_SIZE) in crb_recv()
H A Dtpm_ftpm_tee.c149 if (resp_len < TPM_HEADER_SIZE) { in ftpm_tee_tpm_op_send()
/OK3568_Linux_fs/kernel/security/keys/trusted-keys/
H A Dtrusted_tpm2.c145 blob_len = be32_to_cpup((__be32 *) &buf.data[TPM_HEADER_SIZE]); in tpm2_seal_trusted()
150 if (tpm_buf_length(&buf) < TPM_HEADER_SIZE + 4 + blob_len) { in tpm2_seal_trusted()
155 memcpy(payload->blob, &buf.data[TPM_HEADER_SIZE + 4], blob_len); in tpm2_seal_trusted()
226 (__be32 *) &buf.data[TPM_HEADER_SIZE]); in tpm2_load_cmd()
278 (__be16 *) &buf.data[TPM_HEADER_SIZE + 4]); in tpm2_unseal_cmd()
284 if (tpm_buf_length(&buf) < TPM_HEADER_SIZE + 6 + data_len) { in tpm2_unseal_cmd()
288 data = &buf.data[TPM_HEADER_SIZE + 6]; in tpm2_unseal_cmd()
/OK3568_Linux_fs/u-boot/drivers/tpm/
H A Dtpm_tis_st33zp24_i2c.c310 if (count < TPM_HEADER_SIZE) { in st33zp24_i2c_recv()
315 size = st33zp24_i2c_recv_data(dev, buf, TPM_HEADER_SIZE); in st33zp24_i2c_recv()
316 if (size < TPM_HEADER_SIZE) { in st33zp24_i2c_recv()
327 size += st33zp24_i2c_recv_data(dev, &buf[TPM_HEADER_SIZE], in st33zp24_i2c_recv()
328 expected - TPM_HEADER_SIZE); in st33zp24_i2c_recv()
358 if (len < TPM_HEADER_SIZE) in st33zp24_i2c_send()
H A Dtpm_tis_st33zp24_spi.c438 if (count < TPM_HEADER_SIZE) { in st33zp24_spi_recv()
443 size = st33zp24_spi_recv_data(dev, buf, TPM_HEADER_SIZE); in st33zp24_spi_recv()
444 if (size < TPM_HEADER_SIZE) { in st33zp24_spi_recv()
455 size += st33zp24_spi_recv_data(dev, &buf[TPM_HEADER_SIZE], in st33zp24_spi_recv()
456 expected - TPM_HEADER_SIZE); in st33zp24_spi_recv()
486 if (len < TPM_HEADER_SIZE) in st33zp24_spi_send()
H A Dtpm_tis_infineon.c390 size = tpm_tis_i2c_recv_data(dev, buf, TPM_HEADER_SIZE); in tpm_tis_i2c_recv()
391 if (size < TPM_HEADER_SIZE) { in tpm_tis_i2c_recv()
403 size += tpm_tis_i2c_recv_data(dev, &buf[TPM_HEADER_SIZE], in tpm_tis_i2c_recv()
404 expected - TPM_HEADER_SIZE); in tpm_tis_i2c_recv()
/OK3568_Linux_fs/kernel/drivers/char/tpm/st33zp24/
H A Dst33zp24.c364 if (len < TPM_HEADER_SIZE) in st33zp24_send()
451 if (count < TPM_HEADER_SIZE) { in st33zp24_recv()
456 size = recv_data(chip, buf, TPM_HEADER_SIZE); in st33zp24_recv()
457 if (size < TPM_HEADER_SIZE) { in st33zp24_recv()
463 if (expected > count || expected < TPM_HEADER_SIZE) { in st33zp24_recv()
468 size += recv_data(chip, &buf[TPM_HEADER_SIZE], in st33zp24_recv()
469 expected - TPM_HEADER_SIZE); in st33zp24_recv()
/OK3568_Linux_fs/u-boot/include/
H A Dtpm.h16 #define TPM_HEADER_SIZE 10 macro
/OK3568_Linux_fs/kernel/include/linux/
H A Dtpm.h168 #define TPM_HEADER_SIZE 10 macro
/OK3568_Linux_fs/u-boot/lib/
H A Dtpm.c610 const size_t data_size_offset = TPM_HEADER_SIZE; in tpm_get_permanent_flags()
611 const size_t data_offset = TPM_HEADER_SIZE + sizeof (uint32_t); in tpm_get_permanent_flags()