Searched refs:tpm_cmd (Results 1 - 2 of 2) sorted by relevance
/linux-4.4.14/drivers/char/tpm/ |
H A D | tpm-interface.c | 436 struct tpm_cmd_t tpm_cmd; tpm_getcap() local 440 tpm_cmd.header.in = tpm_getcap_header; tpm_getcap() 442 tpm_cmd.params.getcap_in.cap = subcap_id; tpm_getcap() 444 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(0); tpm_getcap() 445 tpm_cmd.header.in.length -= cpu_to_be32(sizeof(__be32)); tpm_getcap() 449 tpm_cmd.params.getcap_in.cap = TPM_CAP_FLAG; tpm_getcap() 451 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_getcap() 452 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_getcap() 453 tpm_cmd.params.getcap_in.subcap = subcap_id; tpm_getcap() 455 rc = tpm_transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, desc); tpm_getcap() 457 *cap = tpm_cmd.params.getcap_out.cap; tpm_getcap() 463 struct tpm_cmd_t tpm_cmd; tpm_gen_interrupt() local 466 tpm_cmd.header.in = tpm_getcap_header; tpm_gen_interrupt() 467 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_gen_interrupt() 468 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_gen_interrupt() 469 tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; tpm_gen_interrupt() 471 rc = tpm_transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, tpm_gen_interrupt() 498 struct tpm_cmd_t tpm_cmd; tpm_get_timeouts() local 504 tpm_cmd.header.in = tpm_getcap_header; tpm_get_timeouts() 505 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_get_timeouts() 506 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_get_timeouts() 507 tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; tpm_get_timeouts() 508 rc = tpm_transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, NULL); tpm_get_timeouts() 517 tpm_cmd.header.in = tpm_getcap_header; tpm_get_timeouts() 518 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_get_timeouts() 519 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_get_timeouts() 520 tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; tpm_get_timeouts() 521 rc = tpm_transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, tpm_get_timeouts() 531 if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 || tpm_get_timeouts() 532 be32_to_cpu(tpm_cmd.header.out.length) tpm_get_timeouts() 533 != sizeof(tpm_cmd.header.out) + sizeof(u32) + 4 * sizeof(u32)) tpm_get_timeouts() 536 old_timeout[0] = be32_to_cpu(tpm_cmd.params.getcap_out.cap.timeout.a); tpm_get_timeouts() 537 old_timeout[1] = be32_to_cpu(tpm_cmd.params.getcap_out.cap.timeout.b); tpm_get_timeouts() 538 old_timeout[2] = be32_to_cpu(tpm_cmd.params.getcap_out.cap.timeout.c); tpm_get_timeouts() 539 old_timeout[3] = be32_to_cpu(tpm_cmd.params.getcap_out.cap.timeout.d); tpm_get_timeouts() 578 tpm_cmd.header.in = tpm_getcap_header; tpm_get_timeouts() 579 tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; tpm_get_timeouts() 580 tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); tpm_get_timeouts() 581 tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_DURATION; tpm_get_timeouts() 583 rc = tpm_transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, tpm_get_timeouts() 588 if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 || tpm_get_timeouts() 589 be32_to_cpu(tpm_cmd.header.out.length) tpm_get_timeouts() 590 != sizeof(tpm_cmd.header.out) + sizeof(u32) + 3 * sizeof(u32)) tpm_get_timeouts() 593 duration_cap = &tpm_cmd.params.getcap_out.cap.duration; tpm_get_timeouts() 837 rc = tpm_transmit_cmd(chip, cmd, buflen, "attempting tpm_cmd"); tpm_send() 1007 struct tpm_cmd_t tpm_cmd; tpm_get_random() local 1026 tpm_cmd.header.in = tpm_getrandom_header; tpm_get_random() 1027 tpm_cmd.params.getrandom_in.num_bytes = cpu_to_be32(num_bytes); tpm_get_random() 1029 err = tpm_transmit_cmd(chip, &tpm_cmd, tpm_get_random() 1035 recd = be32_to_cpu(tpm_cmd.params.getrandom_out.rng_data_len); tpm_get_random() 1036 memcpy(dest, tpm_cmd.params.getrandom_out.rng_data, recd); tpm_get_random()
|
H A D | tpm-sysfs.c | 34 struct tpm_cmd_t tpm_cmd; pubek_show() local 41 tpm_cmd.header.in = tpm_readpubek_header; pubek_show() 42 err = tpm_transmit_cmd(chip, &tpm_cmd, READ_PUBEK_RESULT_SIZE, pubek_show() 57 data = tpm_cmd.params.readpubek_out_buffer; pubek_show()
|
Completed in 275 milliseconds