From: Dan Holmes-Mitra <dholmesm@google.com>
To: u-boot@lists.u-boot-project.org
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH 0/2] tpm: Fix MMIO TIS reg size parsing and absent-device detection
Date: Thu, 03 Dec 2026 02:20:38 GMT [thread overview]
Message-ID: <20261203022028.01-00-dholmesm@google.com> (raw)
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
next reply other threads:[~2026-12-03 5:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 2:20 Dan Holmes-Mitra [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261203022028.01-00-dholmesm@google.com \
--to=dholmesm@google.com \
--cc=ilias.apalodimas@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox