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