qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 0/3] Add support for TPM devices over I2C bus


From: Stefan Berger
Subject: Re: [PATCH v7 0/3] Add support for TPM devices over I2C bus
Date: Mon, 27 Mar 2023 07:17:06 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0



On 3/27/23 04:04, Joel Stanley wrote:
On Mon, 27 Mar 2023 at 03:52, Ninad Palsule <ninad@linux.vnet.ibm.com> wrote:

Hi Joel,

On 3/26/23 8:05 PM, Joel Stanley wrote:
Hi Ninad,

On Sun, 26 Mar 2023 at 22:44, Ninad Palsule <ninad@linux.ibm.com> wrote:
Hello,

I have incorporated review comments from Stefan. Please review.

This drop adds support for the TPM devices attached to the I2C bus. It
only supports the TPM2 protocol. You need to run it with the external
TPM emulator like swtpm. I have tested it with swtpm.
Nice work. I tested these stop cedric's aspeed-8.0 qemu tree, using
the rainier machine and the openbmc dev-6.1 kernel.

We get this message when booting from a kernel:

[    0.582699] tpm_tis_i2c 12-002e: 2.0 TPM (device-id 0x1, rev-id 1)
[    0.586361] tpm tpm0: A TPM error (256) occurred attempting the self test
[    0.586623] tpm tpm0: starting up the TPM manually

Do we understand why the error appears?


Yes, As per kernel code this is an expected error for some emulators.

On swtpm emulator, It returns TPM2_RC_INITIALIZE if emulator is not
initialized. I searched it in swtpm and it indicated that selftest
requested before it is initialized. I meant to ask Stefan but busy with
the review comments.

The swtpm man page mentions some flags we can set. Perhaps they would help?

        --flags [not-need-init]
[,startup-clear|startup-state|startup-deactivated|startup-none]

With firmware initializing the TPM 2 neither of these options is necessary.
If firmware doesn't initialize the TPM 2 then Linux will show that error 
message and initialize it.



   Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]