/openbmc/linux/drivers/char/tpm/ |
H A D | tpm2-space.c | 115 *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() 257 handle = (__be32 *)&cmd[TPM_HEADER_SIZE]; in tpm2_map_command() 278 if (len < TPM_HEADER_SIZE || !chip->nr_commands) in tpm_find_and_validate_cc() 293 if (len < TPM_HEADER_SIZE + 4 * nr_handles) in tpm_find_and_validate_cc() 400 phandle = be32_to_cpup((__be32 *)&rsp[TPM_HEADER_SIZE]); in tpm2_map_response_header() 409 *(__be32 *)&rsp[TPM_HEADER_SIZE] = cpu_to_be32(vhandle); in tpm2_map_response_header() 454 if (len < TPM_HEADER_SIZE + 9) in tpm2_map_response_body() 457 data = (void *)&rsp[TPM_HEADER_SIZE]; in tpm2_map_response_body() [all …]
|
H A D | tpm2-cmd.c | 202 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 D | tpm_i2c_infineon.c | 474 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 D | tpm-interface.c | 69 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 D | tpm1-cmd.c | 508 *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 D | tpm_tis_i2c_cr50.c | 460 if (buf_len < TPM_HEADER_SIZE) in tpm_cr50_i2c_tis_recv() 467 if (burstcnt > buf_len || burstcnt < TPM_HEADER_SIZE) { in tpm_cr50_i2c_tis_recv() 470 burstcnt, buf_len, TPM_HEADER_SIZE); in tpm_cr50_i2c_tis_recv()
|
H A D | tpm_tis_core.c | 351 size = recv_data(chip, buf, TPM_HEADER_SIZE); in tpm_tis_try_recv() 353 if (size < TPM_HEADER_SIZE) { in tpm_tis_try_recv() 359 if (expected > count || expected < TPM_HEADER_SIZE) { in tpm_tis_try_recv() 364 rc = recv_data(chip, &buf[TPM_HEADER_SIZE], in tpm_tis_try_recv() 365 expected - TPM_HEADER_SIZE); in tpm_tis_try_recv() 406 if (count < TPM_HEADER_SIZE) in tpm_tis_recv()
|
H A D | tpm_i2c_nuvoton.c | 276 if (count < TPM_HEADER_SIZE) { in i2c_nuvoton_recv() 306 if (size < TPM_HEADER_SIZE) { in i2c_nuvoton_recv()
|
H A D | tpm_crb.c | 328 if (count < TPM_HEADER_SIZE) in crb_recv() 344 if (expected > count || expected < TPM_HEADER_SIZE) in crb_recv()
|
H A D | tpm_ftpm_tee.c | 148 if (resp_len < TPM_HEADER_SIZE) { in ftpm_tee_tpm_op_send()
|
/openbmc/u-boot/drivers/tpm/ |
H A D | tpm_tis_st33zp24_i2c.c | 311 if (count < TPM_HEADER_SIZE) { in st33zp24_i2c_recv() 316 size = st33zp24_i2c_recv_data(dev, buf, TPM_HEADER_SIZE); in st33zp24_i2c_recv() 317 if (size < TPM_HEADER_SIZE) { in st33zp24_i2c_recv() 323 if (expected > count || expected < TPM_HEADER_SIZE) { in st33zp24_i2c_recv() 328 size += st33zp24_i2c_recv_data(dev, &buf[TPM_HEADER_SIZE], in st33zp24_i2c_recv() 329 expected - TPM_HEADER_SIZE); in st33zp24_i2c_recv() 359 if (len < TPM_HEADER_SIZE) in st33zp24_i2c_send()
|
H A D | tpm_tis_st33zp24_spi.c | 439 if (count < TPM_HEADER_SIZE) { in st33zp24_spi_recv() 444 size = st33zp24_spi_recv_data(dev, buf, TPM_HEADER_SIZE); in st33zp24_spi_recv() 445 if (size < TPM_HEADER_SIZE) { in st33zp24_spi_recv() 451 if (expected > count || expected < TPM_HEADER_SIZE) { in st33zp24_spi_recv() 456 size += st33zp24_spi_recv_data(dev, &buf[TPM_HEADER_SIZE], in st33zp24_spi_recv() 457 expected - TPM_HEADER_SIZE); in st33zp24_spi_recv() 487 if (len < TPM_HEADER_SIZE) in st33zp24_spi_send()
|
H A D | tpm2_tis_core.c | 345 if (count < TPM_HEADER_SIZE) in tpm_tis_recv() 348 size = tpm_tis_recv_data(dev, buf, TPM_HEADER_SIZE); in tpm_tis_recv() 349 if (size < TPM_HEADER_SIZE) { in tpm_tis_recv() 361 size += tpm_tis_recv_data(dev, &buf[TPM_HEADER_SIZE], in tpm_tis_recv() 362 expected - TPM_HEADER_SIZE); in tpm_tis_recv()
|
H A D | tpm_tis_infineon.c | 388 size = tpm_tis_i2c_recv_data(dev, buf, TPM_HEADER_SIZE); in tpm_tis_i2c_recv() 389 if (size < TPM_HEADER_SIZE) { in tpm_tis_i2c_recv() 395 if ((size_t)expected > count || (size_t)expected < TPM_HEADER_SIZE) { in tpm_tis_i2c_recv() 401 size += tpm_tis_i2c_recv_data(dev, &buf[TPM_HEADER_SIZE], in tpm_tis_i2c_recv() 402 expected - TPM_HEADER_SIZE); in tpm_tis_i2c_recv()
|
H A D | tpm2_tis_spi.c | 365 if (count < TPM_HEADER_SIZE) { in tpm_tis_spi_recv() 370 size = tpm_tis_spi_recv_data(dev, buf, TPM_HEADER_SIZE); in tpm_tis_spi_recv() 371 if (size < TPM_HEADER_SIZE) { in tpm_tis_spi_recv() 382 size += tpm_tis_spi_recv_data(dev, &buf[TPM_HEADER_SIZE], in tpm_tis_spi_recv() 383 expected - TPM_HEADER_SIZE); in tpm_tis_spi_recv()
|
H A D | tpm_tis_sandbox.c | 222 *recv_len = TPM_HEADER_SIZE + 4 + in sandbox_tpm_xfer()
|
/openbmc/linux/security/keys/trusted-keys/ |
H A D | trusted_tpm2.c | 328 blob_len = be32_to_cpup((__be32 *) &buf.data[TPM_HEADER_SIZE]); in tpm2_seal_trusted() 333 if (tpm_buf_length(&buf) < TPM_HEADER_SIZE + 4 + blob_len) { in tpm2_seal_trusted() 339 &buf.data[TPM_HEADER_SIZE + 4], in tpm2_seal_trusted() 446 (__be32 *) &buf.data[TPM_HEADER_SIZE]); in tpm2_load_cmd() 500 (__be16 *) &buf.data[TPM_HEADER_SIZE + 4]); in tpm2_unseal_cmd() 506 if (tpm_buf_length(&buf) < TPM_HEADER_SIZE + 6 + data_len) { in tpm2_unseal_cmd() 510 data = &buf.data[TPM_HEADER_SIZE + 6]; in tpm2_unseal_cmd()
|
/openbmc/linux/drivers/char/tpm/st33zp24/ |
H A D | st33zp24.c | 311 if (len < TPM_HEADER_SIZE) in st33zp24_send() 390 if (count < TPM_HEADER_SIZE) { in st33zp24_recv() 395 size = recv_data(chip, buf, TPM_HEADER_SIZE); in st33zp24_recv() 396 if (size < TPM_HEADER_SIZE) { in st33zp24_recv() 402 if (expected > count || expected < TPM_HEADER_SIZE) { in st33zp24_recv() 407 size += recv_data(chip, &buf[TPM_HEADER_SIZE], in st33zp24_recv() 408 expected - TPM_HEADER_SIZE); in st33zp24_recv()
|
/openbmc/u-boot/include/ |
H A D | tpm-common.h | 28 #define TPM_HEADER_SIZE 10 macro
|
/openbmc/u-boot/lib/ |
H A D | tpm-v1.c | 421 const size_t data_size_offset = TPM_HEADER_SIZE; in tpm1_get_permanent_flags() 422 const size_t data_offset = TPM_HEADER_SIZE + sizeof(u32); in tpm1_get_permanent_flags()
|
/openbmc/linux/include/linux/ |
H A D | tpm.h | 175 #define TPM_HEADER_SIZE 10 macro
|