All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] tpm: Fix MMIO TIS reg size parsing and absent-device detection
@ 2026-12-03  2:20 Dan Holmes-Mitra
  2026-12-03  2:20 ` [PATCH 1/2] tpm: tpm2_tis_mmio: Read reg size via dev_read_addr_size_index() Dan Holmes-Mitra
  2026-12-03  2:20 ` [PATCH 2/2] tpm: tpm2_tis_core: Reject 0xff TPM_ACCESS and invalid DID/VID Dan Holmes-Mitra
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Holmes-Mitra @ 2026-12-03  2:20 UTC (permalink / raw)
  To: u-boot; +Cc: Ilias Apalodimas, Tom Rini

Two small fixes for the TPM 2.0 TIS MMIO probe path:

1. tpm2_tis_mmio: Use dev_read_addr_size_index(dev, 0, &sz) instead of
   dev_read_u64(dev, "reg", &sz), which read the base address as the
   region size or failed on 32-bit #address-cells/#size-cells DT nodes.
2. tpm2_tis_core: Require status != 0xff in tpm_tis_wait_init() so
   unpopulated MMIO reads (all-ones, which has TPM_ACCESS_VALID set) do
   not falsely pass init, and reject 0xffffffff / 0x00000000 TPM_DID_VID
   values with -ENODEV after releasing locality.

Tested:
- Built qemu_arm64_defconfig with CONFIG_TPM_V2=y, CONFIG_TPM2_TIS_MMIO=y.
- Checked with scripts/checkpatch.pl --strict --u-boot (0 errors, 0 warnings).

Dan Holmes-Mitra (2):
  tpm: tpm2_tis_mmio: Read reg size via dev_read_addr_size_index()
  tpm: tpm2_tis_core: Reject 0xff TPM_ACCESS and invalid DID/VID

 drivers/tpm/tpm2_tis_core.c |  6 +++++-
 drivers/tpm/tpm2_tis_mmio.c | 10 +++-------
 2 files changed, 8 insertions(+), 8 deletions(-)


base-commit: d1caced3a435607435cb7969e34499051a4ac1e6
-- 
2.56.1.911.g883d8bcb20-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-03  5:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  2:20 [PATCH 0/2] tpm: Fix MMIO TIS reg size parsing and absent-device detection Dan Holmes-Mitra
2026-12-03  2:20 ` [PATCH 1/2] tpm: tpm2_tis_mmio: Read reg size via dev_read_addr_size_index() Dan Holmes-Mitra
2026-12-03  2:20 ` [PATCH 2/2] tpm: tpm2_tis_core: Reject 0xff TPM_ACCESS and invalid DID/VID Dan Holmes-Mitra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.