Re: MSI B350M MORTAR: tpm tpm0: AMD fTPM version 0x3005700000004 causes system stutter; hwrng disabled

From: Jason A. Donenfeld
Date: Sun Jun 25 2023 - 10:54:13 EST


On Sun, Jun 25, 2023 at 10:20:22AM +0200, Paul Menzel wrote:
> Thank you for your great work on the Linux kernel.
>
> On an MSI MS-7A37/B350M MORTAR (MS-7A37) even updating to their latest
> system firmware 1.O7 released on their Web site on May, 23rd 2023 [1].
>
> > Beschreibung:
> > - AGESA ComboAm4v2PI 1.2.0.A. update.
> > - TPM Out of Bounds Access security patch.
>
> But Linux 6.4.-rc7 still disables the hwrng from AMD fTPM.
>
> Jun 24 21:32:09.978772 tokeiihto kernel: DMI: Micro-Star
> International Co., Ltd. MS-7A37/B350M MORTAR (MS-7A37), BIOS 1.O7 05/09/2023
> […]
> Jun 24 21:32:10.259986 tokeiihto kernel: tpm tpm0: AMD fTPM
> version 0x3005700000004 causes system stutter; hwrng disabled
>
> Unfortunately, the warning does not say, what firmware version is
> needed, and what the user can do about it.
>
> The comment in the code, added in v6.3-rc2 with commit f1324bbc4011
> (tpm: disable hwrng for fTPM on some AMD designs) [2], says:
>
> /*
> * Some AMD fTPM versions may cause stutter
> * https://www.amd.com/en/support/kb/faq/pa-410
> *
> * Fixes are available in two series of fTPM firmware:
> * 6.x.y.z series: 6.0.18.6 +
> * 3.x.y.z series: 3.57.y.5 +
> */
>
> Mapping 0x3005700000004 from the Linux warning to the comment, I assume
> the board’s firmware is 3.57.0.4?
>
> What AGESA ComboAm4v2PI would MSI need to ship, so the issue is fixed?
> The previous system firmware version shipped 3.4e.0.4? (Is it decimal or
> hexadecimal?)

Sounds like this is a question for MSI - why they haven't updated from
3.57.y.4 to 3.57.y.5+. What can we possibly say about this from a
Linux perspective? The Linux code apparently is working as designed by
avoiding using the buggy firmware gracefully.