162306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/
262306a36Sopenharmony_ciDate:		April 2005
362306a36Sopenharmony_ciKernelVersion:	2.6.12
462306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
562306a36Sopenharmony_ciDescription:	The device/ directory under a specific TPM instance exposes
662306a36Sopenharmony_ci		the properties of that TPM chip
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/active
1062306a36Sopenharmony_ciDate:		April 2006
1162306a36Sopenharmony_ciKernelVersion:	2.6.17
1262306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
1362306a36Sopenharmony_ciDescription:	The "active" property prints a '1' if the TPM chip is accepting
1462306a36Sopenharmony_ci		commands. An inactive TPM chip still contains all the state of
1562306a36Sopenharmony_ci		an active chip (Storage Root Key, NVRAM, etc), and can be
1662306a36Sopenharmony_ci		visible to the OS, but will only accept a restricted set of
1762306a36Sopenharmony_ci		commands. See the TPM Main Specification part 2, Structures,
1862306a36Sopenharmony_ci		section 17 for more information on which commands are
1962306a36Sopenharmony_ci		available.
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/cancel
2262306a36Sopenharmony_ciDate:		June 2005
2362306a36Sopenharmony_ciKernelVersion:	2.6.13
2462306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
2562306a36Sopenharmony_ciDescription:	The "cancel" property allows you to cancel the currently
2662306a36Sopenharmony_ci		pending TPM command. Writing any value to cancel will call the
2762306a36Sopenharmony_ci		TPM vendor specific cancel operation.
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/caps
3062306a36Sopenharmony_ciDate:		April 2005
3162306a36Sopenharmony_ciKernelVersion:	2.6.12
3262306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
3362306a36Sopenharmony_ciDescription:	The "caps" property contains TPM manufacturer and version info.
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci		Example output::
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci		  Manufacturer: 0x53544d20
3862306a36Sopenharmony_ci		  TCG version: 1.2
3962306a36Sopenharmony_ci		  Firmware version: 8.16
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci		Manufacturer is a hex dump of the 4 byte manufacturer info
4262306a36Sopenharmony_ci		space in a TPM. TCG version shows the TCG TPM spec level that
4362306a36Sopenharmony_ci		the chip supports. Firmware version is that of the chip and
4462306a36Sopenharmony_ci		is manufacturer specific.
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/durations
4762306a36Sopenharmony_ciDate:		March 2011
4862306a36Sopenharmony_ciKernelVersion:	3.1
4962306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
5062306a36Sopenharmony_ciDescription:	The "durations" property shows the 3 vendor-specific values
5162306a36Sopenharmony_ci		used to wait for a short, medium and long TPM command. All
5262306a36Sopenharmony_ci		TPM commands are categorized as short, medium or long in
5362306a36Sopenharmony_ci		execution time, so that the driver doesn't have to wait
5462306a36Sopenharmony_ci		any longer than necessary before starting to poll for a
5562306a36Sopenharmony_ci		result.
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci		Example output::
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci		  3015000 4508000 180995000 [original]
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci		Here the short, medium and long durations are displayed in
6262306a36Sopenharmony_ci		usecs. "[original]" indicates that the values are displayed
6362306a36Sopenharmony_ci		unmodified from when they were queried from the chip.
6462306a36Sopenharmony_ci		Durations can be modified in the case where a buggy chip
6562306a36Sopenharmony_ci		reports them in msec instead of usec and they need to be
6662306a36Sopenharmony_ci		scaled to be displayed in usecs. In this case "[adjusted]"
6762306a36Sopenharmony_ci		will be displayed in place of "[original]".
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/enabled
7062306a36Sopenharmony_ciDate:		April 2006
7162306a36Sopenharmony_ciKernelVersion:	2.6.17
7262306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
7362306a36Sopenharmony_ciDescription:	The "enabled" property prints a '1' if the TPM chip is enabled,
7462306a36Sopenharmony_ci		meaning that it should be visible to the OS. This property
7562306a36Sopenharmony_ci		may be visible but produce a '0' after some operation that
7662306a36Sopenharmony_ci		disables the TPM.
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/owned
7962306a36Sopenharmony_ciDate:		April 2006
8062306a36Sopenharmony_ciKernelVersion:	2.6.17
8162306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
8262306a36Sopenharmony_ciDescription:	The "owned" property produces a '1' if the TPM_TakeOwnership
8362306a36Sopenharmony_ci		ordinal has been executed successfully in the chip. A '0'
8462306a36Sopenharmony_ci		indicates that ownership hasn't been taken.
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/pcrs
8762306a36Sopenharmony_ciDate:		April 2005
8862306a36Sopenharmony_ciKernelVersion:	2.6.12
8962306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
9062306a36Sopenharmony_ciDescription:	The "pcrs" property will dump the current value of all Platform
9162306a36Sopenharmony_ci		Configuration Registers in the TPM. Note that since these
9262306a36Sopenharmony_ci		values may be constantly changing, the output is only valid
9362306a36Sopenharmony_ci		for a snapshot in time.
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ci		Example output::
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci		  PCR-00: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
9862306a36Sopenharmony_ci		  PCR-01: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
9962306a36Sopenharmony_ci		  PCR-02: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
10062306a36Sopenharmony_ci		  PCR-03: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
10162306a36Sopenharmony_ci		  PCR-04: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
10262306a36Sopenharmony_ci		  ...
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci		The number of PCRs and hex bytes needed to represent a PCR
10562306a36Sopenharmony_ci		value will vary depending on TPM chip version. For TPM 1.1 and
10662306a36Sopenharmony_ci		1.2 chips, PCRs represent SHA-1 hashes, which are 20 bytes
10762306a36Sopenharmony_ci		long. Use the "caps" property to determine TPM version.
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/pubek
11062306a36Sopenharmony_ciDate:		April 2005
11162306a36Sopenharmony_ciKernelVersion:	2.6.12
11262306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
11362306a36Sopenharmony_ciDescription:	The "pubek" property will return the TPM's public endorsement
11462306a36Sopenharmony_ci		key if possible. If the TPM has had ownership established and
11562306a36Sopenharmony_ci		is version 1.2, the pubek will not be available without the
11662306a36Sopenharmony_ci		owner's authorization. Since the TPM driver doesn't store any
11762306a36Sopenharmony_ci		secrets, it can't authorize its own request for the pubek,
11862306a36Sopenharmony_ci		making it unaccessible. The public endorsement key is gener-
11962306a36Sopenharmony_ci		ated at TPM manufacture time and exists for the life of the
12062306a36Sopenharmony_ci		chip.
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ci		Example output::
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci		  Algorithm: 00 00 00 01
12562306a36Sopenharmony_ci		  Encscheme: 00 03
12662306a36Sopenharmony_ci		  Sigscheme: 00 01
12762306a36Sopenharmony_ci		  Parameters: 00 00 08 00 00 00 00 02 00 00 00 00
12862306a36Sopenharmony_ci		  Modulus length: 256
12962306a36Sopenharmony_ci		  Modulus:
13062306a36Sopenharmony_ci		  B4 76 41 82 C9 20 2C 10 18 40 BC 8B E5 44 4C 6C
13162306a36Sopenharmony_ci		  3A B2 92 0C A4 9B 2A 83 EB 5C 12 85 04 48 A0 B6
13262306a36Sopenharmony_ci		  1E E4 81 84 CE B2 F2 45 1C F0 85 99 61 02 4D EB
13362306a36Sopenharmony_ci		  86 C4 F7 F3 29 60 52 93 6B B2 E5 AB 8B A9 09 E3
13462306a36Sopenharmony_ci		  D7 0E 7D CA 41 BF 43 07 65 86 3C 8C 13 7A D0 8B
13562306a36Sopenharmony_ci		  82 5E 96 0B F8 1F 5F 34 06 DA A2 52 C1 A9 D5 26
13662306a36Sopenharmony_ci		  0F F4 04 4B D9 3F 2D F2 AC 2F 74 64 1F 8B CD 3E
13762306a36Sopenharmony_ci		  1E 30 38 6C 70 63 69 AB E2 50 DF 49 05 2E E1 8D
13862306a36Sopenharmony_ci		  6F 78 44 DA 57 43 69 EE 76 6C 38 8A E9 8E A3 F0
13962306a36Sopenharmony_ci		  A7 1F 3C A8 D0 12 15 3E CA 0E BD FA 24 CD 33 C6
14062306a36Sopenharmony_ci		  47 AE A4 18 83 8E 22 39 75 93 86 E6 FD 66 48 B6
14162306a36Sopenharmony_ci		  10 AD 94 14 65 F9 6A 17 78 BD 16 53 84 30 BF 70
14262306a36Sopenharmony_ci		  E0 DC 65 FD 3C C6 B0 1E BF B9 C1 B5 6C EF B1 3A
14362306a36Sopenharmony_ci		  F8 28 05 83 62 26 11 DC B4 6B 5A 97 FF 32 26 B6
14462306a36Sopenharmony_ci		  F7 02 71 CF 15 AE 16 DD D1 C1 8E A8 CF 9B 50 7B
14562306a36Sopenharmony_ci		  C3 91 FF 44 1E CF 7C 39 FE 17 77 21 20 BD CE 9B
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ci		Possible values::
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ci		  Algorithm:	TPM_ALG_RSA			(1)
15062306a36Sopenharmony_ci		  Encscheme:	TPM_ES_RSAESPKCSv15		(2)
15162306a36Sopenharmony_ci				TPM_ES_RSAESOAEP_SHA1_MGF1	(3)
15262306a36Sopenharmony_ci		  Sigscheme:	TPM_SS_NONE			(1)
15362306a36Sopenharmony_ci		  Parameters, a byte string of 3 u32 values:
15462306a36Sopenharmony_ci			Key Length (bits):	00 00 08 00	(2048)
15562306a36Sopenharmony_ci			Num primes:		00 00 00 02	(2)
15662306a36Sopenharmony_ci			Exponent Size:		00 00 00 00	(0 means the
15762306a36Sopenharmony_ci								 default exp)
15862306a36Sopenharmony_ci		  Modulus Length: 256 (bytes)
15962306a36Sopenharmony_ci		  Modulus:	The 256 byte Endorsement Key modulus
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/temp_deactivated
16262306a36Sopenharmony_ciDate:		April 2006
16362306a36Sopenharmony_ciKernelVersion:	2.6.17
16462306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
16562306a36Sopenharmony_ciDescription:	The "temp_deactivated" property returns a '1' if the chip has
16662306a36Sopenharmony_ci		been temporarily deactivated, usually until the next power
16762306a36Sopenharmony_ci		cycle. Whether a warm boot (reboot) will clear a TPM chip
16862306a36Sopenharmony_ci		from a temp_deactivated state is platform specific.
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/device/timeouts
17162306a36Sopenharmony_ciDate:		March 2011
17262306a36Sopenharmony_ciKernelVersion:	3.1
17362306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
17462306a36Sopenharmony_ciDescription:	The "timeouts" property shows the 4 vendor-specific values
17562306a36Sopenharmony_ci		for the TPM's interface spec timeouts. The use of these
17662306a36Sopenharmony_ci		timeouts is defined by the TPM interface spec that the chip
17762306a36Sopenharmony_ci		conforms to.
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci		Example output::
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ci		  750000 750000 750000 750000 [original]
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ci		The four timeout values are shown in usecs, with a trailing
18462306a36Sopenharmony_ci		"[original]" or "[adjusted]" depending on whether the values
18562306a36Sopenharmony_ci		were scaled by the driver to be reported in usec from msecs.
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/tpm_version_major
18862306a36Sopenharmony_ciDate:		October 2019
18962306a36Sopenharmony_ciKernelVersion:	5.5
19062306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
19162306a36Sopenharmony_ciDescription:	The "tpm_version_major" property shows the TCG spec major version
19262306a36Sopenharmony_ci		implemented by the TPM device.
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ci		Example output::
19562306a36Sopenharmony_ci
19662306a36Sopenharmony_ci		  2
19762306a36Sopenharmony_ci
19862306a36Sopenharmony_ciWhat:		/sys/class/tpm/tpmX/pcr-<H>/<N>
19962306a36Sopenharmony_ciDate:		March 2021
20062306a36Sopenharmony_ciKernelVersion:	5.12
20162306a36Sopenharmony_ciContact:	linux-integrity@vger.kernel.org
20262306a36Sopenharmony_ciDescription:	produces output in compact hex representation for PCR
20362306a36Sopenharmony_ci		number N from hash bank H.  N is the numeric value of
20462306a36Sopenharmony_ci		the PCR number and H is the crypto string
20562306a36Sopenharmony_ci		representation of the hash
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ci		Example output::
20862306a36Sopenharmony_ci
20962306a36Sopenharmony_ci		  cat /sys/class/tpm/tpm0/pcr-sha256/7
21062306a36Sopenharmony_ci		  2ED93F199692DC6788EFA6A1FE74514AB9760B2A6CEEAEF6C808C13E4ABB0D42
211