Skip to contentSkip to conversation

Documentation: tpm_tis

PATCH Superseded Jarkko Sakkinen 3 participants 9 messages Mar 20, 2024 – Mar 21, 2024

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jarkko Sakkinen

author maintainer
#0 lore raw

PATCH v2 1/1 Documentation: tpm_tis

Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on.

Cc Jonathan Corbet <[email protected]>
CC Daniel P. Smith <[email protected]>
Cc Lino Sanfilippo <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Huewe <[email protected]>
Cc James Bottomley <[email protected]>
Cc Alexander Steffen <[email protected]>
Cc Randy Dunlap <[email protected]>

---
v2:
- Fixed errors reported by Randy:
https://lore.kernel.org/all/[email protected]/
- Improved the text a bit to have a better presentation.

---
 Documentation/security/tpm/index.rst   |  1 +
 Documentation/security/tpm/tpm_tis.rst | 30 ++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 Documentation/security/tpm/tpm_tis.rst
Documentation/security/tpm/index.rst +1 -0
index fc40e9f23c85..f27a17f60a96 100644
@@ -5,6 +5,7 @@ Trusted Platform Module documentation
 .. toctree::
 
    tpm_event_log
+   tpm_tis
    tpm_vtpm_proxy
    xen-tpmfront
    tpm_ftpm_tee
Documentation/security/tpm/tpm_tis.rst new file +30 -0
new file mode 100644
index 000000000000..b331813b3c45
@@ -0,0 +1,30 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=========================
+TPM FIFO interface Driver
+=========================
+
+FIFO (First-In-First-Out) is the name of the hardware interface used by the
+tpm_tis_core dependent drivers. The prefix "tis" comes from the TPM Interface
+Specification, which is the hardware interface specification for TPM 1.x chips.
+
+Communication is based on a 5 KiB buffer shared by the TPM chip through a
+hardware bus or memory map, depending on the physical wiring. The buffer is
+further split into five equal-size buffers, which provide equivalent sets of
+registers for communication between the CPU and TPM. These communication
+endpoints are called localities in the TCG terminology.
+
+When the kernel wants to send commands to the TPM chip, it first reserves
+locality 0 by setting the requestUse bit in the TPM_ACCESS register. The bit is
+cleared by the chip when the access is granted. Once it completes its
+communication, the kernel writes the TPM_ACCESS.activeLocality bit. This
+informs the chip that the locality has been relinquished.
+
+Pending localities are served in order by the chip in descending order, one at
+a time:
+
+- Locality 0 has the lowest priority.
+- Locality 5 has the highest priority.
+
+Further information on the purpose and meaning of the localities can be found
+in section 3.2 of the TCG PC Client Platform TPM Profile Specification.
Signature · 1 line
2.44.0
reviewer Reviewed-by on v2 1/1
#1 lore raw

Hi,

Quoted 4 lines · Jarkko Sakkinen

Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on.

Quoted 13 lines
Cc Jonathan Corbet <[email protected]>
CC Daniel P. Smith <[email protected]>
Cc Lino Sanfilippo <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Huewe <[email protected]>
Cc James Bottomley <[email protected]>
Cc Alexander Steffen <[email protected]>
Cc Randy Dunlap <[email protected]>

Makes sense to me. Thanks.

Quoted 59 lines

---
v2:
- Fixed errors reported by Randy:
https://lore.kernel.org/all/[email protected]/
- Improved the text a bit to have a better presentation.

---
 Documentation/security/tpm/index.rst   |  1 +
 Documentation/security/tpm/tpm_tis.rst | 30 ++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 Documentation/security/tpm/tpm_tis.rst
Documentation/security/tpm/index.rst +1 -0
index fc40e9f23c85..f27a17f60a96 100644
@@ -5,6 +5,7 @@ Trusted Platform Module documentation
 .. toctree::
 
    tpm_event_log
+   tpm_tis
    tpm_vtpm_proxy
    xen-tpmfront
    tpm_ftpm_tee
Documentation/security/tpm/tpm_tis.rst new file +30 -0
new file mode 100644
index 000000000000..b331813b3c45
@@ -0,0 +1,30 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=========================
+TPM FIFO interface Driver
+=========================
+
+FIFO (First-In-First-Out) is the name of the hardware interface used by the
+tpm_tis_core dependent drivers. The prefix "tis" comes from the TPM Interface
+Specification, which is the hardware interface specification for TPM 1.x chips.
+
+Communication is based on a 5 KiB buffer shared by the TPM chip through a
+hardware bus or memory map, depending on the physical wiring. The buffer is
+further split into five equal-size buffers, which provide equivalent sets of
+registers for communication between the CPU and TPM. These communication
+endpoints are called localities in the TCG terminology.
+
+When the kernel wants to send commands to the TPM chip, it first reserves
+locality 0 by setting the requestUse bit in the TPM_ACCESS register. The bit is
+cleared by the chip when the access is granted. Once it completes its
+communication, the kernel writes the TPM_ACCESS.activeLocality bit. This
+informs the chip that the locality has been relinquished.
+
+Pending localities are served in order by the chip in descending order, one at
+a time:
+
+- Locality 0 has the lowest priority.
+- Locality 5 has the highest priority.
+
+Further information on the purpose and meaning of the localities can be found
+in section 3.2 of the TCG PC Client Platform TPM Profile Specification.
Signature · 1 line
#Randy
#3 lore raw
In reply to Jarkko Sakkinen
Quoted 46 lines · Jarkko Sakkinen

Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on.

Cc Jonathan Corbet <[email protected]>
CC Daniel P. Smith <[email protected]>
Cc Lino Sanfilippo <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Huewe <[email protected]>
Cc James Bottomley <[email protected]>
Cc Alexander Steffen <[email protected]>
Cc Randy Dunlap <[email protected]>

---
v2:
- Fixed errors reported by Randy:

   https://lore.kernel.org/all/[email protected]/
- Improved the text a bit to have a better presentation.
---
  Documentation/security/tpm/index.rst   |  1 +
  Documentation/security/tpm/tpm_tis.rst | 30 ++++++++++++++++++++++++++
  2 files changed, 31 insertions(+)

create mode 100644 Documentation/security/tpm/tpm_tis.rst

Documentation/security/tpm/index.rst +1 -0
index fc40e9f23c85..f27a17f60a96 100644
@@ -5,6 +5,7 @@ Trusted Platform Module documentation
  .. toctree::
 
     tpm_event_log
+   tpm_tis
     tpm_vtpm_proxy
     xen-tpmfront
     tpm_ftpm_tee
Documentation/security/tpm/tpm_tis.rst new file +0 -0
new file mode 100644
index 000000000000..b331813b3c45

Documentation/security/tpm/tpm_tis.rst line 7

Quoted 7 lines
Documentation/security/tpm/tpm_tis.rst new file +7 -0
@@ -0,0 +1,30 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=========================
+TPM FIFO interface Driver
+=========================
+
+FIFO (First-In-First-Out) is the name of the hardware interface used by the

FIFO is the type. I am surprised you call it a 'name'. I would say TIS is the 'name'.

Documentation/security/tpm/tpm_tis.rst line 8

Quoted 1 line
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+tpm_tis_core dependent drivers. The prefix "tis" comes from the TPM Interface

tis is a tla -- a three letter *acronym*. You aren't using it as a 'prefix'.

Documentation/security/tpm/tpm_tis.rst line 9

Quoted 1 line
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+Specification, which is the hardware interface specification for TPM 1.x chips.

It's also available for TPM2.

Documentation/security/tpm/tpm_tis.rst line 11

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +2 -0
+
+Communication is based on a 5 KiB buffer shared by the TPM chip through a

I thought it was typically 4 KiB.

Documentation/security/tpm/tpm_tis.rst line 13

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +2 -0
+hardware bus or memory map, depending on the physical wiring. The buffer is
+further split into five equal-size buffers, which provide equivalent sets of

equal-sized MMIO regions?

Documentation/security/tpm/tpm_tis.rst line 24

Quoted 11 lines
Documentation/security/tpm/tpm_tis.rst new file +11 -0
+registers for communication between the CPU and TPM. These communication
+endpoints are called localities in the TCG terminology.
+
+When the kernel wants to send commands to the TPM chip, it first reserves
+locality 0 by setting the requestUse bit in the TPM_ACCESS register. The bit is
+cleared by the chip when the access is granted. Once it completes its
+communication, the kernel writes the TPM_ACCESS.activeLocality bit. This
+informs the chip that the locality has been relinquished.
+
+Pending localities are served in order by the chip in descending order, one at
+a time:

I think I know what pending localities are because I have worked with this device but I am not sure whether the user can deduce this from the paragraph above. Also, why this particular detail when the driver only uses locality 0 and nobody is competing about access to localities?

Quoted 6 lines
Documentation/security/tpm/tpm_tis.rst new file +6 -0
+
+- Locality 0 has the lowest priority.
+- Locality 5 has the highest priority.
+
+Further information on the purpose and meaning of the localities can be found
+in section 3.2 of the TCG PC Client Platform TPM Profile Specification.
author maintainer
#4 lore raw
Quoted 51 lines · Stefan Berger
Quoted 48 lines · Jarkko Sakkinen

Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on.

Cc Jonathan Corbet <[email protected]>
CC Daniel P. Smith <[email protected]>
Cc Lino Sanfilippo <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Huewe <[email protected]>
Cc James Bottomley <[email protected]>
Cc Alexander Steffen <[email protected]>
Cc Randy Dunlap <[email protected]>

---
v2:
- Fixed errors reported by Randy:

   https://lore.kernel.org/all/[email protected]/
- Improved the text a bit to have a better presentation.
---
  Documentation/security/tpm/index.rst   |  1 +
  Documentation/security/tpm/tpm_tis.rst | 30 ++++++++++++++++++++++++++
  2 files changed, 31 insertions(+)

create mode 100644 Documentation/security/tpm/tpm_tis.rst

Documentation/security/tpm/index.rst +1 -0
index fc40e9f23c85..f27a17f60a96 100644
@@ -5,6 +5,7 @@ Trusted Platform Module documentation
  .. toctree::
 
     tpm_event_log
+   tpm_tis
     tpm_vtpm_proxy
     xen-tpmfront
     tpm_ftpm_tee
Documentation/security/tpm/tpm_tis.rst new file +2 -0
new file mode 100644
index 000000000000..b331813b3c45
@@ -0,0 +1,30 @@
+.. SPDX-License-Identifier: GPL-2.0
+
Quoted 8 lines

Documentation/security/tpm/tpm_tis.rst line 7

Quoted 5 lines
Documentation/security/tpm/tpm_tis.rst new file +5 -0
+=========================
+TPM FIFO interface Driver
+=========================
+
+FIFO (First-In-First-Out) is the name of the hardware interface used by the

FIFO is the type. I am surprised you call it a 'name'. I would say TIS is the 'name'.

It's what the official specification calls it [1].

Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 8

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+tpm_tis_core dependent drivers. The prefix "tis" comes from the TPM Interface

tis is a tla -- a three letter *acronym*. You aren't using it as a 'prefix'.

I don't know what "tla" means.

Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 9

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+Specification, which is the hardware interface specification for TPM 1.x chips.

It's also available for TPM2.

Yes, but TIS is the name used by the legacy specification.

Quoted 5 lines

Documentation/security/tpm/tpm_tis.rst line 11

Quoted 3 lines
Documentation/security/tpm/tpm_tis.rst new file +2 -0
+
+Communication is based on a 5 KiB buffer shared by the TPM chip through a

I thought it was typically 4 KiB.

You are basing this on table 9 in [1]?

Quoted 5 lines

Documentation/security/tpm/tpm_tis.rst line 13

Quoted 3 lines
Documentation/security/tpm/tpm_tis.rst new file +2 -0
+hardware bus or memory map, depending on the physical wiring. The buffer is
+further split into five equal-size buffers, which provide equivalent sets of

equal-sized MMIO regions?

I'm not sure what spec you are referring to but [1] defines also other communication paths.

Quoted 17 lines

Documentation/security/tpm/tpm_tis.rst line 24

Quoted 12 lines
Documentation/security/tpm/tpm_tis.rst new file +11 -0
+registers for communication between the CPU and TPM. These communication
+endpoints are called localities in the TCG terminology.
+
+When the kernel wants to send commands to the TPM chip, it first reserves
+locality 0 by setting the requestUse bit in the TPM_ACCESS register. The bit is
+cleared by the chip when the access is granted. Once it completes its
+communication, the kernel writes the TPM_ACCESS.activeLocality bit. This
+informs the chip that the locality has been relinquished.
+
+Pending localities are served in order by the chip in descending order, one at
+a time:

I think I know what pending localities are because I have worked with this device but I am not sure whether the user can deduce this from the paragraph above. Also, why this particular detail when the driver only uses locality 0 and nobody is competing about access to localities?

This is pretty good summary that is IMHO somewhat useful.

You are welcome to contribute to the documentation but it has to start from something.

Quoted 7 lines

Documentation/security/tpm/tpm_tis.rst line 30

Quoted 7 lines
Documentation/security/tpm/tpm_tis.rst new file +6 -0
+
+- Locality 0 has the lowest priority.
+- Locality 5 has the highest priority.
+
+Further information on the purpose and meaning of the localities can be found
+in section 3.2 of the TCG PC Client Platform TPM Profile Specification.

o

[1] https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/

BR, Jarkko

author maintainer
#2 lore raw
In reply to Randy Dunlap
Quoted 21 lines · Randy Dunlap

Hi,

Quoted 4 lines · Jarkko Sakkinen

Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on.

Quoted 13 lines
Cc Jonathan Corbet <[email protected]>
CC Daniel P. Smith <[email protected]>
Cc Lino Sanfilippo <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Huewe <[email protected]>
Cc James Bottomley <[email protected]>
Cc Alexander Steffen <[email protected]>
Cc Randy Dunlap <[email protected]>
Quoted 3 lines

Makes sense to me. Thanks.

Good to hear, I tried to write a summary that makes common sense :-)

Thanks for the review!

BR, Jarkko

#5 lore raw
In reply to Jarkko Sakkinen
Quoted 69 lines · Jarkko Sakkinen
Quoted 51 lines · Stefan Berger
Quoted 48 lines · Jarkko Sakkinen

Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on.

Cc Jonathan Corbet <[email protected]>
CC Daniel P. Smith <[email protected]>
Cc Lino Sanfilippo <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Huewe <[email protected]>
Cc James Bottomley <[email protected]>
Cc Alexander Steffen <[email protected]>
Cc Randy Dunlap <[email protected]>

---
v2:
- Fixed errors reported by Randy:

    https://lore.kernel.org/all/[email protected]/
- Improved the text a bit to have a better presentation.
---
   Documentation/security/tpm/index.rst   |  1 +
   Documentation/security/tpm/tpm_tis.rst | 30 ++++++++++++++++++++++++++
   2 files changed, 31 insertions(+)

create mode 100644 Documentation/security/tpm/tpm_tis.rst

Documentation/security/tpm/index.rst +1 -0
index fc40e9f23c85..f27a17f60a96 100644
@@ -5,6 +5,7 @@ Trusted Platform Module documentation
   .. toctree::
 
      tpm_event_log
+   tpm_tis
      tpm_vtpm_proxy
      xen-tpmfront
      tpm_ftpm_tee
Documentation/security/tpm/tpm_tis.rst new file +2 -0
new file mode 100644
index 000000000000..b331813b3c45
@@ -0,0 +1,30 @@
+.. SPDX-License-Identifier: GPL-2.0
+
Quoted 8 lines

Documentation/security/tpm/tpm_tis.rst line 7

Quoted 5 lines
Documentation/security/tpm/tpm_tis.rst new file +5 -0
+=========================
+TPM FIFO interface Driver
+=========================
+
+FIFO (First-In-First-Out) is the name of the hardware interface used by the

FIFO is the type. I am surprised you call it a 'name'. I would say TIS is the 'name'.

It's what the official specification calls it [1].

Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 8

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+tpm_tis_core dependent drivers. The prefix "tis" comes from the TPM Interface

tis is a tla -- a three letter *acronym*. You aren't using it as a 'prefix'.

Quoted 8 lines

I don't know what "tla" means.

Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 9

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+Specification, which is the hardware interface specification for TPM 1.x chips.

It's also available for TPM2.

Yes, but TIS is the name used by the legacy specification.

The point is that TIS is not just a TPM 1.x interface but also used for TPM 2.

Quoted 8 lines
Quoted 6 lines

Documentation/security/tpm/tpm_tis.rst line 11

Quoted 4 lines
Documentation/security/tpm/tpm_tis.rst new file +2 -0
+
+Communication is based on a 5 KiB buffer shared by the TPM chip through a

I thought it was typically 4 KiB.

You are basing this on table 9 in [1]?

Yes. See below.

Quoted 4 lines
Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 13

Quoted 4 lines
Documentation/security/tpm/tpm_tis.rst new file +2 -0
+hardware bus or memory map, depending on the physical wiring. The buffer is
+further split into five equal-size buffers, which provide equivalent sets of

If you are referring to the MMIO region between 0xfed4 0000 and 0xfed4 4fff as a buffer then you are talking about a **20kb** MMIO region (0x5000) that is **split** into equal-sized MMIO regions, each having 4kb (0x1000). Yes, that's the 4kb then but there that one is no 5kb 'further split into five equal-sized buffers' of presumably 1kb each. Each locality has a 0x1000 sized MMIO region.

author maintainer
#6 lore raw
Quoted 77 lines · Stefan Berger
Quoted 74 lines · Jarkko Sakkinen
Quoted 51 lines · Stefan Berger
Quoted 48 lines · Jarkko Sakkinen

Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on.

Cc Jonathan Corbet <[email protected]>
CC Daniel P. Smith <[email protected]>
Cc Lino Sanfilippo <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Huewe <[email protected]>
Cc James Bottomley <[email protected]>
Cc Alexander Steffen <[email protected]>
Cc Randy Dunlap <[email protected]>

---
v2:
- Fixed errors reported by Randy:

    https://lore.kernel.org/all/[email protected]/
- Improved the text a bit to have a better presentation.
---
   Documentation/security/tpm/index.rst   |  1 +
   Documentation/security/tpm/tpm_tis.rst | 30 ++++++++++++++++++++++++++
   2 files changed, 31 insertions(+)

create mode 100644 Documentation/security/tpm/tpm_tis.rst

Documentation/security/tpm/index.rst +1 -0
index fc40e9f23c85..f27a17f60a96 100644
@@ -5,6 +5,7 @@ Trusted Platform Module documentation
   .. toctree::
 
      tpm_event_log
+   tpm_tis
      tpm_vtpm_proxy
      xen-tpmfront
      tpm_ftpm_tee
Documentation/security/tpm/tpm_tis.rst new file +2 -0
new file mode 100644
index 000000000000..b331813b3c45
@@ -0,0 +1,30 @@
+.. SPDX-License-Identifier: GPL-2.0
+
Quoted 8 lines

Documentation/security/tpm/tpm_tis.rst line 7

Quoted 5 lines
Documentation/security/tpm/tpm_tis.rst new file +5 -0
+=========================
+TPM FIFO interface Driver
+=========================
+
+FIFO (First-In-First-Out) is the name of the hardware interface used by the

FIFO is the type. I am surprised you call it a 'name'. I would say TIS is the 'name'.

It's what the official specification calls it [1].

Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 8

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+tpm_tis_core dependent drivers. The prefix "tis" comes from the TPM Interface

tis is a tla -- a three letter *acronym*. You aren't using it as a 'prefix'.

I don't know what "tla" means.

Quoted 3 lines
Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+Specification, which is the hardware interface specification for TPM 1.x chips.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

It's also available for TPM2.

Yes, but TIS is the name used by the legacy specification.

The point is that TIS is not just a TPM 1.x interface but also used for TPM 2.

FIFO interface is what is used in the spec so I'll stick to that.

Quoted 13 lines
Quoted 8 lines
Quoted 6 lines

Documentation/security/tpm/tpm_tis.rst line 11

Quoted 4 lines
Documentation/security/tpm/tpm_tis.rst new file +2 -0
+
+Communication is based on a 5 KiB buffer shared by the TPM chip through a

I thought it was typically 4 KiB.

You are basing this on table 9 in [1]?

Yes. See below.

Quoted 2 lines
Quoted 2 lines
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

Documentation/security/tpm/tpm_tis.rst line 13

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +2 -0
+hardware bus or memory map, depending on the physical wiring. The buffer is
+further split into five equal-size buffers, which provide equivalent sets of

If you are referring to the MMIO region between 0xfed4 0000 and 0xfed4 4fff as a buffer then you are talking about a **20kb** MMIO region (0x5000) that is **split** into equal-sized MMIO regions, each having 4kb (0x1000). Yes, that's the 4kb then but there that one is no 5kb 'further split into five equal-sized buffers' of presumably 1kb each. Each locality has a 0x1000 sized MMIO region.

Oops, true! I'll fix this part thanks, had a blind spot :-)

Will fix for v3.

BR, Jarkko

author maintainer
#7 lore raw
Quoted 80 lines · Jarkko Sakkinen
Quoted 79 lines · Stefan Berger
Quoted 76 lines · Jarkko Sakkinen
Quoted 51 lines · Stefan Berger
Quoted 48 lines · Jarkko Sakkinen

Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on.

Cc Jonathan Corbet <[email protected]>
CC Daniel P. Smith <[email protected]>
Cc Lino Sanfilippo <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Huewe <[email protected]>
Cc James Bottomley <[email protected]>
Cc Alexander Steffen <[email protected]>
Cc Randy Dunlap <[email protected]>

---
v2:
- Fixed errors reported by Randy:

    https://lore.kernel.org/all/[email protected]/
- Improved the text a bit to have a better presentation.
---
   Documentation/security/tpm/index.rst   |  1 +
   Documentation/security/tpm/tpm_tis.rst | 30 ++++++++++++++++++++++++++
   2 files changed, 31 insertions(+)

create mode 100644 Documentation/security/tpm/tpm_tis.rst

Documentation/security/tpm/index.rst +1 -0
index fc40e9f23c85..f27a17f60a96 100644
@@ -5,6 +5,7 @@ Trusted Platform Module documentation
   .. toctree::
 
      tpm_event_log
+   tpm_tis
      tpm_vtpm_proxy
      xen-tpmfront
      tpm_ftpm_tee
Documentation/security/tpm/tpm_tis.rst new file +2 -0
new file mode 100644
index 000000000000..b331813b3c45
@@ -0,0 +1,30 @@
+.. SPDX-License-Identifier: GPL-2.0
+
Quoted 8 lines

Documentation/security/tpm/tpm_tis.rst line 7

Quoted 5 lines
Documentation/security/tpm/tpm_tis.rst new file +5 -0
+=========================
+TPM FIFO interface Driver
+=========================
+
+FIFO (First-In-First-Out) is the name of the hardware interface used by the

FIFO is the type. I am surprised you call it a 'name'. I would say TIS is the 'name'.

It's what the official specification calls it [1].

Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 8

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+tpm_tis_core dependent drivers. The prefix "tis" comes from the TPM Interface

tis is a tla -- a three letter *acronym*. You aren't using it as a 'prefix'.

I don't know what "tla" means.

Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 9

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+Specification, which is the hardware interface specification for TPM 1.x chips.

It's also available for TPM2.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Yes, but TIS is the name used by the legacy specification.

The point is that TIS is not just a TPM 1.x interface but also used for TPM 2.

FIFO interface is what is used in the spec so I'll stick to that.

E.g. Table 15 - *FIFO* Interface Identifier Register

Not *TIS* Inteface Identifier Register.

I don't want to invent my own terminology here and this the spec that we usually refer in every possible discussion around the topic.

BR, Jarkko

author maintainer
#8 lore raw
Quoted 88 lines · Jarkko Sakkinen
Quoted 87 lines · Jarkko Sakkinen
Quoted 84 lines · Stefan Berger
Quoted 69 lines · Jarkko Sakkinen
Quoted 51 lines · Stefan Berger
Quoted 48 lines · Jarkko Sakkinen

Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on.

Cc Jonathan Corbet <[email protected]>
CC Daniel P. Smith <[email protected]>
Cc Lino Sanfilippo <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Peter Huewe <[email protected]>
Cc James Bottomley <[email protected]>
Cc Alexander Steffen <[email protected]>
Cc Randy Dunlap <[email protected]>

---
v2:
- Fixed errors reported by Randy:

    https://lore.kernel.org/all/[email protected]/
- Improved the text a bit to have a better presentation.
---
   Documentation/security/tpm/index.rst   |  1 +
   Documentation/security/tpm/tpm_tis.rst | 30 ++++++++++++++++++++++++++
   2 files changed, 31 insertions(+)

create mode 100644 Documentation/security/tpm/tpm_tis.rst

Documentation/security/tpm/index.rst +1 -0
index fc40e9f23c85..f27a17f60a96 100644
@@ -5,6 +5,7 @@ Trusted Platform Module documentation
   .. toctree::
 
      tpm_event_log
+   tpm_tis
      tpm_vtpm_proxy
      xen-tpmfront
      tpm_ftpm_tee
Documentation/security/tpm/tpm_tis.rst new file +2 -0
new file mode 100644
index 000000000000..b331813b3c45
@@ -0,0 +1,30 @@
+.. SPDX-License-Identifier: GPL-2.0
+
Quoted 8 lines

Documentation/security/tpm/tpm_tis.rst line 7

Quoted 5 lines
Documentation/security/tpm/tpm_tis.rst new file +5 -0
+=========================
+TPM FIFO interface Driver
+=========================
+
+FIFO (First-In-First-Out) is the name of the hardware interface used by the

FIFO is the type. I am surprised you call it a 'name'. I would say TIS is the 'name'.

It's what the official specification calls it [1].

Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 8

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+tpm_tis_core dependent drivers. The prefix "tis" comes from the TPM Interface

tis is a tla -- a three letter *acronym*. You aren't using it as a 'prefix'.

Quoted 8 lines

I don't know what "tla" means.

Quoted 4 lines

Documentation/security/tpm/tpm_tis.rst line 9

Quoted 2 lines
Documentation/security/tpm/tpm_tis.rst new file +1 -0
+Specification, which is the hardware interface specification for TPM 1.x chips.

It's also available for TPM2.

Yes, but TIS is the name used by the legacy specification.

The point is that TIS is not just a TPM 1.x interface but also used for TPM 2.

Quoted 8 lines
Quoted 1 line

FIFO interface is what is used in the spec so I'll stick to that.

E.g. Table 15 - *FIFO* Interface Identifier Register

Not *TIS* Inteface Identifier Register.

I don't want to invent my own terminology here and this the spec that we usually refer in every possible discussion around the topic.

That table actually also clarifies this pretty well, see interface type:

0000 – FIFO interface as defined in PTP for TPM 2.0 is active. 0001 – CRB interface is active.
1111 – FIFO interface as defined in TIS1.3 is active (all other fields of this register are don’t care).

E.g. FIFO interface can be configured according to TIS 1.3 specification but the interface is still referred as FIFO interface in the current spec.

BR, Jarkko