Lines Matching +full:hall +full:- +full:switch +full:-

1 // SPDX-License-Identifier: GPL-2.0-only
8 * Kylene Hall <kjhall@us.ibm.com>
65 out->algorithm, in pubek_show()
66 out->encscheme, in pubek_show()
67 out->sigscheme, in pubek_show()
68 out->parameters, in pubek_show()
69 be32_to_cpu(out->keysize)); in pubek_show()
72 str += sprintf(str, "%16ph\n", &out->modulus[i]); in pubek_show()
78 return str - buf; in pubek_show()
107 str += sprintf(str, "PCR-%02d: ", i); in pcrs_show()
113 return str - buf; in pcrs_show()
245 version->major, version->minor, in caps_show()
246 version->rev_major, version->rev_minor); in caps_show()
248 rc = str - buf; in caps_show()
264 chip->ops->cancel(chip); in cancel_store()
275 if (chip->duration[TPM_LONG] == 0) in durations_show()
279 jiffies_to_usecs(chip->duration[TPM_SHORT]), in durations_show()
280 jiffies_to_usecs(chip->duration[TPM_MEDIUM]), in durations_show()
281 jiffies_to_usecs(chip->duration[TPM_LONG]), in durations_show()
282 chip->duration_adjusted in durations_show()
293 jiffies_to_usecs(chip->timeout_a), in timeouts_show()
294 jiffies_to_usecs(chip->timeout_b), in timeouts_show()
295 jiffies_to_usecs(chip->timeout_c), in timeouts_show()
296 jiffies_to_usecs(chip->timeout_d), in timeouts_show()
297 chip->timeout_adjusted in timeouts_show()
307 return sprintf(buf, "%s\n", chip->flags & TPM_CHIP_FLAG_TPM2 in tpm_version_major_show()
360 for (i = 0; i < chip->nr_allocated_banks; i++) in pcr_value_show()
361 if (ha->alg_id == chip->allocated_banks[i].alg_id) in pcr_value_show()
362 digest_size = chip->allocated_banks[i].digest_size; in pcr_value_show()
365 return -EINVAL; in pcr_value_show()
367 digest.alg_id = ha->alg_id; in pcr_value_show()
368 rc = tpm_pcr_read(chip, ha->pcr, &digest); in pcr_value_show()
375 return str - buf; in pcr_value_show()
383 * until a cat of the file returns -EINVAL
446 .name = "pcr-" __stringify(_hash), \
462 * added to chip->groups[].
467 * pcr-<hash>, so it must not clash with any other names already
481 WARN_ON(chip->groups_cnt != 0); in tpm_sysfs_add_device()
486 if (chip->flags & TPM_CHIP_FLAG_TPM2) in tpm_sysfs_add_device()
487 chip->groups[chip->groups_cnt++] = &tpm2_dev_group; in tpm_sysfs_add_device()
489 chip->groups[chip->groups_cnt++] = &tpm1_dev_group; in tpm_sysfs_add_device()
492 for (i = 0; i < chip->nr_allocated_banks; i++) { in tpm_sysfs_add_device()
493 switch (chip->allocated_banks[i].alg_id) { in tpm_sysfs_add_device()
495 chip->groups[chip->groups_cnt++] = &pcr_group_sha1; in tpm_sysfs_add_device()
498 chip->groups[chip->groups_cnt++] = &pcr_group_sha256; in tpm_sysfs_add_device()
501 chip->groups[chip->groups_cnt++] = &pcr_group_sha384; in tpm_sysfs_add_device()
504 chip->groups[chip->groups_cnt++] = &pcr_group_sha512; in tpm_sysfs_add_device()
507 chip->groups[chip->groups_cnt++] = &pcr_group_sm3; in tpm_sysfs_add_device()
514 * case in this switch statement. in tpm_sysfs_add_device()
516 dev_err(&chip->dev, in tpm_sysfs_add_device()
518 chip->allocated_banks[i].alg_id); in tpm_sysfs_add_device()
528 WARN_ON(chip->groups_cnt > TPM_MAX_HASHES + 1); in tpm_sysfs_add_device()