1The cxl driver is no longer maintained, and will be removed from the kernel in
2the near future.
3
4Please note that attributes that are shared between devices are stored in
5the directory pointed to by the symlink device/.
6For example, the real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is
7/sys/class/cxl/afu0.0s/device/irqs_max, i.e. /sys/class/cxl/afu0.0/irqs_max.
8
9
10Slave contexts (eg. /sys/class/cxl/afu0.0s):
11
12What:           /sys/class/cxl/<afu>/afu_err_buf
13Date:           September 2014
14Contact:        [email protected]
15Description:    read only
16                AFU Error Buffer contents. The contents of this file are
17		application specific and depends on the AFU being used.
18		Applications interacting with the AFU can use this attribute
19		to know about the current error condition and take appropriate
20		action like logging the event etc.
21
22
23What:           /sys/class/cxl/<afu>/irqs_max
24Date:           September 2014
25Contact:        [email protected]
26Description:    read/write
27                Decimal value of maximum number of interrupts that can be
28                requested by userspace.  The default on probe is the maximum
29                that hardware can support (eg. 2037). Write values will limit
30                userspace applications to that many userspace interrupts. Must
31                be >= irqs_min.
32Users:		https://github.com/ibm-capi/libcxl
33
34What:           /sys/class/cxl/<afu>/irqs_min
35Date:           September 2014
36Contact:        [email protected]
37Description:    read only
38                Decimal value of the minimum number of interrupts that
39                userspace must request on a CXL_START_WORK ioctl. Userspace may
40                omit the num_interrupts field in the START_WORK IOCTL to get
41                this minimum automatically.
42Users:		https://github.com/ibm-capi/libcxl
43
44What:           /sys/class/cxl/<afu>/mmio_size
45Date:           September 2014
46Contact:        [email protected]
47Description:    read only
48                Decimal value of the size of the MMIO space that may be mmapped
49                by userspace.
50Users:		https://github.com/ibm-capi/libcxl
51
52What:           /sys/class/cxl/<afu>/modes_supported
53Date:           September 2014
54Contact:        [email protected]
55Description:    read only
56                List of the modes this AFU supports. One per line.
57                Valid entries are: "dedicated_process" and "afu_directed"
58Users:		https://github.com/ibm-capi/libcxl
59
60What:           /sys/class/cxl/<afu>/mode
61Date:           September 2014
62Contact:        [email protected]
63Description:    read/write
64                The current mode the AFU is using. Will be one of the modes
65                given in modes_supported. Writing will change the mode
66                provided that no user contexts are attached.
67Users:		https://github.com/ibm-capi/libcxl
68
69
70What:           /sys/class/cxl/<afu>/prefault_mode
71Date:           September 2014
72Contact:        [email protected]
73Description:    read/write
74                Set the mode for prefaulting in segments into the segment table
75                when performing the START_WORK ioctl. Only applicable when
76                running under hashed page table mmu.
77                Possible values:
78
79                =======================  ======================================
80		none			 No prefaulting (default)
81		work_element_descriptor  Treat the work element
82					 descriptor as an effective address and
83					 prefault what it points to.
84                all			 all segments process calling
85					 START_WORK maps.
86                =======================  ======================================
87
88Users:		https://github.com/ibm-capi/libcxl
89
90What:           /sys/class/cxl/<afu>/reset
91Date:           September 2014
92Contact:        [email protected]
93Description:    write only
94                Writing 1 here will reset the AFU provided there are not
95                contexts active on the AFU.
96Users:		https://github.com/ibm-capi/libcxl
97
98What:           /sys/class/cxl/<afu>/api_version
99Date:           September 2014
100Contact:        [email protected]
101Description:    read only
102                Decimal value of the current version of the kernel/user API.
103Users:		https://github.com/ibm-capi/libcxl
104
105What:           /sys/class/cxl/<afu>/api_version_compatible
106Date:           September 2014
107Contact:        [email protected]
108Description:    read only
109                Decimal value of the lowest version of the userspace API
110                this kernel supports.
111Users:		https://github.com/ibm-capi/libcxl
112
113
114AFU configuration records (eg. /sys/class/cxl/afu0.0/cr0):
115
116An AFU may optionally export one or more PCIe like configuration records, known
117as AFU configuration records, which will show up here (if present).
118
119What:           /sys/class/cxl/<afu>/cr<config num>/vendor
120Date:           February 2015
121Contact:        [email protected]
122Description:    read only
123		Hexadecimal value of the vendor ID found in this AFU
124		configuration record.
125Users:		https://github.com/ibm-capi/libcxl
126
127What:           /sys/class/cxl/<afu>/cr<config num>/device
128Date:           February 2015
129Contact:        [email protected]
130Description:    read only
131		Hexadecimal value of the device ID found in this AFU
132		configuration record.
133Users:		https://github.com/ibm-capi/libcxl
134
135What:           /sys/class/cxl/<afu>/cr<config num>/class
136Date:           February 2015
137Contact:        [email protected]
138Description:    read only
139		Hexadecimal value of the class code found in this AFU
140		configuration record.
141Users:		https://github.com/ibm-capi/libcxl
142
143What:           /sys/class/cxl/<afu>/cr<config num>/config
144Date:           February 2015
145Contact:        [email protected]
146Description:    read only
147		This binary file provides raw access to the AFU configuration
148		record. The format is expected to match the either the standard
149		or extended configuration space defined by the PCIe
150		specification.
151Users:		https://github.com/ibm-capi/libcxl
152
153
154
155Master contexts (eg. /sys/class/cxl/afu0.0m)
156
157What:           /sys/class/cxl/<afu>m/mmio_size
158Date:           September 2014
159Contact:        [email protected]
160Description:    read only
161                Decimal value of the size of the MMIO space that may be mmapped
162                by userspace. This includes all slave contexts space also.
163Users:		https://github.com/ibm-capi/libcxl
164
165What:           /sys/class/cxl/<afu>m/pp_mmio_len
166Date:           September 2014
167Contact:        [email protected]
168Description:    read only
169                Decimal value of the Per Process MMIO space length.
170Users:		https://github.com/ibm-capi/libcxl
171
172What:           /sys/class/cxl/<afu>m/pp_mmio_off
173Date:           September 2014
174Contact:        [email protected]
175Description:    read only
176                (not in a guest)
177                Decimal value of the Per Process MMIO space offset.
178Users:		https://github.com/ibm-capi/libcxl
179
180
181Card info (eg. /sys/class/cxl/card0)
182
183What:           /sys/class/cxl/<card>/caia_version
184Date:           September 2014
185Contact:        [email protected]
186Description:    read only
187                Identifies the CAIA Version the card implements.
188Users:		https://github.com/ibm-capi/libcxl
189
190What:           /sys/class/cxl/<card>/psl_revision
191Date:           September 2014
192Contact:        [email protected]
193Description:    read only
194                Identifies the revision level of the PSL.
195Users:		https://github.com/ibm-capi/libcxl
196
197What:           /sys/class/cxl/<card>/base_image
198Date:           September 2014
199Contact:        [email protected]
200Description:    read only
201                (not in a guest)
202                Identifies the revision level of the base image for devices
203                that support loadable PSLs. For FPGAs this field identifies
204                the image contained in the on-adapter flash which is loaded
205                during the initial program load.
206Users:		https://github.com/ibm-capi/libcxl
207
208What:           /sys/class/cxl/<card>/image_loaded
209Date:           September 2014
210Contact:        [email protected]
211Description:    read only
212                (not in a guest)
213                Will return "user" or "factory" depending on the image loaded
214                onto the card.
215Users:		https://github.com/ibm-capi/libcxl
216
217What:           /sys/class/cxl/<card>/load_image_on_perst
218Date:           December 2014
219Contact:        [email protected]
220Description:    read/write
221                (not in a guest)
222                Valid entries are "none", "user", and "factory".
223                "none" means PERST will not cause image to be loaded to the
224                card.  A power cycle is required to load the image.
225                "none" could be useful for debugging because the trace arrays
226                are preserved.
227
228                "user" and "factory" means PERST will cause either the user or
229                user or factory image to be loaded.
230                Default is to reload on PERST whichever image the card has
231                loaded.
232Users:		https://github.com/ibm-capi/libcxl
233
234What:           /sys/class/cxl/<card>/reset
235Date:           October 2014
236Contact:        [email protected]
237Description:    write only
238                Writing 1 will issue a PERST to card provided there are no
239                contexts active on any one of the card AFUs. This may cause
240                the card to reload the FPGA depending on load_image_on_perst.
241                Writing -1 will do a force PERST irrespective of any active
242                contexts on the card AFUs.
243Users:		https://github.com/ibm-capi/libcxl
244
245What:		/sys/class/cxl/<card>/perst_reloads_same_image
246Date:		July 2015
247Contact:	[email protected]
248Description:	read/write
249                (not in a guest)
250		Trust that when an image is reloaded via PERST, it will not
251		have changed.
252
253		==  =================================================
254		0   don't trust, the image may be different (default)
255		1   trust that the image will not change.
256		==  =================================================
257Users:		https://github.com/ibm-capi/libcxl
258
259What:           /sys/class/cxl/<card>/psl_timebase_synced
260Date:           March 2016
261Contact:        [email protected]
262Description:    read only
263                Returns 1 if the psl timebase register is synchronized
264                with the core timebase register, 0 otherwise.
265Users:          https://github.com/ibm-capi/libcxl
266
267What:           /sys/class/cxl/<card>/tunneled_ops_supported
268Date:           May 2018
269Contact:        [email protected]
270Description:    read only
271                Returns 1 if tunneled operations are supported in capi mode,
272                0 otherwise.
273Users:          https://github.com/ibm-capi/libcxl
274