요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=====================================
Driver for PCI Endpoint Test Function
=====================================
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.
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.
.. [1] Documentation/PCI/endpoint/function/binding/pci-test.rst
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-56Endpoint function 구성은 `Documentation/PCI/endpoint/function/binding/pci-test.rst`를 참조합니다.
.. [1] Documentation/PCI/endpoint/function/binding/pci-test.rst
요약·해설
pci-endpoint-test.rst:1-56Root complex 쪽 misc driver는 endpoint function마다 device node를 만들며 하나의 ioctl surface에서 BAR, 세 IRQ 방식, read·write·copy data path를 점검합니다.
Test를 resource·interrupt·data transfer 세 그룹으로 나눕니다.