Lines Matching full:tpm
13 * Device driver for TCG/TCPA TPM (trusted platform module).
21 * Note, the TPM chip is not interrupt driven (only polling)
34 #include "tpm.h"
42 * Bug workaround - some TPM's don't flush the most
55 * TCG Specification TPM Main Part 2 TPM Structures Section 17. The
445 * If the command is not implemented by the TPM, synthesize a in tpm_try_transmit()
577 * tpm_transmit - Internal kernel interface to transmit TPM commands.
579 * @chip: TPM chip to use
580 * @space: tpm space
581 * @buf: TPM command buffer
582 * @bufsiz: length of the TPM command buffer
583 * @flags: tpm transmit flags - bitmap
586 * returns from the TPM and retransmits the command after a delay up
646 * tpm_transmit_cmd - send a tpm command to the device
647 * The function extracts tpm out header return code
649 * @chip: TPM chip to use
650 * @space: tpm space
651 * @buf: TPM command buffer
654 * @flags: tpm transmit flags - bitmap
660 * A positive number for a TPM error.
678 dev_err(&chip->dev, "A TPM error (%d) occurred %s\n", err, in tpm_transmit_cmd()
694 * tpm_startup - turn on the TPM
695 * @chip: TPM chip to use
697 * Normally the firmware should start the TPM. This function is provided as a
699 * example when a TPM emulator is used.
708 dev_info(&chip->dev, "starting up the TPM manually\n"); in tpm_startup()
725 "attempting to start the TPM"); in tpm_startup()
818 "A TPM error (%zd) occurred attempting to determine the timeouts\n", in tpm_get_timeouts()
900 dev_info(&chip->dev, "Adjusting TPM timeout parameters."); in tpm_get_timeouts()
918 * tpm_continue_selftest -- run TPM's selftest
919 * @chip: TPM chip to use
922 * a TPM error code.
1044 * Note: with TPM 2.0 extends also those banks with a known digest size to the
1084 * tpm_do_selftest - have the TPM continue its selftest and wait until it
1086 * @chip: TPM chip to use
1089 * a TPM error code.
1106 dev_info(&chip->dev, "TPM not ready (%d)\n", rc); in tpm_do_selftest()
1108 /* This may fail if there was no TPM driver during a suspend/resume in tpm_do_selftest()
1124 "TPM command timed out during continue self test"); in tpm_do_selftest()
1131 "TPM is disabled/deactivated (0x%X)\n", rc); in tpm_do_selftest()
1132 /* TPM is disabled and/or deactivated; driver can in tpm_do_selftest()
1133 * proceed and TPM does handle commands for in tpm_do_selftest()
1148 * tpm1_auto_startup - Perform the standard automatic TPM initialization
1150 * @chip: TPM chip to use
1163 dev_err(&chip->dev, "TPM self test failed\n"); in tpm1_auto_startup()
1175 * tpm_send - send a TPM command
1177 * @cmd: a TPM command buffer
1178 * @buflen: the length of the TPM command buffer
1207 * We are about to suspend. Save the TPM state
1229 /* for buggy tpm, flush pcrs with extend to selected dummy */ in tpm_pm_suspend()
1241 * If the TPM indicates that it is too busy to respond to in tpm_pm_suspend()
1243 * several seconds for this TPM to be ready. in tpm_pm_suspend()
1245 * This can happen if the TPM has already been sent the in tpm_pm_suspend()
1248 * may cause the TPM to invalidate previously saved state. in tpm_pm_suspend()
1259 dev_warn(&chip->dev, "TPM savestate took %dms\n", in tpm_pm_suspend()
1268 * the TPM state.
1289 * tpm_get_random() - get random bytes from the TPM's RNG
1359 * Note: only TPM 2.0 chip are supported. TPM 1.x implementation is located in
1386 * Note: only TPM 2.0 chip are supported. TPM 1.x implementation is located in
1413 tpm_class = class_create(THIS_MODULE, "tpm"); in tpm_init()
1415 pr_err("couldn't create tpm class\n"); in tpm_init()
1426 rc = alloc_chrdev_region(&tpm_devt, 0, 2*TPM_NUM_DEVICES, "tpm"); in tpm_init()
1428 pr_err("tpm: failed to allocate char dev region\n"); in tpm_init()
1449 MODULE_DESCRIPTION("TPM Driver");