I’m using the AMD 7840U version of the Framework 13 with bios 3.05, and I’m having problems reading the TPM Event Log (/sys/firmware/acpi/tables/TPM2 or /sys/kernel/security/tpm0/binary_bios_measurements). This has been reported before, but I could not find any resolution of the issue. I’ve tried with Qubes 4.2 (kernel 6.6.54-1) and with arch Linux live USB. Both give an ACPI table where the addresses are null pointers.
Can anyone with an AMD laptop running Linux see (and read) the binary_bios_measurements file? I’ve spent way too long on this issue, and I need a sanity check from someone.
This is starting to look like a firmware issue. Am I correct in assuming that you see a similar (very short) output from sudo tpm2_eventlog /sys/kernel/security/tpm0/binary_bios_measurements?
Kernel 6.12.0 gives output that has lots of lines from:
00000000:
to
0000d750:
With regards to the contents, it looks a lot like content grub might have put in there. So not necessarily populated by the BIOS.
I have Ubuntu 24.04. Mainline kernel 6.12.0 (compiled my me)
with ubuntu kernel: 6.8.0-49-generic
gives output that has lots of lines from:
00000000:
to
0000fd70:
Wow… you completely broke my theory of what’s going on… thank you.
My understanding was that if the ACPI table TPM2 exists, then it loads the table based on the two pointers at the end of that file, even if they are null pointers. If the table does not exist, it instead reads the event log from EFI instead. I though my issue was that my last two pointers were all zeroes, but my ACPI/TPM2 table is identical to yours… Could you please let me know which distro and kernel version you are running? Never mind, I just noticed that you included that information above.
Nov 23 16:39:35 dom0 kernel: efi: ACPI=0x5affe000 ACPI 2.0=0x5affe014 TPMFinalLog=0x5af3f000 SMBIOS=0x58e77000 SMBIOS 3.0=0x58e74000 (MEMATTR=0x52f4d018 unusable) ESRT=0x5af95018
Nov 23 16:39:35 dom0 kernel: ACPI: TPM2 0x000000005AFE9000 000050 (v05 INSYDE EDK2 20505348 ACPI 00040000)
Nov 23 16:39:35 dom0 kernel: ACPI: Reserving TPM2 table memory at [mem 0x5afe9000-0x5afe904f]
Nov 23 16:39:35 dom0 systemd[1]: systemd 251.19-1.fc37 running in system mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP -GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN -IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
Nov 23 16:39:35 dom0 systemd-sysusers[282]: Creating user 'tss' (Account used for TPM access) with UID 59 and GID 59.
Nov 23 16:40:00 dom0 systemd[1]: systemd 251.19-1.fc37 running in system mode (+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP -GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN -IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
On my efi: line I list the address for TPMFinalLog, but I miss a lot of addresses you have, probably most importantly TPMEventLog. Now I have to figure out where this data comes from. I got TPMEventLog when I ran Ubuntu Live, but by table was a single post there.
Just to verify that your event log isn’t only grub, could you check if your sudo tpm2_eventlog /sys/kernel/security/tpm0/binary_bios_measurements includes events on PCR4? It is set before grub is even loaded.
I think you are on to something with the difference in “efi:” line.
The “(MEMATTR=0x52f4d018 unusable)” seems to be the problem with your laptop.
The “unusable” bit is the difference between yours and mine.
Right, thanks for pointing that out. I noticed that earlier, but not in regards to the TPM stuff, so I think I got blind to it. I’ll take a look at that.