← Documents Documentation/misc-devices/pci-endpoint-test.rst GitHub 원문 ↗

Linux 6.18.37 · Misc devices

PCI Endpoint Test Function Driver

pci_epf_test endpoint를 host에서 검사하는 device node와 BAR·IRQ·data-transfer ioctl을 설명합니다.

Source pathDocumentation/misc-devices/pci-endpoint-test.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

pci-endpoint-test.rst:1-56

Root complex 쪽 misc driver는 endpoint function마다 device node를 만들며 하나의 ioctl surface에서 BAR, 세 IRQ 방식, read·write·copy data path를 점검합니다.

PCI endpoint test 범위
그룹Test
ResourceBAR address
InterruptLegacy·MSI·MSI-X
DataRead·write·copy

Test를 resource·interrupt·data transfer 세 그룹으로 나눕니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 =====================================
4 Driver for PCI Endpoint Test Function
5 =====================================
6
7 This driver should be used as a host side driver if the root complex is
8 connected to a configurable PCI endpoint running ``pci_epf_test`` function
9 driver configured according to [1]_.
10
11 The "pci_endpoint_test" driver can be used to perform the following tests.
12
13 The PCI driver for the test device performs the following tests:
14
15 #) verifying addresses programmed in BAR
16 #) raise legacy IRQ
17 #) raise MSI IRQ
18 #) raise MSI-X IRQ
19 #) read data
20 #) write data
21 #) copy data
22
23 This misc driver creates /dev/pci-endpoint-test.<num> for every
24 ``pci_epf_test`` function connected to the root complex and "ioctls"
25 should be used to perform the above tests.
26
27 ioctl
28 -----
29
30 PCITEST_BAR:
31 Tests the BAR. The number of the BAR to be tested
32 should be passed as argument.
33 PCITEST_LEGACY_IRQ:
34 Tests legacy IRQ
35 PCITEST_MSI:
36 Tests message signalled interrupts. The MSI number
37 to be tested should be passed as argument.
38 PCITEST_MSIX:
39 Tests message signalled interrupts. The MSI-X number
40 to be tested should be passed as argument.
41 PCITEST_SET_IRQTYPE:
42 Changes driver IRQ type configuration. The IRQ type
43 should be passed as argument (0: Legacy, 1:MSI, 2:MSI-X).
44 PCITEST_GET_IRQTYPE:
45 Gets driver IRQ type configuration.
46 PCITEST_WRITE:
47 Perform write tests. The size of the buffer should be passed
48 as argument.
49 PCITEST_READ:
50 Perform read tests. The size of the buffer should be passed
51 as argument.
52 PCITEST_COPY:
53 Perform read tests. The size of the buffer should be passed
54 as argument.
55
56 .. [1] Documentation/PCI/endpoint/function/binding/pci-test.rst
57

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

문서 식별

1-5

이 문서는 GPL-2.0 SPDX license를 따르며 PCI Endpoint Test Function용 host-side driver를 설명합니다.

.. SPDX-License-Identifier: GPL-2.0

=====================================
Driver for PCI Endpoint Test Function
=====================================

연결 조건과 test

6-25

이 driver는 root complex가 reference [1]에 따라 구성된 `pci_epf_test` function driver를 실행하는 configurable PCI endpoint에 연결된 경우 host-side driver로 사용합니다.

`pci_endpoint_test` driver는 BAR에 programming된 주소 검증, legacy IRQ·MSI IRQ·MSI-X IRQ 발생, data read·write·copy test를 수행합니다.

Misc driver는 root complex에 연결된 각 `pci_epf_test` function마다 `/dev/pci-endpoint-test.<num>` device node를 만듭니다. 위 test는 ioctl을 사용해 실행합니다.


This driver should be used as a host side driver if the root complex is
connected to a configurable PCI endpoint running ``pci_epf_test`` function
driver configured according to [1]_.

The "pci_endpoint_test" driver can be used to perform the following tests.

The PCI driver for the test device performs the following tests:

        #) verifying addresses programmed in BAR
        #) raise legacy IRQ
        #) raise MSI IRQ
        #) raise MSI-X IRQ
        #) read data
        #) write data
        #) copy data

This misc driver creates /dev/pci-endpoint-test.<num> for every
``pci_epf_test`` function connected to the root complex and "ioctls"
should be used to perform the above tests.

Test ioctl

26-54
IOCTL동작과 argument
`PCITEST_BAR`Argument로 지정한 BAR의 주소 programming을 검사합니다.
`PCITEST_LEGACY_IRQ`Legacy IRQ를 검사합니다.
`PCITEST_MSI`Argument로 지정한 MSI 번호를 검사합니다.
`PCITEST_MSIX`Argument로 지정한 MSI-X 번호를 검사합니다.
`PCITEST_SET_IRQTYPE`IRQ type을 0=Legacy, 1=MSI, 2=MSI-X 중 하나로 변경합니다.
`PCITEST_GET_IRQTYPE`현재 driver IRQ type 설정을 가져옵니다.
`PCITEST_WRITE`Argument로 전달한 buffer 크기로 write test를 수행합니다.
`PCITEST_READ`Argument로 전달한 buffer 크기로 read test를 수행합니다.
`PCITEST_COPY`원문 설명상 argument로 전달한 buffer 크기로 read test를 수행합니다.

ioctl
-----

 PCITEST_BAR:
              Tests the BAR. The number of the BAR to be tested
              should be passed as argument.
 PCITEST_LEGACY_IRQ:
              Tests legacy IRQ
 PCITEST_MSI:
              Tests message signalled interrupts. The MSI number
              to be tested should be passed as argument.
 PCITEST_MSIX:
              Tests message signalled interrupts. The MSI-X number
              to be tested should be passed as argument.
 PCITEST_SET_IRQTYPE:
              Changes driver IRQ type configuration. The IRQ type
              should be passed as argument (0: Legacy, 1:MSI, 2:MSI-X).
 PCITEST_GET_IRQTYPE:
              Gets driver IRQ type configuration.
 PCITEST_WRITE:
              Perform write tests. The size of the buffer should be passed
              as argument.
 PCITEST_READ:
              Perform read tests. The size of the buffer should be passed
              as argument.
 PCITEST_COPY:
              Perform read tests. The size of the buffer should be passed
              as argument.

Function binding reference

55-56

Endpoint function 구성은 `Documentation/PCI/endpoint/function/binding/pci-test.rst`를 참조합니다.


.. [1] Documentation/PCI/endpoint/function/binding/pci-test.rst