xref: /linux/Documentation/ABI/testing/sysfs-bus-pci (revision 17bb0e2f6c8043f70a693a5f3797471cbed354c8)
1What:		/sys/bus/pci/drivers/.../bind
2What:		/sys/devices/pciX/.../bind
3Date:		December 2003
4Contact:	linux-pci@vger.kernel.org
5Description:
6		Writing a device location to this file will cause
7		the driver to attempt to bind to the device found at
8		this location.	This is useful for overriding default
9		bindings.  The format for the location is: DDDD:BB:DD.F.
10		That is Domain:Bus:Device.Function and is the same as
11		found in /sys/bus/pci/devices/.  For example::
12
13		  # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind
14
15		(Note: kernels before 2.6.28 may require echo -n).
16
17What:		/sys/bus/pci/drivers/.../unbind
18What:		/sys/devices/pciX/.../unbind
19Date:		December 2003
20Contact:	linux-pci@vger.kernel.org
21Description:
22		Writing a device location to this file will cause the
23		driver to attempt to unbind from the device found at
24		this location.	This may be useful when overriding default
25		bindings.  The format for the location is: DDDD:BB:DD.F.
26		That is Domain:Bus:Device.Function and is the same as
27		found in /sys/bus/pci/devices/. For example::
28
29		  # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind
30
31		(Note: kernels before 2.6.28 may require echo -n).
32
33What:		/sys/bus/pci/drivers/.../new_id
34What:		/sys/devices/pciX/.../new_id
35Date:		December 2003
36Contact:	linux-pci@vger.kernel.org
37Description:
38		Writing a device ID to this file will attempt to
39		dynamically add a new device ID to a PCI device driver.
40		This may allow the driver to support more hardware than
41		was included in the driver's static device ID support
42		table at compile time.  The format for the device ID is:
43		VVVV DDDD SVVV SDDD CCCC MMMM PPPP.  That is Vendor ID,
44		Device ID, Subsystem Vendor ID, Subsystem Device ID,
45		Class, Class Mask, and Private Driver Data.  The Vendor ID
46		and Device ID fields are required, the rest are optional.
47		Upon successfully adding an ID, the driver will probe
48		for the device and attempt to bind to it.  For example::
49
50		  # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id
51
52What:		/sys/bus/pci/drivers/.../remove_id
53What:		/sys/devices/pciX/.../remove_id
54Date:		February 2009
55Contact:	Chris Wright <chrisw@sous-sol.org>
56Description:
57		Writing a device ID to this file will remove an ID
58		that was dynamically added via the new_id sysfs entry.
59		The format for the device ID is:
60		VVVV DDDD SVVV SDDD CCCC MMMM.	That is Vendor ID, Device
61		ID, Subsystem Vendor ID, Subsystem Device ID, Class,
62		and Class Mask.  The Vendor ID and Device ID fields are
63		required, the rest are optional.  After successfully
64		removing an ID, the driver will no longer support the
65		device.  This is useful to ensure auto probing won't
66		match the driver to the device.  For example::
67
68		  # echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id
69
70What:		/sys/bus/pci/rescan
71Date:		January 2009
72Contact:	Linux PCI developers <linux-pci@vger.kernel.org>
73Description:
74		Writing a non-zero value to this attribute will
75		force a rescan of all PCI buses in the system, and
76		re-discover previously removed devices.
77
78What:		/sys/bus/pci/devices/.../msi_bus
79Date:		September 2014
80Contact:	Linux PCI developers <linux-pci@vger.kernel.org>
81Description:
82		Writing a zero value to this attribute disallows MSI and
83		MSI-X for any future drivers of the device.  If the device
84		is a bridge, MSI and MSI-X will be disallowed for future
85		drivers of all child devices under the bridge.  Drivers
86		must be reloaded for the new setting to take effect.
87
88What:		/sys/bus/pci/devices/.../msi_irqs/
89Date:		September, 2011
90Contact:	Neil Horman <nhorman@tuxdriver.com>
91Description:
92		The /sys/devices/.../msi_irqs directory contains a variable set
93		of files, with each file being named after a corresponding msi
94		irq vector allocated to that device.
95
96What:		/sys/bus/pci/devices/.../msi_irqs/<N>
97Date:		September 2011
98Contact:	Neil Horman <nhorman@tuxdriver.com>
99Description:
100		This attribute indicates the mode that the irq vector named by
101		the file is in (msi vs. msix)
102
103What:		/sys/bus/pci/devices/.../irq
104Date:		August 2021
105Contact:	Linux PCI developers <linux-pci@vger.kernel.org>
106Description:
107		If a driver has enabled MSI (not MSI-X), "irq" contains the
108		IRQ of the first MSI vector. Otherwise "irq" contains the
109		IRQ of the legacy INTx interrupt.
110
111		"irq" being set to 0 indicates that the device isn't
112		capable of generating legacy INTx interrupts.
113
114What:		/sys/bus/pci/devices/.../remove
115Date:		January 2009
116Contact:	Linux PCI developers <linux-pci@vger.kernel.org>
117Description:
118		Writing a non-zero value to this attribute will
119		hot-remove the PCI device and any of its children.
120
121What:		/sys/bus/pci/devices/.../pci_bus/.../rescan
122Date:		May 2011
123Contact:	Linux PCI developers <linux-pci@vger.kernel.org>
124Description:
125		Writing a non-zero value to this attribute will
126		force a rescan of the bus and all child buses,
127		and re-discover devices removed earlier from this
128		part of the device tree.
129
130What:		/sys/bus/pci/devices/.../rescan
131Date:		January 2009
132Contact:	Linux PCI developers <linux-pci@vger.kernel.org>
133Description:
134		Writing a non-zero value to this attribute will
135		force a rescan of the device's parent bus and all
136		child buses, and re-discover devices removed earlier
137		from this part of the device tree.
138
139What:		/sys/bus/pci/devices/.../reset_method
140Date:		August 2021
141Contact:	Amey Narkhede <ameynarkhede03@gmail.com>
142Description:
143		Some devices allow an individual function to be reset
144		without affecting other functions in the same slot.
145
146		For devices that have this support, a file named
147		reset_method is present in sysfs.  Reading this file
148		gives names of the supported and enabled reset methods and
149		their ordering.  Writing a space-separated list of names of
150		reset methods sets the reset methods and ordering to be
151		used when resetting the device.  Writing an empty string
152		disables the ability to reset the device.  Writing
153		"default" enables all supported reset methods in the
154		default ordering.
155
156What:		/sys/bus/pci/devices/.../reset
157Date:		July 2009
158Contact:	Michael S. Tsirkin <mst@redhat.com>
159Description:
160		Some devices allow an individual function to be reset
161		without affecting other functions in the same device.
162		For devices that have this support, a file named reset
163		will be present in sysfs.  Writing 1 to this file
164		will perform reset.
165
166What:		/sys/bus/pci/devices/.../reset_subordinate
167Date:		October 2024
168Contact:	linux-pci@vger.kernel.org
169Description:
170		This is visible only for bridge devices. If you want to reset
171		all devices attached through the subordinate bus of a specific
172		bridge device, writing 1 to this will try to do it.  This will
173		affect all devices attached to the system through this bridge
174		similar to writing 1 to their individual "reset" file, so use
175		with caution.
176
177What:		/sys/bus/pci/devices/.../vpd
178Date:		February 2008
179Contact:	Ben Hutchings <bwh@kernel.org>
180Description:
181		A file named vpd in a device directory will be a
182		binary file containing the Vital Product Data for the
183		device.  It should follow the VPD format defined in
184		PCI Specification 2.1 or 2.2, but users should consider
185		that some devices may have incorrectly formatted data.
186		If the underlying VPD has a writable section then the
187		corresponding section of this file will be writable.
188
189What:		/sys/bus/pci/devices/.../virtfn<N>
190Date:		March 2009
191Contact:	Yu Zhao <yu.zhao@intel.com>
192Description:
193		This symbolic link appears when hardware supports the SR-IOV
194		capability and the Physical Function driver has enabled it.
195		The symbolic link points to the PCI device sysfs entry of the
196		Virtual Function whose index is N (0...MaxVFs-1).
197
198What:		/sys/bus/pci/devices/.../dep_link
199Date:		March 2009
200Contact:	Yu Zhao <yu.zhao@intel.com>
201Description:
202		This symbolic link appears when hardware supports the SR-IOV
203		capability and the Physical Function driver has enabled it,
204		and this device has vendor specific dependencies with others.
205		The symbolic link points to the PCI device sysfs entry of
206		Physical Function this device depends on.
207
208What:		/sys/bus/pci/devices/.../physfn
209Date:		March 2009
210Contact:	Yu Zhao <yu.zhao@intel.com>
211Description:
212		This symbolic link appears when a device is a Virtual Function.
213		The symbolic link points to the PCI device sysfs entry of the
214		Physical Function this device associates with.
215
216What:		/sys/bus/pci/devices/.../modalias
217Date:		May 2005
218Contact:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
219Description:
220		This attribute indicates the PCI ID of the device object.
221
222		That is in the format:
223		pci:vXXXXXXXXdXXXXXXXXsvXXXXXXXXsdXXXXXXXXbcXXscXXiXX,
224		where:
225
226		    - vXXXXXXXX contains the vendor ID;
227		    - dXXXXXXXX contains the device ID;
228		    - svXXXXXXXX contains the sub-vendor ID;
229		    - sdXXXXXXXX contains the subsystem device ID;
230		    - bcXX contains the device class;
231		    - scXX contains the device subclass;
232		    - iXX contains the device class programming interface.
233
234What:		/sys/bus/pci/slots/.../module
235Date:		June 2009
236Contact:	linux-pci@vger.kernel.org
237Description:
238		This symbolic link points to the PCI hotplug controller driver
239		module that manages the hotplug slot.
240
241What:		/sys/bus/pci/devices/.../label
242Date:		July 2010
243Contact:	Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
244Description:
245		Reading this attribute will provide the firmware
246		given name (SMBIOS type 41 string or ACPI _DSM string) of
247		the PCI device. The attribute will be created only if the
248		firmware naming mechanism is implemented for the device:
249		a SMBIOS type 41 record with a non-empty reference
250		designation, or a Device Name _DSM that returns the name
251		as a string or a buffer. The value read is empty when the
252		firmware implements the _DSM but gives the device no name,
253		which per PCI Firmware r3.3, sec 4.6.7 the firmware reports
254		as a NULL string. ACPI _DSM string name will be given
255		priority if the system firmware provides SMBIOS type 41
256		string also.
257Users:
258		Userspace applications interested in knowing the
259		firmware assigned name of the PCI device.
260
261What:		/sys/bus/pci/devices/.../index
262Date:		July 2010
263Contact:	Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
264Description:
265		Reading this attribute will provide the firmware given instance
266		number of the PCI device.  Depending on the platform this can
267		be for example the SMBIOS type 41 device type instance or the
268		user-defined ID (UID) on s390. The attribute will be created
269		only if the firmware has given an instance number to the PCI
270		device and that number is guaranteed to uniquely identify the
271		device in the system.
272Users:
273		Userspace applications interested in knowing the
274		firmware assigned device type instance of the PCI
275		device that can help in understanding the firmware
276		intended order of the PCI device.
277
278What:		/sys/bus/pci/devices/.../acpi_index
279Date:		July 2010
280Contact:	Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
281Description:
282		Reading this attribute will provide the firmware
283		given instance (ACPI _DSM instance number) of the PCI device.
284		The attribute will be created only if the firmware has given
285		an instance number to the PCI device. ACPI _DSM instance number
286		will be given priority if the system firmware provides SMBIOS
287		type 41 device type instance also.
288Users:
289		Userspace applications interested in knowing the
290		firmware assigned instance number of the PCI
291		device that can help in understanding the firmware
292		intended order of the PCI device.
293
294What:		/sys/bus/pci/devices/.../d3cold_allowed
295Date:		July 2012
296Contact:	Huang Ying <ying.huang@intel.com>
297Description:
298		d3cold_allowed is bit to control whether the corresponding PCI
299		device can be put into D3Cold state.  If it is cleared, the
300		device will never be put into D3Cold state.  If it is set, the
301		device may be put into D3Cold state if other requirements are
302		satisfied too.  Reading this attribute will show the current
303		value of d3cold_allowed bit.  Writing this attribute will set
304		the value of d3cold_allowed bit.
305
306What:		/sys/bus/pci/devices/.../sriov_totalvfs
307Date:		November 2012
308Contact:	Donald Dutile <ddutile@redhat.com>
309Description:
310		This file appears when a physical PCIe device supports SR-IOV.
311		Userspace applications can read this file to determine the
312		maximum number of Virtual Functions (VFs) a PCIe physical
313		function (PF) can support. Typically, this is the value reported
314		in the PF's SR-IOV extended capability structure's TotalVFs
315		element.  Drivers have the ability at probe time to reduce the
316		value read from this file via the pci_sriov_set_totalvfs()
317		function.
318
319What:		/sys/bus/pci/devices/.../sriov_numvfs
320Date:		November 2012
321Contact:	Donald Dutile <ddutile@redhat.com>
322Description:
323		This file appears when a physical PCIe device supports SR-IOV.
324		Userspace applications can read and write to this file to
325		determine and control the enablement or disablement of Virtual
326		Functions (VFs) on the physical function (PF). A read of this
327		file will return the number of VFs that are enabled on this PF.
328		A number written to this file will enable the specified
329		number of VFs. A userspace application would typically read the
330		file and check that the value is zero, and then write the number
331		of VFs that should be enabled on the PF; the value written
332		should be less than or equal to the value in the sriov_totalvfs
333		file. A userspace application wanting to disable the VFs would
334		write a zero to this file. The core ensures that valid values
335		are written to this file, and returns errors when values are not
336		valid.  For example, writing a 2 to this file when sriov_numvfs
337		is not 0 and not 2 already will return an error. Writing a 10
338		when the value of sriov_totalvfs is 8 will return an error.
339
340What:		/sys/bus/pci/devices/.../driver_override
341Date:		April 2014
342Contact:	Alex Williamson <alex.williamson@redhat.com>
343Description:
344		This file allows the driver for a device to be specified which
345		will override standard static and dynamic ID matching.  When
346		specified, only a driver with a name matching the value written
347		to driver_override will have an opportunity to bind to the
348		device.  The override is specified by writing a string to the
349		driver_override file (echo pci-stub > driver_override) and
350		may be cleared with an empty string (echo > driver_override).
351		This returns the device to standard matching rules binding.
352		Writing to driver_override does not automatically unbind the
353		device from its current driver or make any attempt to
354		automatically load the specified driver.  If no driver with a
355		matching name is currently loaded in the kernel, the device
356		will not bind to any driver.  This also allows devices to
357		opt-out of driver binding using a driver_override name such as
358		"none".  Only a single driver may be specified in the override,
359		there is no support for parsing delimiters.
360
361What:		/sys/bus/pci/devices/.../numa_node
362Date:		Oct 2014
363Contact:	Prarit Bhargava <prarit@redhat.com>
364Description:
365		This file contains the NUMA node to which the PCI device is
366		attached, or -1 if the node is unknown.  The initial value
367		comes from an ACPI _PXM method or a similar firmware
368		source.  If that is missing or incorrect, this file can be
369		written to override the node.  In that case, please report
370		a firmware bug to the system vendor.  Writing to this file
371		taints the kernel with TAINT_FIRMWARE_WORKAROUND, which
372		reduces the supportability of your system.
373
374What:		/sys/bus/pci/devices/.../revision
375Date:		November 2016
376Contact:	Emil Velikov <emil.l.velikov@gmail.com>
377Description:
378		This file contains the revision field of the PCI device.
379		The value comes from device config space. The file is read only.
380
381What:		/sys/bus/pci/devices/.../sriov_drivers_autoprobe
382Date:		April 2017
383Contact:	Bodong Wang<bodong@mellanox.com>
384Description:
385		This file is associated with the PF of a device that
386		supports SR-IOV.  It determines whether newly-enabled VFs
387		are immediately bound to a driver.  It initially contains
388		1, which means the kernel automatically binds VFs to a
389		compatible driver immediately after they are enabled.  If
390		an application writes 0 to the file before enabling VFs,
391		the kernel will not bind VFs to a driver.
392
393		A typical use case is to write 0 to this file, then enable
394		VFs, then assign the newly-created VFs to virtual machines.
395		Note that changing this file does not affect already-
396		enabled VFs.  In this scenario, the user must first disable
397		the VFs, write 0 to sriov_drivers_autoprobe, then re-enable
398		the VFs.
399
400		This is similar to /sys/bus/pci/drivers_autoprobe, but
401		affects only the VFs associated with a specific PF.
402
403What:		/sys/bus/pci/devices/.../p2pmem/size
404Date:		November 2017
405Contact:	Logan Gunthorpe <logang@deltatee.com>
406Description:
407		If the device has any Peer-to-Peer memory registered, this
408	        file contains the total amount of memory that the device
409		provides (in decimal).
410
411What:		/sys/bus/pci/devices/.../p2pmem/available
412Date:		November 2017
413Contact:	Logan Gunthorpe <logang@deltatee.com>
414Description:
415		If the device has any Peer-to-Peer memory registered, this
416	        file contains the amount of memory that has not been
417		allocated (in decimal).
418
419What:		/sys/bus/pci/devices/.../p2pmem/published
420Date:		November 2017
421Contact:	Logan Gunthorpe <logang@deltatee.com>
422Description:
423		If the device has any Peer-to-Peer memory registered, this
424	        file contains a '1' if the memory has been published for
425		use outside the driver that owns the device.
426
427What:		/sys/bus/pci/devices/.../p2pmem/allocate
428Date:		August 2022
429Contact:	Logan Gunthorpe <logang@deltatee.com>
430Description:
431		This file allows mapping p2pmem into userspace. For each
432		mmap() call on this file, the kernel will allocate a chunk
433		of Peer-to-Peer memory for use in Peer-to-Peer transactions.
434		This memory can be used in O_DIRECT calls to NVMe backed
435		files for Peer-to-Peer copies.
436
437What:		/sys/bus/pci/devices/.../link/clkpm
438		/sys/bus/pci/devices/.../link/l0s_aspm
439		/sys/bus/pci/devices/.../link/l1_aspm
440		/sys/bus/pci/devices/.../link/l1_1_aspm
441		/sys/bus/pci/devices/.../link/l1_2_aspm
442		/sys/bus/pci/devices/.../link/l1_1_pcipm
443		/sys/bus/pci/devices/.../link/l1_2_pcipm
444Date:		October 2019
445Contact:	Heiner Kallweit <hkallweit1@gmail.com>
446Description:	If ASPM is supported for an endpoint, these files can be
447		used to disable or enable the individual power management
448		states. Write y/1/on to enable, n/0/off to disable.
449
450What:		/sys/bus/pci/devices/.../power_state
451Date:		November 2020
452Contact:	Linux PCI developers <linux-pci@vger.kernel.org>
453Description:
454		This file contains the current PCI power state of the device.
455		The value comes from the PCI kernel device state and can be one
456		of: "unknown", "error", "D0", D1", "D2", "D3hot", "D3cold".
457		The file is read only.
458
459What:		/sys/bus/pci/devices/.../sriov_vf_total_msix
460Date:		January 2021
461Contact:	Leon Romanovsky <leonro@nvidia.com>
462Description:
463		This file is associated with a SR-IOV physical function (PF).
464		It contains the total number of MSI-X vectors available for
465		assignment to all virtual functions (VFs) associated with PF.
466		The value will be zero if the device doesn't support this
467		functionality. For supported devices, the value will be
468		constant and won't be changed after MSI-X vectors assignment.
469
470What:		/sys/bus/pci/devices/.../sriov_vf_msix_count
471Date:		January 2021
472Contact:	Leon Romanovsky <leonro@nvidia.com>
473Description:
474		This file is associated with a SR-IOV virtual function (VF).
475		It allows configuration of the number of MSI-X vectors for
476		the VF. This allows devices that have a global pool of MSI-X
477		vectors to optimally divide them between VFs based on VF usage.
478
479		The values accepted are:
480		 * > 0 - this number will be reported as the Table Size in the
481			 VF's MSI-X capability
482		 * < 0 - not valid
483		 * = 0 - will reset to the device default value
484
485		The file is writable if the PF is bound to a driver that
486		implements ->sriov_set_msix_vec_count().
487
488What:		/sys/bus/pci/devices/.../resourceN_resize
489Date:		September 2022
490Contact:	Alex Williamson <alex.williamson@redhat.com>
491Description:
492		These files provide an interface to PCIe Resizable BAR support.
493		A file is created for each BAR resource (N) supported by the
494		PCIe Resizable BAR extended capability of the device.  Reading
495		each file exposes the bitmap of available resource sizes::
496
497		  # cat resource1_resize
498		  00000000000001c0
499
500		The bitmap represents supported resource sizes for the BAR,
501		where bit0 = 1MB, bit1 = 2MB, bit2 = 4MB, etc.  In the above
502		example the device supports 64MB, 128MB, and 256MB BAR sizes.
503
504		When writing the file, the user provides the bit position of
505		the desired resource size, for example::
506
507		  # echo 7 > resource1_resize
508
509		This indicates to set the size value corresponding to bit 7,
510		128MB.  The resulting size is 2 ^ (bit# + 20).  This definition
511		matches the PCIe specification of this capability.
512
513		In order to make use of resource resizing, all PCI drivers must
514		be unbound from the device and peer devices under the same
515		parent bridge may need to be soft removed.  In the case of
516		VGA devices, writing a resize value will remove low level
517		console drivers from the device.  Raw users of pci-sysfs
518		resourceN attributes must be terminated prior to resizing.
519		Success of the resizing operation is not guaranteed.
520
521What:		/sys/bus/pci/devices/.../leds/*:enclosure:*/brightness
522What:		/sys/class/leds/*:enclosure:*/brightness
523Date:		August 2024
524KernelVersion:	6.12
525Description:
526		LED indications on PCIe storage enclosures which are controlled
527		through the NPEM interface (Native PCIe Enclosure Management,
528		PCIe r6.1 sec 6.28) are accessible as led class devices, both
529		below /sys/class/leds and below NPEM-capable PCI devices.
530
531		Although these led class devices could be manipulated manually,
532		in practice they are typically manipulated automatically by an
533		application such as ledmon(8).
534
535		The name of a led class device is as follows:
536		<bdf>:enclosure:<indication>
537		where:
538
539		- <bdf> is the domain, bus, device and function number
540		  (e.g. 10000:02:05.0)
541		- <indication> is a short description of the LED indication
542
543		Valid indications per PCIe r6.1 table 6-27 are:
544
545		- ok (drive is functioning normally)
546		- locate (drive is being identified by an admin)
547		- fail (drive is not functioning properly)
548		- rebuild (drive is part of an array that is rebuilding)
549		- pfa (drive is predicted to fail soon)
550		- hotspare (drive is marked to be used as a replacement)
551		- ica (drive is part of an array that is degraded)
552		- ifa (drive is part of an array that is failed)
553		- idt (drive is not the right type for the connector)
554		- disabled (drive is disabled, removal is safe)
555		- specific0 to specific7 (enclosure-specific indications)
556
557		Broadly, the indications fall into one of these categories:
558
559		- to signify drive state (ok, locate, fail, idt, disabled)
560		- to signify drive role or state in a software RAID array
561		  (rebuild, pfa, hotspare, ica, ifa)
562		- to signify any other role or state (specific0 to specific7)
563
564		Mandatory indications per PCIe r6.1 sec 7.9.19.2 comprise:
565		ok, locate, fail, rebuild. All others are optional.
566		A led class device is only visible if the corresponding
567		indication is supported by the device.
568
569		To manipulate the indications, write 0 (LED_OFF) or 1 (LED_ON)
570		to the "brightness" file. Note that manipulating an indication
571		may implicitly manipulate other indications at the vendor's
572		discretion. E.g. when the user lights up the "ok" indication,
573		the vendor may choose to automatically turn off the "fail"
574		indication. The current state of an indication can be
575		retrieved by reading its "brightness" file.
576
577		The PCIe Base Specification allows vendors leeway to choose
578		different colors or blinking patterns for the indications,
579		but they typically follow the IBPI standard. E.g. the "locate"
580		indication is usually presented as one or two LEDs blinking at
581		4 Hz frequency:
582		https://en.wikipedia.org/wiki/International_Blinking_Pattern_Interpretation
583
584		PCI Firmware Specification r3.3 sec 4.7 defines a DSM interface
585		to facilitate shared access by operating system and platform
586		firmware to a device's NPEM registers. The kernel will use
587		this DSM interface where available, instead of accessing NPEM
588		registers directly. The DSM interface does not support the
589		enclosure-specific indications "specific0" to "specific7",
590		hence the corresponding led class devices are unavailable if
591		the DSM interface is used.
592
593What:		/sys/bus/pci/devices/.../doe_features
594Date:		March 2025
595Contact:	Linux PCI developers <linux-pci@vger.kernel.org>
596Description:
597		This directory contains a list of the supported Data Object
598		Exchange (DOE) features. The features are the file name.
599		The contents of each file is the raw Vendor ID and data
600		object feature values.
601
602		The value comes from the device and specifies the vendor and
603		data object type supported. The lower (RHS of the colon) is
604		the data object type in hex. The upper (LHS of the colon)
605		is the vendor ID.
606
607		As all DOE devices must support the DOE discovery feature,
608		if DOE is supported you will at least see the doe_discovery
609		file, with this contents::
610
611		  # cat doe_features/doe_discovery
612		  0001:00
613
614		If the device supports other features you will see other
615		files as well. For example if CMA/SPDM and secure CMA/SPDM
616		are supported the doe_features directory will look like
617		this::
618
619		  # ls doe_features
620		  0001:01        0001:02        doe_discovery
621
622What:		/sys/bus/pci/devices/.../serial_number
623Date:		December 2025
624Contact:	Matthew Wood <thepacketgeek@gmail.com>
625Description:
626		This is visible only for PCI devices that support the serial
627		number extended capability. The file is read only and due to
628		the possible sensitivity of accessible serial numbers, admin
629		only.
630
631What:		/sys/bus/pci/devices/.../tsm/
632Contact:	linux-coco@lists.linux.dev
633Description:
634		This directory only appears if a physical device function
635		supports authentication (PCIe CMA-SPDM), interface security
636		(PCIe TDISP), and is accepted for secure operation by the
637		platform TSM driver. This attribute directory appears
638		dynamically after the platform TSM driver loads. So, only after
639		the /sys/class/tsm/tsm0 device arrives can tools assume that
640		devices without a tsm/ attribute directory will never have one;
641		before that, the security capabilities of the device relative to
642		the platform TSM are unknown. See
643		Documentation/ABI/testing/sysfs-class-tsm.
644
645What:		/sys/bus/pci/devices/.../tsm/connect
646Contact:	linux-coco@lists.linux.dev
647Description:
648		(RW) Write the name of a TSM (TEE Security Manager) device from
649		/sys/class/tsm to this file to establish a connection with the
650		device.  This typically includes an SPDM (DMTF Security
651		Protocols and Data Models) session over PCIe DOE (Data Object
652		Exchange) and may also include PCIe IDE (Integrity and Data
653		Encryption) establishment. Reads from this attribute return the
654		name of the connected TSM or the empty string if not
655		connected. A TSM device signals its readiness to accept PCI
656		connection via a KOBJ_CHANGE event.
657
658What:		/sys/bus/pci/devices/.../tsm/disconnect
659Contact:	linux-coco@lists.linux.dev
660Description:
661		(WO) Write the name of the TSM device that was specified
662		to 'connect' to teardown the connection.
663
664What:		/sys/bus/pci/devices/.../tsm/dsm
665Contact:	linux-coco@lists.linux.dev
666Description:	(RO) Return PCI device name of this device's DSM (Device
667		Security Manager). When a device is in the connected state it
668		indicates that the platform TSM (TEE Security Manager) has made
669		a secure-session connection with a device's DSM. A DSM is always
670		physical function 0 and when the device supports TDISP (TEE
671		Device Interface Security Protocol) its managed functions also
672		populate this tsm/dsm attribute. The managed functions of a DSM
673		are SR-IOV (Single Root I/O Virtualization) virtual functions,
674		non-zero functions of a multi-function device, or downstream
675		endpoints depending on whether the DSM is an SR-IOV physical
676		function, function0 of a multi-function device, or an upstream
677		PCIe switch port. This is a "link" TSM attribute, see
678		Documentation/ABI/testing/sysfs-class-tsm.
679
680What:		/sys/bus/pci/devices/.../tsm/bound
681Contact:	linux-coco@lists.linux.dev
682Description:	(RO) Return the device name of the TSM when the device is in a
683		TDISP (TEE Device Interface Security Protocol) operational state
684		(LOCKED, RUN, or ERROR, not UNLOCKED). Bound devices consume
685		platform TSM resources and depend on the device's configuration
686		(e.g. BME (Bus Master Enable) and MSE (Memory Space Enable)
687		among other settings) to remain stable for the duration of the
688		bound state. This attribute is only visible for devices that
689		support TDISP operation, and it is only populated after
690		successful connect and TSM bind. The TSM bind operation is
691		initiated by VFIO/IOMMUFD. This is a "link" TSM attribute, see
692		Documentation/ABI/testing/sysfs-class-tsm.
693
694What:		/sys/bus/pci/devices/.../authenticated
695Contact:	linux-pci@vger.kernel.org
696Description:
697		When the device's tsm/ directory is present device
698		authentication (PCIe CMA-SPDM) and link encryption (PCIe IDE)
699		are handled by the platform TSM (TEE Security Manager). When the
700		tsm/ directory is not present this attribute reflects only the
701		native CMA-SPDM authentication state with the kernel's
702		certificate store.
703
704		If the attribute is not present, it indicates that
705		authentication is unsupported by the device, or the TSM has no
706		available authentication methods for the device.
707
708		When present and the tsm/ attribute directory is present, the
709		authenticated attribute is an alias for the device 'connect'
710		state. See the 'tsm/connect' attribute for more details.
711