Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313605
b: refs/heads/master
c: 24ebe66
h: refs/heads/master
i:
  313603: 30dd65d
v: v3
  • Loading branch information
Rajiv Andrade committed Jun 12, 2012
1 parent 0b26993 commit 20e8783
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cbb2d5e459f4e10b3f1d11c23c31aa5d7c21e34c
refs/heads/master: 24ebe6670de3d1f0dca11c9eb372134c7ab05503
12 changes: 10 additions & 2 deletions trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,10 +827,10 @@ EXPORT_SYMBOL_GPL(tpm_pcr_extend);
int tpm_do_selftest(struct tpm_chip *chip)
{
int rc;
u8 digest[TPM_DIGEST_SIZE];
unsigned int loops;
unsigned int delay_msec = 1000;
unsigned long duration;
struct tpm_cmd_t cmd;

duration = tpm_calc_ordinal_duration(chip,
TPM_ORD_CONTINUE_SELFTEST);
Expand All @@ -845,7 +845,15 @@ int tpm_do_selftest(struct tpm_chip *chip)
return rc;

do {
rc = __tpm_pcr_read(chip, 0, digest);
/* Attempt to read a PCR value */
cmd.header.in = pcrread_header;
cmd.params.pcrread_in.pcr_idx = cpu_to_be32(0);
rc = tpm_transmit(chip, (u8 *) &cmd, READ_PCR_RESULT_SIZE);

if (rc < TPM_HEADER_SIZE)
return -EFAULT;

rc = be32_to_cpu(cmd.header.out.return_code);
if (rc == TPM_ERR_DISABLED || rc == TPM_ERR_DEACTIVATED) {
dev_info(chip->dev,
"TPM is disabled/deactivated (0x%X)\n", rc);
Expand Down

0 comments on commit 20e8783

Please sign in to comment.