요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Vendor와 device IDs
sysfs-bus-cdx:14-29vendor와 device는 hexadecimal 16-bit identifiers이며 manufacturer 범위 안에서 그 조합으로 device를 식별합니다.
Subsystem IDs, class와 revision
sysfs-bus-cdx:31-59Subsystem vendor/device는 card manufacturer별 16-bit IDs이고 class는 24-bit functionality, revision은 8-bit revision identifier입니다.
FPGA update 전 bus enable control
sysfs-bus-cdx:61-72enable은 FPGA device update 전에 CDX bus를 disable하고 이후 enable하며 read 시 current 0/1 state를 제공합니다.
Device reset과 hardware reconfiguration remove
sysfs-bus-cdx:74-99reset은 device 또는 bus devices를 reset하며 driver에 전후 두 번 알리고, remove는 hardware reconfiguration 중 driver access를 막기 위해 device를 bus에서 제거합니다.
Memory resource와 CDX modalias
sysfs-bus-cdx:101-121resource<N>은 userspace mmap이 가능한 memory-region binary file이고 modalias는 vendor·device·subsystem·class를 CDX ID string으로 결합합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/cdx/rescan
Date: March 2023
Contact: nipun.gupta@amd.com
Description:
Writing y/1/on to this file will cause rescan of the bus
and devices on the CDX bus. Any new devices are scanned and
added to the list of Linux devices and any devices removed are
also deleted from Linux.
For example::
# echo 1 > /sys/bus/cdx/rescan
What: /sys/bus/cdx/devices/.../vendor
Date: March 2023
Contact: nipun.gupta@amd.com
Description:
Vendor ID for this CDX device, in hexadecimal. Vendor ID is
16 bit identifier which is specific to the device manufacturer.
Combination of Vendor ID and Device ID identifies a device.
What: /sys/bus/cdx/devices/.../device
Date: March 2023
Contact: nipun.gupta@amd.com
Description:
Device ID for this CDX device, in hexadecimal. Device ID is
16 bit identifier to identify a device type within the range
of a device manufacturer.
Combination of Vendor ID and Device ID identifies a device.
What: /sys/bus/cdx/devices/.../subsystem_vendor
Date: July 2023
Contact: puneet.gupta@amd.com
Description:
Subsystem Vendor ID for this CDX device, in hexadecimal.
Subsystem Vendor ID is 16 bit identifier specific to the
card manufacturer.
What: /sys/bus/cdx/devices/.../subsystem_device
Date: July 2023
Contact: puneet.gupta@amd.com
Description:
Subsystem Device ID for this CDX device, in hexadecimal
Subsystem Device ID is 16 bit identifier specific to the
card manufacturer.
What: /sys/bus/cdx/devices/.../class
Date: July 2023
Contact: puneet.gupta@amd.com
Description:
This file contains the class of the CDX device, in hexadecimal.
Class is 24 bit identifier specifies the functionality of the device.
What: /sys/bus/cdx/devices/.../revision
Date: July 2023
Contact: puneet.gupta@amd.com
Description:
This file contains the revision field of the CDX device, in hexadecimal.
Revision is 8 bit revision identifier of the device.
What: /sys/bus/cdx/devices/.../enable
Date: October 2023
Contact: abhijit.gangurde@amd.com
Description:
CDX bus should be disabled before updating the devices in FPGA.
Writing n/0/off will attempt to disable the CDX bus and.
writing y/1/on will attempt to enable the CDX bus. Reading this file
gives the current state of the bus, 1 for enabled and 0 for disabled.
For example::
# echo 1 > /sys/bus/cdx/.../enable
What: /sys/bus/cdx/devices/.../reset
Date: March 2023
Contact: nipun.gupta@amd.com
Description:
Writing y/1/on to this file resets the CDX device or all devices
on the bus. On resetting the device, the corresponding driver is
notified twice, once before the device is being reset, and again
after the reset has been complete.
For example::
# echo 1 > /sys/bus/cdx/.../reset
What: /sys/bus/cdx/devices/.../remove
Date: March 2023
Contact: tarak.reddy@amd.com
Description:
Writing y/1/on to this file removes the corresponding
device from the CDX bus. If the device is to be reconfigured
reconfigured in the Hardware, the device can be removed, so
that the device driver does not access the device while it is
being reconfigured.
For example::
# echo 1 > /sys/bus/cdx/devices/.../remove
What: /sys/bus/cdx/devices/.../resource<N>
Date: July 2023
Contact: puneet.gupta@amd.com
Description:
The resource binary file contains the content of the memory
regions. These files can be m'maped from userspace.
What: /sys/bus/cdx/devices/.../modalias
Date: July 2023
Contact: nipun.gupta@amd.com
Description:
This attribute indicates the CDX ID of the device.
That is in the format:
cdx:vXXXXdXXXXsvXXXXsdXXXXcXXXXXX,
where:
- vXXXX contains the vendor ID;
- dXXXX contains the device ID;
- svXXXX contains the subsystem vendor ID;
- sdXXXX contains the subsystem device ID;
- cXXXXXX contains the device class.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
CDX bus와 device rescan
1-12| 항목 | 전문 번역 |
|---|---|
| What | /sys/bus/cdx/rescan |
| Date | 2023년 3월 |
| Contact | nipun.gupta@amd.com |
| Description | 이 file에 y, 1 또는 on을 쓰면 CDX bus와 그 bus의 device를 rescan합니다. 새 device를 scan하여 Linux device list에 추가하고, 제거된 device도 Linux에서 삭제합니다. |
원문 예시는 다음과 같습니다.
# echo 1 > /sys/bus/cdx/rescan
CDX vendor와 device identifiers
14-29| What | Date | Contact | 전문 번역 |
|---|---|---|---|
| /sys/bus/cdx/devices/.../vendor | 2023년 3월 | nipun.gupta@amd.com | 이 CDX device의 Vendor ID를 hexadecimal로 나타냅니다. Vendor ID는 device manufacturer별 16-bit identifier입니다. Vendor ID와 Device ID의 조합이 device를 식별합니다. |
| /sys/bus/cdx/devices/.../device | 2023년 3월 | nipun.gupta@amd.com | 이 CDX device의 Device ID를 hexadecimal로 나타냅니다. Device ID는 device manufacturer 범위 안에서 device type을 식별하는 16-bit identifier입니다. Vendor ID와 Device ID의 조합이 device를 식별합니다. |
CDX subsystem, class와 revision fields
31-59| What | Date | Contact | 전문 번역 |
|---|---|---|---|
| /sys/bus/cdx/devices/.../subsystem_vendor | 2023년 7월 | puneet.gupta@amd.com | 이 CDX device의 Subsystem Vendor ID를 hexadecimal로 나타냅니다. Subsystem Vendor ID는 card manufacturer별 16-bit identifier입니다. |
| /sys/bus/cdx/devices/.../subsystem_device | 2023년 7월 | puneet.gupta@amd.com | 이 CDX device의 Subsystem Device ID를 hexadecimal로 나타냅니다. Subsystem Device ID는 card manufacturer별 16-bit identifier입니다. |
| /sys/bus/cdx/devices/.../class | 2023년 7월 | puneet.gupta@amd.com | 이 file은 CDX device의 class를 hexadecimal로 담습니다. Class는 device functionality를 지정하는 24-bit identifier입니다. |
| /sys/bus/cdx/devices/.../revision | 2023년 7월 | puneet.gupta@amd.com | 이 file은 CDX device의 revision field를 hexadecimal로 담습니다. Revision은 device의 8-bit revision identifier입니다. |
| Field | Width | Scope |
|---|---|---|
| vendor | 16-bit | Device manufacturer |
| device | 16-bit | Manufacturer 내 device type |
| subsystem_vendor | 16-bit | Card manufacturer |
| subsystem_device | 16-bit | Card manufacturer별 subsystem |
| class | 24-bit | Device functionality |
| revision | 8-bit | Device revision |
FPGA update를 위한 CDX bus enable control
61-72| 항목 | 전문 번역 |
|---|---|
| What | /sys/bus/cdx/devices/.../enable |
| Date | 2023년 10월 |
| Contact | abhijit.gangurde@amd.com |
| Description | FPGA의 device를 update하기 전에 CDX bus를 disable해야 합니다. n, 0 또는 off를 쓰면 CDX bus disable을 시도하고 y, 1 또는 on을 쓰면 CDX bus enable을 시도합니다. 이 file을 읽으면 bus의 current state를 반환하며 enabled는 1, disabled는 0입니다. |
# echo 1 > /sys/bus/cdx/.../enable
FPGA device configuration을 바꾸는 동안 CDX bus와 drivers의 접근을 제어하는 운영 순서다.
CDX reset notification과 device remove
74-99| What | Date | Contact | 전문 번역 |
|---|---|---|---|
| /sys/bus/cdx/devices/.../reset | 2023년 3월 | nipun.gupta@amd.com | 이 file에 y, 1 또는 on을 쓰면 CDX device 또는 bus의 모든 device를 reset합니다. Device를 reset할 때 corresponding driver에 두 번 알립니다. Device reset 전에 한 번, reset 완료 뒤 다시 한 번 알립니다. |
| /sys/bus/cdx/devices/.../remove | 2023년 3월 | tarak.reddy@amd.com | 이 file에 y, 1 또는 on을 쓰면 corresponding device를 CDX bus에서 제거합니다. Hardware에서 device를 reconfigure해야 한다면 reconfiguration 중 device driver가 해당 device에 access하지 않도록 device를 제거할 수 있습니다. |
# echo 1 > /sys/bus/cdx/.../reset
# echo 1 > /sys/bus/cdx/devices/.../remove
Reset은 driver notification을 전후로 감싸고, remove는 hardware reconfiguration 동안 driver access를 차단한다.
CDX memory resources와 modalias format
101-121| What | Date | Contact | 전문 번역 |
|---|---|---|---|
| /sys/bus/cdx/devices/.../resource<N> | 2023년 7월 | puneet.gupta@amd.com | Resource binary file은 memory region의 content를 담습니다. Userspace에서 이 file을 mmap할 수 있습니다. |
| /sys/bus/cdx/devices/.../modalias | 2023년 7월 | nipun.gupta@amd.com | 이 attribute는 device의 CDX ID를 나타냅니다. |
cdx:vXXXXdXXXXsvXXXXsdXXXXcXXXXXX,
| Component | 전문 번역 |
|---|---|
| vXXXX | Vendor ID를 담습니다. |
| dXXXX | Device ID를 담습니다. |
| svXXXX | Subsystem Vendor ID를 담습니다. |
| sdXXXX | Subsystem Device ID를 담습니다. |
| cXXXXXX | Device class를 담습니다. |
CDX bus rescan
sysfs-bus-cdx:1-12rescan에 y·1·on을 쓰면 CDX bus와 devices를 다시 scan하여 새 device를 Linux에 추가하고 제거된 device를 삭제합니다.