xref: /OK3568_Linux_fs/kernel/Documentation/ABI/stable/sysfs-class-tpm (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/
2*4882a593SmuzhiyunDate:		April 2005
3*4882a593SmuzhiyunKernelVersion:	2.6.12
4*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
5*4882a593SmuzhiyunDescription:	The device/ directory under a specific TPM instance exposes
6*4882a593Smuzhiyun		the properties of that TPM chip
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/active
10*4882a593SmuzhiyunDate:		April 2006
11*4882a593SmuzhiyunKernelVersion:	2.6.17
12*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
13*4882a593SmuzhiyunDescription:	The "active" property prints a '1' if the TPM chip is accepting
14*4882a593Smuzhiyun		commands. An inactive TPM chip still contains all the state of
15*4882a593Smuzhiyun		an active chip (Storage Root Key, NVRAM, etc), and can be
16*4882a593Smuzhiyun		visible to the OS, but will only accept a restricted set of
17*4882a593Smuzhiyun		commands. See the TPM Main Specification part 2, Structures,
18*4882a593Smuzhiyun		section 17 for more information on which commands are
19*4882a593Smuzhiyun		available.
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/cancel
22*4882a593SmuzhiyunDate:		June 2005
23*4882a593SmuzhiyunKernelVersion:	2.6.13
24*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
25*4882a593SmuzhiyunDescription:	The "cancel" property allows you to cancel the currently
26*4882a593Smuzhiyun		pending TPM command. Writing any value to cancel will call the
27*4882a593Smuzhiyun		TPM vendor specific cancel operation.
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/caps
30*4882a593SmuzhiyunDate:		April 2005
31*4882a593SmuzhiyunKernelVersion:	2.6.12
32*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
33*4882a593SmuzhiyunDescription:	The "caps" property contains TPM manufacturer and version info.
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun		Example output::
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun		  Manufacturer: 0x53544d20
38*4882a593Smuzhiyun		  TCG version: 1.2
39*4882a593Smuzhiyun		  Firmware version: 8.16
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun		Manufacturer is a hex dump of the 4 byte manufacturer info
42*4882a593Smuzhiyun		space in a TPM. TCG version shows the TCG TPM spec level that
43*4882a593Smuzhiyun		the chip supports. Firmware version is that of the chip and
44*4882a593Smuzhiyun		is manufacturer specific.
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/durations
47*4882a593SmuzhiyunDate:		March 2011
48*4882a593SmuzhiyunKernelVersion:	3.1
49*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
50*4882a593SmuzhiyunDescription:	The "durations" property shows the 3 vendor-specific values
51*4882a593Smuzhiyun		used to wait for a short, medium and long TPM command. All
52*4882a593Smuzhiyun		TPM commands are categorized as short, medium or long in
53*4882a593Smuzhiyun		execution time, so that the driver doesn't have to wait
54*4882a593Smuzhiyun		any longer than necessary before starting to poll for a
55*4882a593Smuzhiyun		result.
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun		Example output::
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun		  3015000 4508000 180995000 [original]
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun		Here the short, medium and long durations are displayed in
62*4882a593Smuzhiyun		usecs. "[original]" indicates that the values are displayed
63*4882a593Smuzhiyun		unmodified from when they were queried from the chip.
64*4882a593Smuzhiyun		Durations can be modified in the case where a buggy chip
65*4882a593Smuzhiyun		reports them in msec instead of usec and they need to be
66*4882a593Smuzhiyun		scaled to be displayed in usecs. In this case "[adjusted]"
67*4882a593Smuzhiyun		will be displayed in place of "[original]".
68*4882a593Smuzhiyun
69*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/enabled
70*4882a593SmuzhiyunDate:		April 2006
71*4882a593SmuzhiyunKernelVersion:	2.6.17
72*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
73*4882a593SmuzhiyunDescription:	The "enabled" property prints a '1' if the TPM chip is enabled,
74*4882a593Smuzhiyun		meaning that it should be visible to the OS. This property
75*4882a593Smuzhiyun		may be visible but produce a '0' after some operation that
76*4882a593Smuzhiyun		disables the TPM.
77*4882a593Smuzhiyun
78*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/owned
79*4882a593SmuzhiyunDate:		April 2006
80*4882a593SmuzhiyunKernelVersion:	2.6.17
81*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
82*4882a593SmuzhiyunDescription:	The "owned" property produces a '1' if the TPM_TakeOwnership
83*4882a593Smuzhiyun		ordinal has been executed successfully in the chip. A '0'
84*4882a593Smuzhiyun		indicates that ownership hasn't been taken.
85*4882a593Smuzhiyun
86*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/pcrs
87*4882a593SmuzhiyunDate:		April 2005
88*4882a593SmuzhiyunKernelVersion:	2.6.12
89*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
90*4882a593SmuzhiyunDescription:	The "pcrs" property will dump the current value of all Platform
91*4882a593Smuzhiyun		Configuration Registers in the TPM. Note that since these
92*4882a593Smuzhiyun		values may be constantly changing, the output is only valid
93*4882a593Smuzhiyun		for a snapshot in time.
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun		Example output::
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun		  PCR-00: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
98*4882a593Smuzhiyun		  PCR-01: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
99*4882a593Smuzhiyun		  PCR-02: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
100*4882a593Smuzhiyun		  PCR-03: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
101*4882a593Smuzhiyun		  PCR-04: 3A 3F 78 0F 11 A4 B4 99 69 FC AA 80 CD 6E 39 57 C3 3B 22 75
102*4882a593Smuzhiyun		  ...
103*4882a593Smuzhiyun
104*4882a593Smuzhiyun		The number of PCRs and hex bytes needed to represent a PCR
105*4882a593Smuzhiyun		value will vary depending on TPM chip version. For TPM 1.1 and
106*4882a593Smuzhiyun		1.2 chips, PCRs represent SHA-1 hashes, which are 20 bytes
107*4882a593Smuzhiyun		long. Use the "caps" property to determine TPM version.
108*4882a593Smuzhiyun
109*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/pubek
110*4882a593SmuzhiyunDate:		April 2005
111*4882a593SmuzhiyunKernelVersion:	2.6.12
112*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
113*4882a593SmuzhiyunDescription:	The "pubek" property will return the TPM's public endorsement
114*4882a593Smuzhiyun		key if possible. If the TPM has had ownership established and
115*4882a593Smuzhiyun		is version 1.2, the pubek will not be available without the
116*4882a593Smuzhiyun		owner's authorization. Since the TPM driver doesn't store any
117*4882a593Smuzhiyun		secrets, it can't authorize its own request for the pubek,
118*4882a593Smuzhiyun		making it unaccessible. The public endorsement key is gener-
119*4882a593Smuzhiyun		ated at TPM manufacture time and exists for the life of the
120*4882a593Smuzhiyun		chip.
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun		Example output::
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun		  Algorithm: 00 00 00 01
125*4882a593Smuzhiyun		  Encscheme: 00 03
126*4882a593Smuzhiyun		  Sigscheme: 00 01
127*4882a593Smuzhiyun		  Parameters: 00 00 08 00 00 00 00 02 00 00 00 00
128*4882a593Smuzhiyun		  Modulus length: 256
129*4882a593Smuzhiyun		  Modulus:
130*4882a593Smuzhiyun		  B4 76 41 82 C9 20 2C 10 18 40 BC 8B E5 44 4C 6C
131*4882a593Smuzhiyun		  3A B2 92 0C A4 9B 2A 83 EB 5C 12 85 04 48 A0 B6
132*4882a593Smuzhiyun		  1E E4 81 84 CE B2 F2 45 1C F0 85 99 61 02 4D EB
133*4882a593Smuzhiyun		  86 C4 F7 F3 29 60 52 93 6B B2 E5 AB 8B A9 09 E3
134*4882a593Smuzhiyun		  D7 0E 7D CA 41 BF 43 07 65 86 3C 8C 13 7A D0 8B
135*4882a593Smuzhiyun		  82 5E 96 0B F8 1F 5F 34 06 DA A2 52 C1 A9 D5 26
136*4882a593Smuzhiyun		  0F F4 04 4B D9 3F 2D F2 AC 2F 74 64 1F 8B CD 3E
137*4882a593Smuzhiyun		  1E 30 38 6C 70 63 69 AB E2 50 DF 49 05 2E E1 8D
138*4882a593Smuzhiyun		  6F 78 44 DA 57 43 69 EE 76 6C 38 8A E9 8E A3 F0
139*4882a593Smuzhiyun		  A7 1F 3C A8 D0 12 15 3E CA 0E BD FA 24 CD 33 C6
140*4882a593Smuzhiyun		  47 AE A4 18 83 8E 22 39 75 93 86 E6 FD 66 48 B6
141*4882a593Smuzhiyun		  10 AD 94 14 65 F9 6A 17 78 BD 16 53 84 30 BF 70
142*4882a593Smuzhiyun		  E0 DC 65 FD 3C C6 B0 1E BF B9 C1 B5 6C EF B1 3A
143*4882a593Smuzhiyun		  F8 28 05 83 62 26 11 DC B4 6B 5A 97 FF 32 26 B6
144*4882a593Smuzhiyun		  F7 02 71 CF 15 AE 16 DD D1 C1 8E A8 CF 9B 50 7B
145*4882a593Smuzhiyun		  C3 91 FF 44 1E CF 7C 39 FE 17 77 21 20 BD CE 9B
146*4882a593Smuzhiyun
147*4882a593Smuzhiyun		Possible values::
148*4882a593Smuzhiyun
149*4882a593Smuzhiyun		  Algorithm:	TPM_ALG_RSA			(1)
150*4882a593Smuzhiyun		  Encscheme:	TPM_ES_RSAESPKCSv15		(2)
151*4882a593Smuzhiyun				TPM_ES_RSAESOAEP_SHA1_MGF1	(3)
152*4882a593Smuzhiyun		  Sigscheme:	TPM_SS_NONE			(1)
153*4882a593Smuzhiyun		  Parameters, a byte string of 3 u32 values:
154*4882a593Smuzhiyun			Key Length (bits):	00 00 08 00	(2048)
155*4882a593Smuzhiyun			Num primes:		00 00 00 02	(2)
156*4882a593Smuzhiyun			Exponent Size:		00 00 00 00	(0 means the
157*4882a593Smuzhiyun								 default exp)
158*4882a593Smuzhiyun		  Modulus Length: 256 (bytes)
159*4882a593Smuzhiyun		  Modulus:	The 256 byte Endorsement Key modulus
160*4882a593Smuzhiyun
161*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/temp_deactivated
162*4882a593SmuzhiyunDate:		April 2006
163*4882a593SmuzhiyunKernelVersion:	2.6.17
164*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
165*4882a593SmuzhiyunDescription:	The "temp_deactivated" property returns a '1' if the chip has
166*4882a593Smuzhiyun		been temporarily deactivated, usually until the next power
167*4882a593Smuzhiyun		cycle. Whether a warm boot (reboot) will clear a TPM chip
168*4882a593Smuzhiyun		from a temp_deactivated state is platform specific.
169*4882a593Smuzhiyun
170*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/device/timeouts
171*4882a593SmuzhiyunDate:		March 2011
172*4882a593SmuzhiyunKernelVersion:	3.1
173*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
174*4882a593SmuzhiyunDescription:	The "timeouts" property shows the 4 vendor-specific values
175*4882a593Smuzhiyun		for the TPM's interface spec timeouts. The use of these
176*4882a593Smuzhiyun		timeouts is defined by the TPM interface spec that the chip
177*4882a593Smuzhiyun		conforms to.
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun		Example output::
180*4882a593Smuzhiyun
181*4882a593Smuzhiyun		  750000 750000 750000 750000 [original]
182*4882a593Smuzhiyun
183*4882a593Smuzhiyun		The four timeout values are shown in usecs, with a trailing
184*4882a593Smuzhiyun		"[original]" or "[adjusted]" depending on whether the values
185*4882a593Smuzhiyun		were scaled by the driver to be reported in usec from msecs.
186*4882a593Smuzhiyun
187*4882a593SmuzhiyunWhat:		/sys/class/tpm/tpmX/tpm_version_major
188*4882a593SmuzhiyunDate:		October 2019
189*4882a593SmuzhiyunKernelVersion:	5.5
190*4882a593SmuzhiyunContact:	linux-integrity@vger.kernel.org
191*4882a593SmuzhiyunDescription:	The "tpm_version_major" property shows the TCG spec major version
192*4882a593Smuzhiyun		implemented by the TPM device.
193*4882a593Smuzhiyun
194*4882a593Smuzhiyun		Example output::
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun		  2
197