Re: [PATCH v4] tpm_crb: fix fTPM on AMD Zen+ CPUs

From: Jarkko Sakkinen
Date: Mon Sep 16 2019 - 01:26:25 EST


On Sat, Sep 14, 2019 at 08:17:44PM +0300, ivan.lazeev@xxxxxxxxx wrote:
> From: Ivan Lazeev <ivan.lazeev@xxxxxxxxx>
>
> Bug link: https://bugzilla.kernel.org/show_bug.cgi?id=195657
>
> cmd/rsp buffers are expected to be in the same ACPI region.
> For Zen+ CPUs BIOS's might report two different regions, some of
> them also report region sizes inconsistent with values from TPM
> registers.
>
> Memory configuration on ASRock x470 ITX:
>
> db0a0000-dc59efff : Reserved
> dc57e000-dc57efff : MSFT0101:00
> dc582000-dc582fff : MSFT0101:00

This is interesting and great thing for us because we can test fully
the tpm_crb part without requiring NVS tweaks. And NVS tweak can then
be built on top of working code.

So far I've seen only AMD fTPM's that report NVS regions. This is
important thing to have in the commit message.

I'll give a detailed review later on.

/Jarkko