Thread (13 messages) 13 messages, 2 authors, 2020-06-17

Re: [PATCH v10 1/8] tpm: Make read{16, 32}() and write32() in tpm_tis_phy_ops optional

From: Jarkko Sakkinen <hidden>
Date: 2020-06-17 00:37:42
Also in: linux-integrity, lkml

On Thu, Jun 04, 2020 at 04:47:06PM +0300, amirmizi6@gmail.com wrote:
From: Amir Mizinski <redacted>

Only tpm_tis can use memory-mapped I/O, which is truly mapped into
the kernel's memory space. Therefore, using ioread16/ioread32/iowrite32
turns into a straightforward pointer dereference.
Every other driver requires more complicated operations to read more than
one byte at a time and will just fall back to read_bytes/write_bytes.
Therefore, move this common code out of tpm_tis_spi and into tpm_tis_core
so that it is used automatically when low-level drivers do not implement
the specialized methods.

Co-developed-by: Alexander Steffen <redacted>
Signed-off-by: Alexander Steffen <redacted>
Signed-off-by: Amir Mizinski <redacted>
Reviewed-by: Jarkko Sakkinen <redacted>
Tested-by: Jarkko Sakkinen <redacted>

I tested this with my T480 ThinkPad, which has Infineon SLB 9670 TPM
chip according to TPM_PT_VENDOR_STRING_* [*]

[*] tpm2_getcap properties-fixed from tpm2-tools package to fetch this
    information.

/Jarkko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help