← Documents Documentation/ABI/testing/sysfs-bus-rapidio GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

RapidIO device, switch, and bus attributes

RapidIO 장치 디렉터리 이름, 공통 identifier·configuration register, switch route·link·error log와 userspace bus scan ABI를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-bus-rapidio
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Network, device type, and destination ID

sysfs-bus-rapidio:1-31

nn:d:iiii 이름은 network ID, endpoint 또는 switch 유형, destination ID 또는 switch ID를 결합하며 scanning endpoint 자신은 목록에 만들지 않습니다.

Identifiers and configuration registers

sysfs-bus-rapidio:32-120

공통 속성은 device·vendor·assembly 식별자와 revision, enumeration destID, 이전 switch, modalias 및 maintenance transaction 기반 config 접근을 제공합니다.

Routes, ports, and IDT_GEN2 error log

sysfs-bus-rapidio:121-182

Switch 속성은 유효 route, hop count, port별 이웃, 장치별 callback으로 만든 속성과 IDT_GEN2 error log를 노출합니다.

Trigger enumeration from userspace

sysfs-bus-rapidio:183-201

scan에는 destination ID가 아닌 mport_ID를 쓰며 -1 또는 RIO_MPORT_ANY는 모든 mport를 대상으로 합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>
2 Description:
3 For each RapidIO device, the RapidIO subsystem creates files in
4 an individual subdirectory with the following name format of
5 device_name "nn:d:iiii", where:
6
7 ==== ========================================================
8 nn two-digit hexadecimal ID of RapidIO network where the
9 device resides
10 d device type: 'e' - for endpoint or 's' - for switch
11 iiii four-digit device destID for endpoints, or switchID for
12 switches
13 ==== ========================================================
14
15 For example, below is a list of device directories that
16 represents a typical RapidIO network with one switch, one host,
17 and two agent endpoints, as it is seen by the enumerating host
18 (with destID = 1)::
19
20 /sys/bus/rapidio/devices/00:e:0000
21 /sys/bus/rapidio/devices/00:e:0002
22 /sys/bus/rapidio/devices/00:s:0001
23
24 NOTE:
25 An enumerating or discovering endpoint does not create a
26 sysfs entry for itself, this is why an endpoint with destID=1
27 is not shown in the list.
28
29 Attributes Common for All RapidIO Devices
30 -----------------------------------------
31
32 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/did
33 Date: Nov, 2005
34 KernelVersion: v2.6.15
35 Contact: Matt Porter <[email protected]>,
36 Alexandre Bounine <[email protected]>
37 Description:
38 (RO) returns the device identifier
39
40 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/vid
41 Date: Nov, 2005
42 KernelVersion: v2.6.15
43 Contact: Matt Porter <[email protected]>,
44 Alexandre Bounine <[email protected]>
45 Description:
46 (RO) returns the device vendor identifier
47
48 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/device_rev
49 Date: Nov, 2005
50 KernelVersion: v2.6.15
51 Contact: Matt Porter <[email protected]>,
52 Alexandre Bounine <[email protected]>
53 Description:
54 (RO) returns the device revision level
55
56 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/asm_did
57 Date: Nov, 2005
58 KernelVersion: v2.6.15
59 Contact: Matt Porter <[email protected]>,
60 Alexandre Bounine <[email protected]>
61 Description:
62 (RO) returns identifier for the assembly containing the device
63
64 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/asm_rev
65 Date: Nov, 2005
66 KernelVersion: v2.6.15
67 Contact: Matt Porter <[email protected]>,
68 Alexandre Bounine <[email protected]>
69 Description:
70 (RO) returns revision level of the assembly containing the
71 device
72
73 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/asm_vid
74 Date: Nov, 2005
75 KernelVersion: v2.6.15
76 Contact: Matt Porter <[email protected]>,
77 Alexandre Bounine <[email protected]>
78 Description:
79 (RO) returns vendor identifier of the assembly containing the
80 device
81
82 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/destid
83 Date: Mar, 2011
84 KernelVersion: v2.6.3
85 Contact: Matt Porter <[email protected]>,
86 Alexandre Bounine <[email protected]>
87 Description:
88 (RO) returns device destination ID assigned by the enumeration
89 routine
90
91 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/lprev
92 Date: Mar, 2011
93 KernelVersion: v2.6.39
94 Contact: Matt Porter <[email protected]>,
95 Alexandre Bounine <[email protected]>
96 Description:
97 (RO) returns name of previous device (switch) on the path to the
98 device that that owns this attribute
99
100 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/modalias
101 Date: Jul, 2013
102 KernelVersion: v3.11
103 Contact: Matt Porter <[email protected]>,
104 Alexandre Bounine <[email protected]>
105 Description:
106 (RO) returns the device modalias
107
108 What: /sys/bus/rapidio/devices/<nn>:<d>:<iiii>/config
109 Date: Nov, 2005
110 KernelVersion: v2.6.15
111 Contact: Matt Porter <[email protected]>,
112 Alexandre Bounine <[email protected]>
113 Description:
114 (RW) Binary attribute to read from and write to the device
115 configuration registers using the RapidIO maintenance
116 transactions. This attribute is similar in behaviour to the
117 "config" attribute of PCI devices and provides an access to the
118 RapidIO device registers using standard file read and write
119 operations.
120
121 RapidIO Switch Device Attributes
122 --------------------------------
123
124 RapidIO switches have additional attributes in sysfs. RapidIO subsystem supports
125 common and device-specific sysfs attributes for switches. Because switches are
126 integrated into the RapidIO subsystem, it offers a method to create
127 device-specific sysfs attributes by specifying a callback function that may be
128 set by the switch initialization routine during enumeration or discovery
129 process.
130
131 What: /sys/bus/rapidio/devices/<nn>:<s>:<iiii>/routes
132 Date: Nov, 2005
133 KernelVersion: v2.6.15
134 Contact: Matt Porter <[email protected]>,
135 Alexandre Bounine <[email protected]>
136 Description:
137 (RO) reports switch routing information in "destID port" format.
138 This attribute reports only valid routing table entries, one
139 line for each entry.
140
141 What: /sys/bus/rapidio/devices/<nn>:<s>:<iiii>/destid
142 Date: Mar, 2011
143 KernelVersion: v2.6.3
144 Contact: Matt Porter <[email protected]>,
145 Alexandre Bounine <[email protected]>
146 Description:
147 (RO) device destination ID of the associated device that defines
148 a route to the switch
149
150 What: /sys/bus/rapidio/devices/<nn>:<s>:<iiii>/hopcount
151 Date: Mar, 2011
152 KernelVersion: v2.6.39
153 Contact: Matt Porter <[email protected]>,
154 Alexandre Bounine <[email protected]>
155 Description:
156 (RO) number of hops on the path to the switch
157
158 What: /sys/bus/rapidio/devices/<nn>:<s>:<iiii>/lnext
159 Date: Mar, 2011
160 KernelVersion: v2.6.39
161 Contact: Matt Porter <[email protected]>,
162 Alexandre Bounine <[email protected]>
163 Description:
164 (RO) returns names of devices linked to the switch except one of
165 a device linked to the ingress port (reported as "lprev"). This
166 is an array names with number of lines equal to number of ports
167 in switch. If a switch port has no attached device, returns
168 "null" instead of a device name.
169
170 Device-specific Switch Attributes
171 ---------------------------------
172
173 IDT_GEN2-
174
175 What: /sys/bus/rapidio/devices/<nn>:<s>:<iiii>/errlog
176 Date: Oct, 2010
177 KernelVersion: v2.6.37
178 Contact: Matt Porter <[email protected]>,
179 Alexandre Bounine <[email protected]>
180 Description:
181 (RO) reads contents of device error log until it is empty.
182
183 RapidIO Bus Attributes
184 ----------------------
185
186 What: /sys/bus/rapidio/scan
187 Date: May, 2013
188 KernelVersion: v3.11
189 Contact: Matt Porter <[email protected]>,
190 Alexandre Bounine <[email protected]>
191 Description:
192 (WO) Allows to trigger enumeration discovery process from user
193 space. To initiate an enumeration or discovery process on
194 specific mport device, a user needs to write mport_ID (not
195 RapidIO destination ID) into this file. The mport_ID is a
196 sequential number (0 ... RIO_MAX_MPORTS) assigned to the mport
197 device. For example, for a machine with a single RapidIO
198 controller, mport_ID for that controller always will be 0. To
199 initiate RapidIO enumeration/discovery on all available mports a
200 user must write '-1' (or RIO_MPORT_ANY) into this attribute
201 file.
202

3. 한국어 전문 번역

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

RapidIO 장치 디렉터리 이름

1-31
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>
DescriptionRapidIO subsystem은 각 RapidIO 장치에 대해 device_name이 "nn:d:iiii" 형식인 개별 하위 디렉터리와 그 안의 file을 생성합니다.
RapidIO device_name 구성
필드의미
nn장치가 속한 RapidIO network의 두 자리 16진수 ID
d장치 유형: endpoint는 'e', switch는 's'
iiiiEndpoint의 네 자리 device destID 또는 switch의 네 자리 switchID

장치 디렉터리 이름의 network ID, 장치 유형, endpoint destination ID 또는 switch ID 필드를 나타냅니다.

다음은 destID가 1인 enumerating host에서 보이는, switch 하나·host 하나·agent endpoint 둘로 구성된 일반적인 RapidIO network의 장치 디렉터리 예입니다.

/sys/bus/rapidio/devices/00:e:0000
/sys/bus/rapidio/devices/00:e:0002
/sys/bus/rapidio/devices/00:s:0001

Enumeration 또는 discovery를 수행하는 endpoint는 자기 자신의 sysfs 항목을 만들지 않습니다. 따라서 destID=1인 endpoint는 위 목록에 나타나지 않습니다.

RapidIO device identifier

32-39
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>/did
Date2005년 11월
KernelVersionv2.6.15
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). Device identifier를 반환합니다.

RapidIO device vendor identifier

40-47
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>/vid
Date2005년 11월
KernelVersionv2.6.15
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). Device vendor identifier를 반환합니다.

RapidIO device revision

48-55
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>/device_rev
Date2005년 11월
KernelVersionv2.6.15
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). Device revision level을 반환합니다.

RapidIO assembly identifier

56-63
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>/asm_did
Date2005년 11월
KernelVersionv2.6.15
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). 장치를 포함하는 assembly의 identifier를 반환합니다.

RapidIO assembly revision

64-72
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>/asm_rev
Date2005년 11월
KernelVersionv2.6.15
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). 장치를 포함하는 assembly의 revision level을 반환합니다.

RapidIO assembly vendor identifier

73-81
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>/asm_vid
Date2005년 11월
KernelVersionv2.6.15
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). 장치를 포함하는 assembly의 vendor identifier를 반환합니다.

Enumeration이 할당한 destination ID

82-90
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>/destid
Date2011년 3월
KernelVersionv2.6.3
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). Enumeration routine이 장치에 할당한 destination ID를 반환합니다.

RapidIO device modalias

100-107
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>/modalias
Date2013년 7월
KernelVersionv3.11
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). Device modalias를 반환합니다.

RapidIO configuration register 접근

108-120
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<d>:<iiii>/config
Date2005년 11월
KernelVersionv2.6.15
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기·쓰기(RW) binary 속성입니다. RapidIO maintenance transaction을 사용해 device configuration register를 읽고 씁니다. 동작은 PCI 장치의 "config" 속성과 비슷하며, 표준 file read·write operation으로 RapidIO device register에 접근할 수 있게 합니다.

RapidIO switch routing table

121-140

RapidIO switch는 sysfs에 추가 속성을 가집니다. RapidIO subsystem은 switch의 공통 속성과 장치별 속성을 모두 지원합니다. Switch가 subsystem에 통합되어 있으므로 enumeration 또는 discovery 중 switch 초기화 routine이 설정할 수 있는 callback function을 지정해 장치별 sysfs 속성을 만들 수 있습니다.

항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<s>:<iiii>/routes
Date2005년 11월
KernelVersionv2.6.15
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). Switch routing 정보를 "destID port" 형식으로 보고합니다. 유효한 routing table 항목만 각 항목당 한 줄로 표시합니다.

Switch route를 정의하는 destination ID

141-149
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<s>:<iiii>/destid
Date2011년 3월
KernelVersionv2.6.3
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). Switch로 향하는 route를 정의하는 연관 장치의 destination ID입니다.

Switch까지의 hop 수

150-157
항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<s>:<iiii>/hopcount
Date2011년 3월
KernelVersionv2.6.39
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). Switch로 가는 경로의 hop 수를 반환합니다.

IDT_GEN2 switch error log

170-182

다음은 IDT_GEN2 switch의 장치별 속성입니다.

항목한국어 전문 번역
What/sys/bus/rapidio/devices/<nn>:<s>:<iiii>/errlog
Date2010년 10월
KernelVersionv2.6.37
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description읽기 전용(RO). Device error log가 빌 때까지 그 내용을 읽습니다.

Userspace에서 RapidIO enumeration 시작

183-201
항목한국어 전문 번역
What/sys/bus/rapidio/scan
Date2013년 5월
KernelVersionv3.11
ContactMatt Porter <[email protected]>, Alexandre Bounine <[email protected]>
Description쓰기 전용(WO). Userspace에서 enumeration 또는 discovery 절차를 시작합니다. 특정 mport 장치에서 시작하려면 RapidIO destination ID가 아니라 mport_ID를 이 file에 써야 합니다. mport_ID는 mport 장치에 순차적으로 할당되는 0 ... RIO_MAX_MPORTS 번호입니다. RapidIO controller가 하나인 system에서 그 controller의 mport_ID는 항상 0입니다. 사용 가능한 모든 mport에서 RapidIO enumeration 또는 discovery를 시작하려면 -1 또는 RIO_MPORT_ANY를 씁니다.