요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Rescan and interrupt state
sysfs-bus-pci:70-138전역·bus·device rescan과 hot-remove를 제공하고, MSI/MSI-X 허용 정책·vector mode·현재 IRQ를 노출합니다.
Reset, VPD, and function links
sysfs-bus-pci:139-215Function·subordinate reset과 method 순서를 제어하고 VPD binary, SR-IOV VF·PF·dependency symbolic link를 제공합니다.
Modalias and firmware naming
sysfs-bus-pci:216-287PCI modalias 구성 요소, hotplug controller module, firmware label·instance·ACPI instance와 userspace 사용 목적을 설명합니다.
Power, SR-IOV, and driver policy
sysfs-bus-pci:288-396D3Cold 허용, VF 최대·활성 수와 자동 probe, driver override, NUMA node override, config-space revision을 제어하거나 보고합니다.
P2P memory, link power, and MSI-X
sysfs-bus-pci:397-481Peer-to-Peer memory의 용량·할당·공개 상태, PCIe link power state, device power state, VF MSI-X vector pool과 할당 수를 제공합니다.
BAR resizing and NPEM LEDs
sysfs-bus-pci:482-586Resizable BAR size bitmap과 변경 절차를 제공하고, PCIe storage enclosure의 NPEM indication을 LED class brightness로 노출합니다.
DOE features and serial number
sysfs-bus-pci:587-623DOE discovery·vendor data object feature file과 admin 전용 read-only PCI serial number capability를 설명합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/pci/drivers/.../bind
What: /sys/devices/pciX/.../bind
Date: December 2003
Contact: [email protected]
Description:
Writing a device location to this file will cause
the driver to attempt to bind to the device found at
this location. This is useful for overriding default
bindings. The format for the location is: DDDD:BB:DD.F.
That is Domain:Bus:Device.Function and is the same as
found in /sys/bus/pci/devices/. For example::
# echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind
(Note: kernels before 2.6.28 may require echo -n).
What: /sys/bus/pci/drivers/.../unbind
What: /sys/devices/pciX/.../unbind
Date: December 2003
Contact: [email protected]
Description:
Writing a device location to this file will cause the
driver to attempt to unbind from the device found at
this location. This may be useful when overriding default
bindings. The format for the location is: DDDD:BB:DD.F.
That is Domain:Bus:Device.Function and is the same as
found in /sys/bus/pci/devices/. For example::
# echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind
(Note: kernels before 2.6.28 may require echo -n).
What: /sys/bus/pci/drivers/.../new_id
What: /sys/devices/pciX/.../new_id
Date: December 2003
Contact: [email protected]
Description:
Writing a device ID to this file will attempt to
dynamically add a new device ID to a PCI device driver.
This may allow the driver to support more hardware than
was included in the driver's static device ID support
table at compile time. The format for the device ID is:
VVVV DDDD SVVV SDDD CCCC MMMM PPPP. That is Vendor ID,
Device ID, Subsystem Vendor ID, Subsystem Device ID,
Class, Class Mask, and Private Driver Data. The Vendor ID
and Device ID fields are required, the rest are optional.
Upon successfully adding an ID, the driver will probe
for the device and attempt to bind to it. For example::
# echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id
What: /sys/bus/pci/drivers/.../remove_id
What: /sys/devices/pciX/.../remove_id
Date: February 2009
Contact: Chris Wright <[email protected]>
Description:
Writing a device ID to this file will remove an ID
that was dynamically added via the new_id sysfs entry.
The format for the device ID is:
VVVV DDDD SVVV SDDD CCCC MMMM. That is Vendor ID, Device
ID, Subsystem Vendor ID, Subsystem Device ID, Class,
and Class Mask. The Vendor ID and Device ID fields are
required, the rest are optional. After successfully
removing an ID, the driver will no longer support the
device. This is useful to ensure auto probing won't
match the driver to the device. For example::
# echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id
What: /sys/bus/pci/rescan
Date: January 2009
Contact: Linux PCI developers <[email protected]>
Description:
Writing a non-zero value to this attribute will
force a rescan of all PCI buses in the system, and
re-discover previously removed devices.
What: /sys/bus/pci/devices/.../msi_bus
Date: September 2014
Contact: Linux PCI developers <[email protected]>
Description:
Writing a zero value to this attribute disallows MSI and
MSI-X for any future drivers of the device. If the device
is a bridge, MSI and MSI-X will be disallowed for future
drivers of all child devices under the bridge. Drivers
must be reloaded for the new setting to take effect.
What: /sys/bus/pci/devices/.../msi_irqs/
Date: September, 2011
Contact: Neil Horman <[email protected]>
Description:
The /sys/devices/.../msi_irqs directory contains a variable set
of files, with each file being named after a corresponding msi
irq vector allocated to that device.
What: /sys/bus/pci/devices/.../msi_irqs/<N>
Date: September 2011
Contact: Neil Horman <[email protected]>
Description:
This attribute indicates the mode that the irq vector named by
the file is in (msi vs. msix)
What: /sys/bus/pci/devices/.../irq
Date: August 2021
Contact: Linux PCI developers <[email protected]>
Description:
If a driver has enabled MSI (not MSI-X), "irq" contains the
IRQ of the first MSI vector. Otherwise "irq" contains the
IRQ of the legacy INTx interrupt.
"irq" being set to 0 indicates that the device isn't
capable of generating legacy INTx interrupts.
What: /sys/bus/pci/devices/.../remove
Date: January 2009
Contact: Linux PCI developers <[email protected]>
Description:
Writing a non-zero value to this attribute will
hot-remove the PCI device and any of its children.
What: /sys/bus/pci/devices/.../pci_bus/.../rescan
Date: May 2011
Contact: Linux PCI developers <[email protected]>
Description:
Writing a non-zero value to this attribute will
force a rescan of the bus and all child buses,
and re-discover devices removed earlier from this
part of the device tree.
What: /sys/bus/pci/devices/.../rescan
Date: January 2009
Contact: Linux PCI developers <[email protected]>
Description:
Writing a non-zero value to this attribute will
force a rescan of the device's parent bus and all
child buses, and re-discover devices removed earlier
from this part of the device tree.
What: /sys/bus/pci/devices/.../reset_method
Date: August 2021
Contact: Amey Narkhede <[email protected]>
Description:
Some devices allow an individual function to be reset
without affecting other functions in the same slot.
For devices that have this support, a file named
reset_method is present in sysfs. Reading this file
gives names of the supported and enabled reset methods and
their ordering. Writing a space-separated list of names of
reset methods sets the reset methods and ordering to be
used when resetting the device. Writing an empty string
disables the ability to reset the device. Writing
"default" enables all supported reset methods in the
default ordering.
What: /sys/bus/pci/devices/.../reset
Date: July 2009
Contact: Michael S. Tsirkin <[email protected]>
Description:
Some devices allow an individual function to be reset
without affecting other functions in the same device.
For devices that have this support, a file named reset
will be present in sysfs. Writing 1 to this file
will perform reset.
What: /sys/bus/pci/devices/.../reset_subordinate
Date: October 2024
Contact: [email protected]
Description:
This is visible only for bridge devices. If you want to reset
all devices attached through the subordinate bus of a specific
bridge device, writing 1 to this will try to do it. This will
affect all devices attached to the system through this bridge
similiar to writing 1 to their individual "reset" file, so use
with caution.
What: /sys/bus/pci/devices/.../vpd
Date: February 2008
Contact: Ben Hutchings <[email protected]>
Description:
A file named vpd in a device directory will be a
binary file containing the Vital Product Data for the
device. It should follow the VPD format defined in
PCI Specification 2.1 or 2.2, but users should consider
that some devices may have incorrectly formatted data.
If the underlying VPD has a writable section then the
corresponding section of this file will be writable.
What: /sys/bus/pci/devices/.../virtfn<N>
Date: March 2009
Contact: Yu Zhao <[email protected]>
Description:
This symbolic link appears when hardware supports the SR-IOV
capability and the Physical Function driver has enabled it.
The symbolic link points to the PCI device sysfs entry of the
Virtual Function whose index is N (0...MaxVFs-1).
What: /sys/bus/pci/devices/.../dep_link
Date: March 2009
Contact: Yu Zhao <[email protected]>
Description:
This symbolic link appears when hardware supports the SR-IOV
capability and the Physical Function driver has enabled it,
and this device has vendor specific dependencies with others.
The symbolic link points to the PCI device sysfs entry of
Physical Function this device depends on.
What: /sys/bus/pci/devices/.../physfn
Date: March 2009
Contact: Yu Zhao <[email protected]>
Description:
This symbolic link appears when a device is a Virtual Function.
The symbolic link points to the PCI device sysfs entry of the
Physical Function this device associates with.
What: /sys/bus/pci/devices/.../modalias
Date: May 2005
Contact: Greg Kroah-Hartman <[email protected]>
Description:
This attribute indicates the PCI ID of the device object.
That is in the format:
pci:vXXXXXXXXdXXXXXXXXsvXXXXXXXXsdXXXXXXXXbcXXscXXiXX,
where:
- vXXXXXXXX contains the vendor ID;
- dXXXXXXXX contains the device ID;
- svXXXXXXXX contains the sub-vendor ID;
- sdXXXXXXXX contains the subsystem device ID;
- bcXX contains the device class;
- scXX contains the device subclass;
- iXX contains the device class programming interface.
What: /sys/bus/pci/slots/.../module
Date: June 2009
Contact: [email protected]
Description:
This symbolic link points to the PCI hotplug controller driver
module that manages the hotplug slot.
What: /sys/bus/pci/devices/.../label
Date: July 2010
Contact: Narendra K <[email protected]>, [email protected]
Description:
Reading this attribute will provide the firmware
given name (SMBIOS type 41 string or ACPI _DSM string) of
the PCI device. The attribute will be created only
if the firmware has given a name to the PCI device.
ACPI _DSM string name will be given priority if the
system firmware provides SMBIOS type 41 string also.
Users:
Userspace applications interested in knowing the
firmware assigned name of the PCI device.
What: /sys/bus/pci/devices/.../index
Date: July 2010
Contact: Narendra K <[email protected]>, [email protected]
Description:
Reading this attribute will provide the firmware given instance
number of the PCI device. Depending on the platform this can
be for example the SMBIOS type 41 device type instance or the
user-defined ID (UID) on s390. The attribute will be created
only if the firmware has given an instance number to the PCI
device and that number is guaranteed to uniquely identify the
device in the system.
Users:
Userspace applications interested in knowing the
firmware assigned device type instance of the PCI
device that can help in understanding the firmware
intended order of the PCI device.
What: /sys/bus/pci/devices/.../acpi_index
Date: July 2010
Contact: Narendra K <[email protected]>, [email protected]
Description:
Reading this attribute will provide the firmware
given instance (ACPI _DSM instance number) of the PCI device.
The attribute will be created only if the firmware has given
an instance number to the PCI device. ACPI _DSM instance number
will be given priority if the system firmware provides SMBIOS
type 41 device type instance also.
Users:
Userspace applications interested in knowing the
firmware assigned instance number of the PCI
device that can help in understanding the firmware
intended order of the PCI device.
What: /sys/bus/pci/devices/.../d3cold_allowed
Date: July 2012
Contact: Huang Ying <[email protected]>
Description:
d3cold_allowed is bit to control whether the corresponding PCI
device can be put into D3Cold state. If it is cleared, the
device will never be put into D3Cold state. If it is set, the
device may be put into D3Cold state if other requirements are
satisfied too. Reading this attribute will show the current
value of d3cold_allowed bit. Writing this attribute will set
the value of d3cold_allowed bit.
What: /sys/bus/pci/devices/.../sriov_totalvfs
Date: November 2012
Contact: Donald Dutile <[email protected]>
Description:
This file appears when a physical PCIe device supports SR-IOV.
Userspace applications can read this file to determine the
maximum number of Virtual Functions (VFs) a PCIe physical
function (PF) can support. Typically, this is the value reported
in the PF's SR-IOV extended capability structure's TotalVFs
element. Drivers have the ability at probe time to reduce the
value read from this file via the pci_sriov_set_totalvfs()
function.
What: /sys/bus/pci/devices/.../sriov_numvfs
Date: November 2012
Contact: Donald Dutile <[email protected]>
Description:
This file appears when a physical PCIe device supports SR-IOV.
Userspace applications can read and write to this file to
determine and control the enablement or disablement of Virtual
Functions (VFs) on the physical function (PF). A read of this
file will return the number of VFs that are enabled on this PF.
A number written to this file will enable the specified
number of VFs. A userspace application would typically read the
file and check that the value is zero, and then write the number
of VFs that should be enabled on the PF; the value written
should be less than or equal to the value in the sriov_totalvfs
file. A userspace application wanting to disable the VFs would
write a zero to this file. The core ensures that valid values
are written to this file, and returns errors when values are not
valid. For example, writing a 2 to this file when sriov_numvfs
is not 0 and not 2 already will return an error. Writing a 10
when the value of sriov_totalvfs is 8 will return an error.
What: /sys/bus/pci/devices/.../driver_override
Date: April 2014
Contact: Alex Williamson <[email protected]>
Description:
This file allows the driver for a device to be specified which
will override standard static and dynamic ID matching. When
specified, only a driver with a name matching the value written
to driver_override will have an opportunity to bind to the
device. The override is specified by writing a string to the
driver_override file (echo pci-stub > driver_override) and
may be cleared with an empty string (echo > driver_override).
This returns the device to standard matching rules binding.
Writing to driver_override does not automatically unbind the
device from its current driver or make any attempt to
automatically load the specified driver. If no driver with a
matching name is currently loaded in the kernel, the device
will not bind to any driver. This also allows devices to
opt-out of driver binding using a driver_override name such as
"none". Only a single driver may be specified in the override,
there is no support for parsing delimiters.
What: /sys/bus/pci/devices/.../numa_node
Date: Oct 2014
Contact: Prarit Bhargava <[email protected]>
Description:
This file contains the NUMA node to which the PCI device is
attached, or -1 if the node is unknown. The initial value
comes from an ACPI _PXM method or a similar firmware
source. If that is missing or incorrect, this file can be
written to override the node. In that case, please report
a firmware bug to the system vendor. Writing to this file
taints the kernel with TAINT_FIRMWARE_WORKAROUND, which
reduces the supportability of your system.
What: /sys/bus/pci/devices/.../revision
Date: November 2016
Contact: Emil Velikov <[email protected]>
Description:
This file contains the revision field of the PCI device.
The value comes from device config space. The file is read only.
What: /sys/bus/pci/devices/.../sriov_drivers_autoprobe
Date: April 2017
Contact: Bodong Wang<[email protected]>
Description:
This file is associated with the PF of a device that
supports SR-IOV. It determines whether newly-enabled VFs
are immediately bound to a driver. It initially contains
1, which means the kernel automatically binds VFs to a
compatible driver immediately after they are enabled. If
an application writes 0 to the file before enabling VFs,
the kernel will not bind VFs to a driver.
A typical use case is to write 0 to this file, then enable
VFs, then assign the newly-created VFs to virtual machines.
Note that changing this file does not affect already-
enabled VFs. In this scenario, the user must first disable
the VFs, write 0 to sriov_drivers_autoprobe, then re-enable
the VFs.
This is similar to /sys/bus/pci/drivers_autoprobe, but
affects only the VFs associated with a specific PF.
What: /sys/bus/pci/devices/.../p2pmem/size
Date: November 2017
Contact: Logan Gunthorpe <[email protected]>
Description:
If the device has any Peer-to-Peer memory registered, this
file contains the total amount of memory that the device
provides (in decimal).
What: /sys/bus/pci/devices/.../p2pmem/available
Date: November 2017
Contact: Logan Gunthorpe <[email protected]>
Description:
If the device has any Peer-to-Peer memory registered, this
file contains the amount of memory that has not been
allocated (in decimal).
What: /sys/bus/pci/devices/.../p2pmem/published
Date: November 2017
Contact: Logan Gunthorpe <[email protected]>
Description:
If the device has any Peer-to-Peer memory registered, this
file contains a '1' if the memory has been published for
use outside the driver that owns the device.
What: /sys/bus/pci/devices/.../p2pmem/allocate
Date: August 2022
Contact: Logan Gunthorpe <[email protected]>
Description:
This file allows mapping p2pmem into userspace. For each
mmap() call on this file, the kernel will allocate a chunk
of Peer-to-Peer memory for use in Peer-to-Peer transactions.
This memory can be used in O_DIRECT calls to NVMe backed
files for Peer-to-Peer copies.
What: /sys/bus/pci/devices/.../link/clkpm
/sys/bus/pci/devices/.../link/l0s_aspm
/sys/bus/pci/devices/.../link/l1_aspm
/sys/bus/pci/devices/.../link/l1_1_aspm
/sys/bus/pci/devices/.../link/l1_2_aspm
/sys/bus/pci/devices/.../link/l1_1_pcipm
/sys/bus/pci/devices/.../link/l1_2_pcipm
Date: October 2019
Contact: Heiner Kallweit <[email protected]>
Description: If ASPM is supported for an endpoint, these files can be
used to disable or enable the individual power management
states. Write y/1/on to enable, n/0/off to disable.
What: /sys/bus/pci/devices/.../power_state
Date: November 2020
Contact: Linux PCI developers <[email protected]>
Description:
This file contains the current PCI power state of the device.
The value comes from the PCI kernel device state and can be one
of: "unknown", "error", "D0", D1", "D2", "D3hot", "D3cold".
The file is read only.
What: /sys/bus/pci/devices/.../sriov_vf_total_msix
Date: January 2021
Contact: Leon Romanovsky <[email protected]>
Description:
This file is associated with a SR-IOV physical function (PF).
It contains the total number of MSI-X vectors available for
assignment to all virtual functions (VFs) associated with PF.
The value will be zero if the device doesn't support this
functionality. For supported devices, the value will be
constant and won't be changed after MSI-X vectors assignment.
What: /sys/bus/pci/devices/.../sriov_vf_msix_count
Date: January 2021
Contact: Leon Romanovsky <[email protected]>
Description:
This file is associated with a SR-IOV virtual function (VF).
It allows configuration of the number of MSI-X vectors for
the VF. This allows devices that have a global pool of MSI-X
vectors to optimally divide them between VFs based on VF usage.
The values accepted are:
* > 0 - this number will be reported as the Table Size in the
VF's MSI-X capability
* < 0 - not valid
* = 0 - will reset to the device default value
The file is writable if the PF is bound to a driver that
implements ->sriov_set_msix_vec_count().
What: /sys/bus/pci/devices/.../resourceN_resize
Date: September 2022
Contact: Alex Williamson <[email protected]>
Description:
These files provide an interface to PCIe Resizable BAR support.
A file is created for each BAR resource (N) supported by the
PCIe Resizable BAR extended capability of the device. Reading
each file exposes the bitmap of available resource sizes:
# cat resource1_resize
00000000000001c0
The bitmap represents supported resource sizes for the BAR,
where bit0 = 1MB, bit1 = 2MB, bit2 = 4MB, etc. In the above
example the device supports 64MB, 128MB, and 256MB BAR sizes.
When writing the file, the user provides the bit position of
the desired resource size, for example:
# echo 7 > resource1_resize
This indicates to set the size value corresponding to bit 7,
128MB. The resulting size is 2 ^ (bit# + 20). This definition
matches the PCIe specification of this capability.
In order to make use of resource resizing, all PCI drivers must
be unbound from the device and peer devices under the same
parent bridge may need to be soft removed. In the case of
VGA devices, writing a resize value will remove low level
console drivers from the device. Raw users of pci-sysfs
resourceN attributes must be terminated prior to resizing.
Success of the resizing operation is not guaranteed.
What: /sys/bus/pci/devices/.../leds/*:enclosure:*/brightness
What: /sys/class/leds/*:enclosure:*/brightness
Date: August 2024
KernelVersion: 6.12
Description:
LED indications on PCIe storage enclosures which are controlled
through the NPEM interface (Native PCIe Enclosure Management,
PCIe r6.1 sec 6.28) are accessible as led class devices, both
below /sys/class/leds and below NPEM-capable PCI devices.
Although these led class devices could be manipulated manually,
in practice they are typically manipulated automatically by an
application such as ledmon(8).
The name of a led class device is as follows:
<bdf>:enclosure:<indication>
where:
- <bdf> is the domain, bus, device and function number
(e.g. 10000:02:05.0)
- <indication> is a short description of the LED indication
Valid indications per PCIe r6.1 table 6-27 are:
- ok (drive is functioning normally)
- locate (drive is being identified by an admin)
- fail (drive is not functioning properly)
- rebuild (drive is part of an array that is rebuilding)
- pfa (drive is predicted to fail soon)
- hotspare (drive is marked to be used as a replacement)
- ica (drive is part of an array that is degraded)
- ifa (drive is part of an array that is failed)
- idt (drive is not the right type for the connector)
- disabled (drive is disabled, removal is safe)
- specific0 to specific7 (enclosure-specific indications)
Broadly, the indications fall into one of these categories:
- to signify drive state (ok, locate, fail, idt, disabled)
- to signify drive role or state in a software RAID array
(rebuild, pfa, hotspare, ica, ifa)
- to signify any other role or state (specific0 to specific7)
Mandatory indications per PCIe r6.1 sec 7.9.19.2 comprise:
ok, locate, fail, rebuild. All others are optional.
A led class device is only visible if the corresponding
indication is supported by the device.
To manipulate the indications, write 0 (LED_OFF) or 1 (LED_ON)
to the "brightness" file. Note that manipulating an indication
may implicitly manipulate other indications at the vendor's
discretion. E.g. when the user lights up the "ok" indication,
the vendor may choose to automatically turn off the "fail"
indication. The current state of an indication can be
retrieved by reading its "brightness" file.
The PCIe Base Specification allows vendors leeway to choose
different colors or blinking patterns for the indications,
but they typically follow the IBPI standard. E.g. the "locate"
indication is usually presented as one or two LEDs blinking at
4 Hz frequency:
https://en.wikipedia.org/wiki/International_Blinking_Pattern_Interpretation
PCI Firmware Specification r3.3 sec 4.7 defines a DSM interface
to facilitate shared access by operating system and platform
firmware to a device's NPEM registers. The kernel will use
this DSM interface where available, instead of accessing NPEM
registers directly. The DSM interface does not support the
enclosure-specific indications "specific0" to "specific7",
hence the corresponding led class devices are unavailable if
the DSM interface is used.
What: /sys/bus/pci/devices/.../doe_features
Date: March 2025
Contact: Linux PCI developers <[email protected]>
Description:
This directory contains a list of the supported Data Object
Exchange (DOE) features. The features are the file name.
The contents of each file is the raw Vendor ID and data
object feature values.
The value comes from the device and specifies the vendor and
data object type supported. The lower (RHS of the colon) is
the data object type in hex. The upper (LHS of the colon)
is the vendor ID.
As all DOE devices must support the DOE discovery feature,
if DOE is supported you will at least see the doe_discovery
file, with this contents:
# cat doe_features/doe_discovery
0001:00
If the device supports other features you will see other
files as well. For example if CMA/SPDM and secure CMA/SPDM
are supported the doe_features directory will look like
this:
# ls doe_features
0001:01 0001:02 doe_discovery
What: /sys/bus/pci/devices/.../serial_number
Date: December 2025
Contact: Matthew Wood <[email protected]>
Description:
This is visible only for PCI devices that support the serial
number extended capability. The file is read only and due to
the possible sensitivity of accessible serial numbers, admin
only.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
PCI 장치를 driver에 bind
1-16| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/drivers/.../bind |
| What | /sys/devices/pciX/.../bind |
| Date | 2003년 12월 |
| Contact | [email protected] |
| Description | 이 file에 장치 위치를 쓰면 driver가 해당 위치의 장치에 bind를 시도합니다. 기본 binding을 override할 때 유용합니다. 위치 형식은 DDDD:BB:DD.F, 즉 Domain:Bus:Device.Function이며 /sys/bus/pci/devices/에서 사용하는 형식과 같습니다. 2.6.28 이전 kernel에서는 echo -n이 필요할 수 있습니다. |
# echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind
PCI 장치를 driver에서 unbind
17-32| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/drivers/.../unbind |
| What | /sys/devices/pciX/.../unbind |
| Date | 2003년 12월 |
| Contact | [email protected] |
| Description | 이 file에 장치 위치를 쓰면 driver가 해당 위치의 장치에서 unbind를 시도합니다. 기본 binding을 override할 때 유용할 수 있습니다. 위치 형식은 DDDD:BB:DD.F, 즉 Domain:Bus:Device.Function이며 /sys/bus/pci/devices/에서 사용하는 형식과 같습니다. 2.6.28 이전 kernel에서는 echo -n이 필요할 수 있습니다. |
# echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind
동적 PCI device ID 추가
33-51| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/drivers/.../new_id |
| What | /sys/devices/pciX/.../new_id |
| Date | 2003년 12월 |
| Contact | [email protected] |
| Description | 이 file에 device ID를 쓰면 PCI device driver에 새 ID를 동적으로 추가합니다. Compile 시점의 static device ID table보다 더 많은 hardware를 지원하게 할 수 있습니다. 형식은 VVVV DDDD SVVV SDDD CCCC MMMM PPPP이며 Vendor ID, Device ID, Subsystem Vendor ID, Subsystem Device ID, Class, Class Mask, Private Driver Data 순서입니다. Vendor ID와 Device ID는 필수이고 나머지는 선택 사항입니다. ID 추가에 성공하면 driver가 장치를 probe하고 bind를 시도합니다. |
# echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id
동적 PCI device ID 제거
52-69| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/drivers/.../remove_id |
| What | /sys/devices/pciX/.../remove_id |
| Date | 2009년 2월 |
| Contact | Chris Wright <[email protected]> |
| Description | 이 file에 device ID를 쓰면 new_id sysfs entry로 동적으로 추가한 ID를 제거합니다. 형식은 VVVV DDDD SVVV SDDD CCCC MMMM이며 Vendor ID, Device ID, Subsystem Vendor ID, Subsystem Device ID, Class, Class Mask 순서입니다. Vendor ID와 Device ID는 필수이고 나머지는 선택 사항입니다. 제거에 성공하면 driver는 해당 장치를 더 이상 지원하지 않으므로 auto probing이 이 driver와 장치를 match하지 않게 할 수 있습니다. |
# echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id
모든 PCI bus 다시 scan
70-77| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/rescan |
| Date | 2009년 1월 |
| Contact | Linux PCI developers <[email protected]> |
| Description | 0이 아닌 값을 쓰면 system의 모든 PCI bus를 강제로 다시 scan하고 이전에 제거된 장치를 다시 발견합니다. |
향후 driver의 MSI·MSI-X 허용
78-87| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../msi_bus |
| Date | 2014년 9월 |
| Contact | Linux PCI developers <[email protected]> |
| Description | 0을 쓰면 이 장치의 향후 driver가 MSI와 MSI-X를 사용하는 것을 금지합니다. 장치가 bridge이면 bridge 아래 모든 child 장치의 향후 driver에도 금지가 적용됩니다. 새 설정을 적용하려면 driver를 reload해야 합니다. |
할당된 MSI IRQ vector 목록
88-95| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../msi_irqs/ |
| Date | 2011년 9월 |
| Contact | Neil Horman <[email protected]> |
| Description | /sys/devices/.../msi_irqs 디렉터리는 가변적인 file 집합을 담고 있으며 각 file 이름은 장치에 할당된 해당 MSI IRQ vector 번호입니다. |
MSI IRQ vector mode
96-102| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../msi_irqs/<N> |
| Date | 2011년 9월 |
| Contact | Neil Horman <[email protected]> |
| Description | File 이름이 가리키는 IRQ vector가 MSI mode인지 MSI-X mode인지 나타냅니다. |
현재 PCI device IRQ
103-113| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../irq |
| Date | 2021년 8월 |
| Contact | Linux PCI developers <[email protected]> |
| Description | Driver가 MSI를 활성화했지만 MSI-X는 활성화하지 않았다면 irq는 첫 MSI vector의 IRQ를 담습니다. 그 외에는 legacy INTx interrupt의 IRQ를 담습니다. irq가 0이면 장치가 legacy INTx interrupt를 생성할 수 없음을 뜻합니다. |
PCI 장치와 child hot-remove
114-120| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../remove |
| Date | 2009년 1월 |
| Contact | Linux PCI developers <[email protected]> |
| Description | 0이 아닌 값을 쓰면 PCI 장치와 그 모든 child를 hot-remove합니다. |
PCI bus와 child bus 다시 scan
121-129| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../pci_bus/.../rescan |
| Date | 2011년 5월 |
| Contact | Linux PCI developers <[email protected]> |
| Description | 0이 아닌 값을 쓰면 해당 bus와 모든 child bus를 강제로 다시 scan하고 device tree의 이 부분에서 이전에 제거된 장치를 다시 발견합니다. |
장치 parent bus 다시 scan
130-138| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../rescan |
| Date | 2009년 1월 |
| Contact | Linux PCI developers <[email protected]> |
| Description | 0이 아닌 값을 쓰면 장치의 parent bus와 모든 child bus를 강제로 다시 scan하고 device tree의 이 부분에서 이전에 제거된 장치를 다시 발견합니다. |
PCI function reset method 순서
139-155| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../reset_method |
| Date | 2021년 8월 |
| Contact | Amey Narkhede <[email protected]> |
| Description | 같은 slot의 다른 function에 영향을 주지 않고 개별 function을 reset할 수 있는 장치에 존재합니다. 읽으면 지원되며 활성화된 reset method 이름과 순서를 반환합니다. 공백으로 구분한 method 이름 목록을 쓰면 장치 reset에 사용할 method와 순서를 설정합니다. 빈 문자열을 쓰면 장치 reset 기능을 비활성화하고, "default"를 쓰면 지원되는 모든 method를 기본 순서로 활성화합니다. |
개별 PCI function reset
156-165| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../reset |
| Date | 2009년 7월 |
| Contact | Michael S. Tsirkin <[email protected]> |
| Description | 같은 장치의 다른 function에 영향을 주지 않고 개별 function을 reset할 수 있는 장치에 존재합니다. 1을 쓰면 reset을 수행합니다. |
Bridge subordinate bus 전체 reset
166-176| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../reset_subordinate |
| Date | 2024년 10월 |
| Contact | [email protected] |
| Description | Bridge 장치에만 보입니다. 1을 쓰면 특정 bridge의 subordinate bus를 통해 연결된 모든 장치를 reset하려고 시도합니다. 각 장치의 reset file에 1을 쓰는 것과 유사하게 이 bridge를 통해 system에 연결된 모든 장치에 영향을 주므로 주의해야 합니다. |
PCI Vital Product Data
177-188| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../vpd |
| Date | 2008년 2월 |
| Contact | Ben Hutchings <[email protected]> |
| Description | 장치의 Vital Product Data를 담는 binary file입니다. PCI Specification 2.1 또는 2.2의 VPD 형식을 따라야 하지만 일부 장치는 잘못된 형식의 데이터를 제공할 수 있습니다. 기반 VPD에 쓰기 가능한 section이 있으면 이 file의 해당 section도 쓸 수 있습니다. |
SR-IOV Virtual Function link
189-197| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../virtfn<N> |
| Date | 2009년 3월 |
| Contact | Yu Zhao <[email protected]> |
| Description | Hardware가 SR-IOV capability를 지원하고 Physical Function driver가 이를 활성화했을 때 나타나는 symbolic link입니다. Index N(0...MaxVFs-1)의 Virtual Function에 해당하는 PCI device sysfs entry를 가리킵니다. |
SR-IOV vendor dependency link
198-207| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../dep_link |
| Date | 2009년 3월 |
| Contact | Yu Zhao <[email protected]> |
| Description | Hardware가 SR-IOV capability를 지원하고 PF driver가 이를 활성화했으며 이 장치가 다른 장치와 vendor-specific dependency를 가질 때 나타납니다. 이 장치가 의존하는 Physical Function의 PCI device sysfs entry를 가리킵니다. |
Virtual Function의 Physical Function
208-215| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../physfn |
| Date | 2009년 3월 |
| Contact | Yu Zhao <[email protected]> |
| Description | 장치가 Virtual Function일 때 나타나는 symbolic link이며, 이 장치와 연결된 Physical Function의 PCI device sysfs entry를 가리킵니다. |
PCI device modalias
216-233| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../modalias |
| Date | 2005년 5월 |
| Contact | Greg Kroah-Hartman <[email protected]> |
| Description | 장치 object의 PCI ID를 나타냅니다. 형식은 pci:vXXXXXXXXdXXXXXXXXsvXXXXXXXXsdXXXXXXXXbcXXscXXiXX입니다. |
| Field | 의미 |
|---|---|
| vXXXXXXXX | Vendor ID |
| dXXXXXXXX | Device ID |
| svXXXXXXXX | Sub-vendor ID |
| sdXXXXXXXX | Subsystem Device ID |
| bcXX | Device class |
| scXX | Device subclass |
| iXX | Device class programming interface |
PCI hotplug controller module
234-240| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/slots/.../module |
| Date | 2009년 6월 |
| Contact | [email protected] |
| Description | Hotplug slot을 관리하는 PCI hotplug controller driver module을 가리키는 symbolic link입니다. |
Firmware가 부여한 PCI 장치 이름
241-254| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../label |
| Date | 2010년 7월 |
| Contact | Narendra K <[email protected]>, [email protected] |
| Description | 읽으면 firmware가 PCI 장치에 부여한 이름(SMBIOS type 41 string 또는 ACPI _DSM string)을 제공합니다. Firmware가 이름을 부여한 경우에만 생성됩니다. System firmware가 SMBIOS type 41 string도 제공하면 ACPI _DSM string 이름이 우선합니다. |
| Users | PCI 장치에 firmware가 할당한 이름을 알고자 하는 userspace application. |
Firmware PCI 장치 instance 번호
255-271| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../index |
| Date | 2010년 7월 |
| Contact | Narendra K <[email protected]>, [email protected] |
| Description | 읽으면 firmware가 PCI 장치에 부여한 instance 번호를 제공합니다. Platform에 따라 SMBIOS type 41 device type instance나 s390의 user-defined ID(UID)일 수 있습니다. Firmware가 instance 번호를 부여했고 그 번호가 system에서 장치를 고유하게 식별한다고 보장될 때만 생성됩니다. |
| Users | Firmware가 의도한 PCI 장치 순서를 이해하는 데 도움이 되는 firmware 할당 device type instance를 알고자 하는 userspace application. |
ACPI _DSM PCI 장치 instance
272-287| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../acpi_index |
| Date | 2010년 7월 |
| Contact | Narendra K <[email protected]>, [email protected] |
| Description | 읽으면 firmware가 PCI 장치에 부여한 instance, 즉 ACPI _DSM instance 번호를 제공합니다. Firmware가 번호를 부여한 경우에만 생성됩니다. System firmware가 SMBIOS type 41 device type instance도 제공하면 ACPI _DSM instance 번호가 우선합니다. |
| Users | Firmware가 의도한 PCI 장치 순서를 이해하는 데 도움이 되는 firmware 할당 instance 번호를 알고자 하는 userspace application. |
PCI D3Cold 허용 bit
288-299| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../d3cold_allowed |
| Date | 2012년 7월 |
| Contact | Huang Ying <[email protected]> |
| Description | 해당 PCI 장치를 D3Cold 상태로 전환할 수 있는지 제어하는 bit입니다. Clear하면 장치를 D3Cold로 전환하지 않습니다. Set하면 다른 요구 사항도 충족될 때 D3Cold로 전환할 수 있습니다. 읽으면 현재 bit 값을 표시하고 쓰면 값을 설정합니다. |
SR-IOV PF 최대 VF 수
300-312| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../sriov_totalvfs |
| Date | 2012년 11월 |
| Contact | Donald Dutile <[email protected]> |
| Description | Physical PCIe 장치가 SR-IOV를 지원할 때 나타납니다. PCIe Physical Function(PF)이 지원할 수 있는 최대 Virtual Function(VF) 수를 읽을 수 있습니다. 일반적으로 PF의 SR-IOV extended capability structure에 있는 TotalVFs 값입니다. Driver는 probe 시 pci_sriov_set_totalvfs()로 이 file에서 읽히는 값을 줄일 수 있습니다. |
SR-IOV VF 활성 수 제어
313-333| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../sriov_numvfs |
| Date | 2012년 11월 |
| Contact | Donald Dutile <[email protected]> |
| Description | Physical PCIe 장치가 SR-IOV를 지원할 때 나타납니다. 읽으면 PF에서 활성화된 VF 수를 반환합니다. 숫자를 쓰면 지정한 수의 VF를 활성화하며 sriov_totalvfs 이하이어야 합니다. VF를 비활성화하려면 0을 씁니다. Core는 값의 유효성을 검사합니다. 예를 들어 현재 sriov_numvfs가 0도 2도 아닐 때 2를 쓰면 오류이고, sriov_totalvfs가 8일 때 10을 써도 오류입니다. |
PCI driver 이름 override
334-354| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../driver_override |
| Date | 2014년 4월 |
| Contact | Alex Williamson <[email protected]> |
| Description | 표준 static·dynamic ID matching을 override할 driver를 지정합니다. 값과 이름이 일치하는 driver만 bind할 기회를 얻습니다. 빈 문자열로 clear하면 표준 matching rule로 돌아갑니다. 쓰기만으로 현재 driver에서 자동 unbind하거나 지정 driver를 자동 load하지 않습니다. 일치하는 이름의 driver가 load되지 않았으면 어느 driver에도 bind되지 않습니다. "none" 같은 이름으로 binding을 거부할 수도 있습니다. Override에는 driver 하나만 지정할 수 있고 delimiter parsing은 지원하지 않습니다. |
echo pci-stub > driver_override
echo > driver_override
PCI 장치 NUMA node
355-367| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../numa_node |
| Date | 2014년 10월 |
| Contact | Prarit Bhargava <[email protected]> |
| Description | PCI 장치가 연결된 NUMA node를 담으며 알 수 없으면 -1입니다. 초기값은 ACPI _PXM method 또는 유사한 firmware source에서 옵니다. 값이 없거나 잘못되면 써서 override할 수 있지만 system vendor에 firmware bug를 보고해야 합니다. 쓰면 kernel이 TAINT_FIRMWARE_WORKAROUND로 taint되어 system 지원 가능성이 낮아집니다. |
PCI config-space revision
368-374| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../revision |
| Date | 2016년 11월 |
| Contact | Emil Velikov <[email protected]> |
| Description | PCI 장치의 revision field를 담습니다. 값은 device config space에서 오며 file은 read-only입니다. |
새 SR-IOV VF driver 자동 bind
375-396| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../sriov_drivers_autoprobe |
| Date | 2017년 4월 |
| Contact | Bodong Wang<[email protected]> |
| Description | SR-IOV를 지원하는 PF와 연결되며 새로 활성화한 VF를 즉시 driver에 bind할지 결정합니다. 초기값 1은 VF 활성 직후 compatible driver에 자동 bind함을 뜻합니다. VF 활성 전에 0을 쓰면 자동 bind하지 않습니다. 일반적인 용도는 0을 쓴 뒤 VF를 활성화해 새 VF를 virtual machine에 할당하는 것입니다. 이미 활성화된 VF에는 변경이 적용되지 않으므로 먼저 VF를 비활성화하고 0을 쓴 뒤 다시 활성화해야 합니다. /sys/bus/pci/drivers_autoprobe와 비슷하지만 특정 PF의 VF에만 적용됩니다. |
등록된 Peer-to-Peer memory 총량
397-404| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../p2pmem/size |
| Date | 2017년 11월 |
| Contact | Logan Gunthorpe <[email protected]> |
| Description | 장치에 등록된 Peer-to-Peer memory가 있으면 장치가 제공하는 총 memory 양을 10진수로 담습니다. |
할당되지 않은 Peer-to-Peer memory
405-412| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../p2pmem/available |
| Date | 2017년 11월 |
| Contact | Logan Gunthorpe <[email protected]> |
| Description | 장치에 등록된 Peer-to-Peer memory가 있으면 아직 할당되지 않은 memory 양을 10진수로 담습니다. |
Peer-to-Peer memory 공개 상태
413-420| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../p2pmem/published |
| Date | 2017년 11월 |
| Contact | Logan Gunthorpe <[email protected]> |
| Description | 장치에 등록된 Peer-to-Peer memory가 있으면 장치를 소유한 driver 밖에서 사용하도록 memory가 공개되었을 때 1을 담습니다. |
Peer-to-Peer memory userspace mapping
421-430| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../p2pmem/allocate |
| Date | 2022년 8월 |
| Contact | Logan Gunthorpe <[email protected]> |
| Description | P2P memory를 userspace에 mapping할 수 있게 합니다. 이 file에 mmap()을 호출할 때마다 kernel은 Peer-to-Peer transaction에 사용할 memory chunk를 할당합니다. 이 memory는 NVMe-backed file에 대한 O_DIRECT 호출에서 Peer-to-Peer copy에 사용할 수 있습니다. |
PCIe link power management state
431-443| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../link/clkpm |
| What | /sys/bus/pci/devices/.../link/l0s_aspm |
| What | /sys/bus/pci/devices/.../link/l1_aspm |
| What | /sys/bus/pci/devices/.../link/l1_1_aspm |
| What | /sys/bus/pci/devices/.../link/l1_2_aspm |
| What | /sys/bus/pci/devices/.../link/l1_1_pcipm |
| What | /sys/bus/pci/devices/.../link/l1_2_pcipm |
| Date | 2019년 10월 |
| Contact | Heiner Kallweit <[email protected]> |
| Description | Endpoint가 ASPM을 지원하면 개별 power management state를 비활성화하거나 활성화합니다. |
| 활성화 값 | y, 1, on |
| 비활성화 값 | n, 0, off |
현재 PCI power state
444-452| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../power_state |
| Date | 2020년 11월 |
| Contact | Linux PCI developers <[email protected]> |
| Description | 장치의 현재 PCI power state를 담는 read-only file입니다. 값은 PCI kernel device state에서 옵니다. 원문은 D1 앞의 여는 큰따옴표를 빠뜨렸습니다. |
| 가능한 값 | unknown, error, D0, D1, D2, D3hot, D3cold |
PF의 전체 VF MSI-X vector 수
453-463| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../sriov_vf_total_msix |
| Date | 2021년 1월 |
| Contact | Leon Romanovsky <[email protected]> |
| Description | SR-IOV PF와 연결되며 해당 PF의 모든 VF에 할당할 수 있는 전체 MSI-X vector 수를 담습니다. 기능을 지원하지 않으면 0입니다. 지원 장치에서는 값이 constant이며 MSI-X vector 할당 뒤에도 바뀌지 않습니다. |
VF MSI-X vector 수 구성
464-481| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../sriov_vf_msix_count |
| Date | 2021년 1월 |
| Contact | Leon Romanovsky <[email protected]> |
| Description | SR-IOV VF와 연결되며 VF의 MSI-X vector 수를 구성합니다. Global MSI-X vector pool을 가진 장치가 VF 사용량에 따라 vector를 최적으로 나누게 합니다. PF가 ->sriov_set_msix_vec_count()를 구현한 driver에 bind된 경우 쓸 수 있습니다. |
| 값 | 동작 |
|---|---|
| > 0 | 이 숫자를 VF MSI-X capability의 Table Size로 보고합니다. |
| < 0 | 유효하지 않습니다. |
| = 0 | 장치 기본값으로 reset합니다. |
PCIe Resizable BAR 크기
482-514| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../resourceN_resize |
| Date | 2022년 9월 |
| Contact | Alex Williamson <[email protected]> |
| Description | PCIe Resizable BAR interface입니다. 장치의 Resizable BAR extended capability가 지원하는 각 BAR resource N마다 file이 생성됩니다. 읽으면 가능한 resource size bitmap을 반환하며 bit0=1MB, bit1=2MB, bit2=4MB 순입니다. 예시 bitmap은 64MB, 128MB, 256MB BAR를 지원합니다. 쓸 때는 원하는 size의 bit 위치를 지정하며 결과 size는 2 ^ (bit# + 20)입니다. 사용하려면 장치의 모든 PCI driver를 unbind해야 하고 같은 parent bridge 아래 peer 장치를 soft-remove해야 할 수 있습니다. VGA 장치는 resize 값 쓰기가 low-level console driver를 제거합니다. pci-sysfs resourceN 속성의 raw 사용자는 resize 전에 종료해야 하며 성공은 보장되지 않습니다. |
# cat resource1_resize
00000000000001c0
# echo 7 > resource1_resize
PCIe enclosure NPEM LED indication
515-586| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../leds/*:enclosure:*/brightness |
| What | /sys/class/leds/*:enclosure:*/brightness |
| Date | 2024년 8월 |
| KernelVersion | 6.12 |
| Description | NPEM(Native PCIe Enclosure Management, PCIe r6.1 6.28절) interface로 제어하는 PCIe storage enclosure LED indication을 LED class 장치로 제공합니다. /sys/class/leds와 NPEM-capable PCI 장치 아래 모두에서 접근할 수 있습니다. 수동 조작도 가능하지만 보통 ledmon(8) 같은 application이 자동 조작합니다. 이름은 <bdf>:enclosure:<indication>이며 <bdf>는 domain, bus, device, function 번호(예: 10000:02:05.0)이고 <indication>은 LED indication의 짧은 설명입니다. 지원되는 indication에 해당하는 LED class 장치만 보입니다. brightness에 0(LED_OFF) 또는 1(LED_ON)을 쓰고 읽어서 현재 상태를 확인합니다. Vendor 판단에 따라 한 indication 조작이 다른 indication을 암묵적으로 바꿀 수 있습니다. 색상과 blink pattern은 vendor가 선택할 수 있지만 일반적으로 IBPI를 따르며 locate는 보통 하나 또는 두 LED가 4 Hz로 blink합니다. PCI Firmware Specification r3.3 4.7절의 DSM interface가 있으면 kernel은 NPEM register 직접 접근 대신 이를 사용합니다. DSM은 specific0부터 specific7을 지원하지 않으므로 DSM 사용 시 해당 LED class 장치는 제공되지 않습니다. |
| Reference | https://en.wikipedia.org/wiki/International_Blinking_Pattern_Interpretation |
| Mandatory indication | ok, locate, fail, rebuild |
| Indication | 의미 |
|---|---|
| ok | Drive가 정상 동작합니다. |
| locate | 관리자가 drive를 식별 중입니다. |
| fail | Drive가 올바르게 동작하지 않습니다. |
| rebuild | Drive가 rebuild 중인 array의 일부입니다. |
| pfa | Drive가 곧 실패할 것으로 예측됩니다. |
| hotspare | 교체용으로 사용할 drive로 표시되었습니다. |
| ica | Drive가 degraded array의 일부입니다. |
| ifa | Drive가 failed array의 일부입니다. |
| idt | Drive가 connector에 맞는 유형이 아닙니다. |
| disabled | Drive가 비활성화되어 안전하게 제거할 수 있습니다. |
| specific0 ... specific7 | Enclosure-specific indication입니다. |
| 범주 | Indication |
|---|---|
| Drive 상태 | ok, locate, fail, idt, disabled |
| Software RAID array의 drive 역할·상태 | rebuild, pfa, hotspare, ica, ifa |
| 기타 역할·상태 | specific0 ... specific7 |
Data Object Exchange feature
587-615| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../doe_features |
| Date | 2025년 3월 |
| Contact | Linux PCI developers <[email protected]> |
| Description | 지원되는 Data Object Exchange(DOE) feature 목록을 담는 디렉터리입니다. Feature가 file 이름이고 각 file 내용은 raw Vendor ID와 data object feature 값입니다. Colon 오른쪽 하위 값은 16진수 data object type이고 왼쪽 상위 값은 vendor ID입니다. 모든 DOE 장치는 DOE discovery feature를 지원해야 하므로 DOE가 지원되면 최소한 doe_discovery file과 0001:00 내용을 볼 수 있습니다. CMA/SPDM과 secure CMA/SPDM을 지원하면 0001:01, 0001:02 file도 나타납니다. |
# cat doe_features/doe_discovery
0001:00
# ls doe_features
0001:01 0001:02 doe_discovery
Admin 전용 PCI serial number
616-623| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/bus/pci/devices/.../serial_number |
| Date | 2025년 12월 |
| Contact | Matthew Wood <[email protected]> |
| Description | Serial number extended capability를 지원하는 PCI 장치에만 보입니다. Read-only이며 접근 가능한 serial number의 민감성 때문에 administrator만 접근할 수 있습니다. |
Binding and dynamic IDs
sysfs-bus-pci:1-69bind·unbind는 DDDD:BB:DD.F 위치로 driver 연결을 바꾸고, new_id·remove_id는 runtime PCI ID matching table을 확장하거나 축소합니다.