On 12/21/2017 5:19 AM, Alexander.Steffen@xxxxxxxxxxxx wrote:
The error code 38 in definition is TPM_ERR_INVALID_POSTINIT. I
found some explanations which said this error code means that this
command was received in the wrong sequence relative to a
TPM_Startup command. Don't really know what happens here and how
should I deal with this? Any suggestions? Please let me know what
else information should I provide. Thanks
Chris
In addition, from the error code we can tell that it is not actually
a selftest failure. INVALID_POSTINIT for a command other than
TPM_Startup means that no TPM_Startup has been executed for that
power cycle yet, so the TPM has to reject all other commands.
Usually, the platform sends the TPM_Startup command, but not in your
case apparently.
I offer another possibility, based on this:
1 - There are two ways to get TPM_ERR_INVALID_POSTINIT. One is what
Alexander said. The other is a second TPM_Startup without a TPM_Init
(reboot).
2 - Chris said that he gets this when doing an S3 suspend. S3 does
not do a reboot, and thus there should __not__ be a TPM_Startup.
Could it be that the device driver is issuing a TPM_Startup when
resuming from S3?
However, Chris indicated that the TPM_ERR_INVALID_POSTINIT is returned
from 'savestate'. This could only happen if the TPM never got a
TPM_Startup at its first boot, which seems unlikely.