blob: 45e9ce3075b2e1192483a2f175f8210321c2bfd7 [file] [log] [blame]
Philippe Bergheaud49fd6442014-12-12 11:28:53 +01001Note: Attributes that are shared between devices are stored in the directory
2pointed to by the symlink device/.
3Example: 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.
5
6
Ian Munsiea9282d02014-10-08 19:55:05 +11007Slave contexts (eg. /sys/class/cxl/afu0.0s):
8
Vaibhav Jaine36f6fe2015-05-22 10:56:05 +05309What: /sys/class/cxl/<afu>/afu_err_buf
10Date: September 2014
11Contact: linuxppc-dev@lists.ozlabs.org
12Description: 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.
18
19
Ian Munsiea9282d02014-10-08 19:55:05 +110020What: /sys/class/cxl/<afu>/irqs_max
21Date: September 2014
22Contact: linuxppc-dev@lists.ozlabs.org
23Description: 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
30What: /sys/class/cxl/<afu>/irqs_min
31Date: September 2014
32Contact: linuxppc-dev@lists.ozlabs.org
33Description: read only
34 Decimal value of the minimum number of interrupts that
35 userspace must request on a CXL_START_WORK ioctl. Userspace may
36 omit the num_interrupts field in the START_WORK IOCTL to get
37 this minimum automatically.
38
39What: /sys/class/cxl/<afu>/mmio_size
40Date: September 2014
41Contact: linuxppc-dev@lists.ozlabs.org
42Description: read only
43 Decimal value of the size of the MMIO space that may be mmaped
44 by userspace.
45
46What: /sys/class/cxl/<afu>/modes_supported
47Date: September 2014
48Contact: linuxppc-dev@lists.ozlabs.org
49Description: read only
50 List of the modes this AFU supports. One per line.
51 Valid entries are: "dedicated_process" and "afu_directed"
52
53What: /sys/class/cxl/<afu>/mode
54Date: September 2014
55Contact: linuxppc-dev@lists.ozlabs.org
56Description: read/write
57 The current mode the AFU is using. Will be one of the modes
58 given in modes_supported. Writing will change the mode
59 provided that no user contexts are attached.
60
61
62What: /sys/class/cxl/<afu>/prefault_mode
63Date: September 2014
64Contact: linuxppc-dev@lists.ozlabs.org
65Description: read/write
66 Set the mode for prefaulting in segments into the segment table
67 when performing the START_WORK ioctl. Possible values:
68 none: No prefaulting (default)
69 work_element_descriptor: Treat the work element
70 descriptor as an effective address and
71 prefault what it points to.
72 all: all segments process calling START_WORK maps.
73
74What: /sys/class/cxl/<afu>/reset
75Date: September 2014
76Contact: linuxppc-dev@lists.ozlabs.org
77Description: write only
78 Writing 1 here will reset the AFU provided there are not
79 contexts active on the AFU.
80
81What: /sys/class/cxl/<afu>/api_version
82Date: September 2014
83Contact: linuxppc-dev@lists.ozlabs.org
84Description: read only
85 Decimal value of the current version of the kernel/user API.
86
Philippe Bergheaud49fd6442014-12-12 11:28:53 +010087What: /sys/class/cxl/<afu>/api_version_compatible
Ian Munsiea9282d02014-10-08 19:55:05 +110088Date: September 2014
89Contact: linuxppc-dev@lists.ozlabs.org
90Description: read only
91 Decimal value of the the lowest version of the userspace API
92 this this kernel supports.
93
94
Ian Munsieb087e612015-02-04 19:09:01 +110095AFU configuration records (eg. /sys/class/cxl/afu0.0/cr0):
96
97An AFU may optionally export one or more PCIe like configuration records, known
98as AFU configuration records, which will show up here (if present).
99
100What: /sys/class/cxl/<afu>/cr<config num>/vendor
101Date: February 2015
102Contact: linuxppc-dev@lists.ozlabs.org
103Description: read only
104 Hexadecimal value of the vendor ID found in this AFU
105 configuration record.
106
107What: /sys/class/cxl/<afu>/cr<config num>/device
108Date: February 2015
109Contact: linuxppc-dev@lists.ozlabs.org
110Description: read only
111 Hexadecimal value of the device ID found in this AFU
112 configuration record.
113
Philippe Bergheaud52fd4752015-03-26 11:46:56 +0100114What: /sys/class/cxl/<afu>/cr<config num>/class
Ian Munsieb087e612015-02-04 19:09:01 +1100115Date: February 2015
116Contact: linuxppc-dev@lists.ozlabs.org
117Description: read only
118 Hexadecimal value of the class code found in this AFU
119 configuration record.
120
121What: /sys/class/cxl/<afu>/cr<config num>/config
122Date: February 2015
123Contact: linuxppc-dev@lists.ozlabs.org
124Description: read only
125 This binary file provides raw access to the AFU configuration
126 record. The format is expected to match the either the standard
127 or extended configuration space defined by the PCIe
128 specification.
129
130
131
Ian Munsiea9282d02014-10-08 19:55:05 +1100132Master contexts (eg. /sys/class/cxl/afu0.0m)
133
134What: /sys/class/cxl/<afu>m/mmio_size
135Date: September 2014
136Contact: linuxppc-dev@lists.ozlabs.org
137Description: read only
138 Decimal value of the size of the MMIO space that may be mmaped
139 by userspace. This includes all slave contexts space also.
140
141What: /sys/class/cxl/<afu>m/pp_mmio_len
142Date: September 2014
143Contact: linuxppc-dev@lists.ozlabs.org
144Description: read only
145 Decimal value of the Per Process MMIO space length.
146
147What: /sys/class/cxl/<afu>m/pp_mmio_off
148Date: September 2014
149Contact: linuxppc-dev@lists.ozlabs.org
150Description: read only
151 Decimal value of the Per Process MMIO space offset.
152
153
154Card info (eg. /sys/class/cxl/card0)
155
156What: /sys/class/cxl/<card>/caia_version
157Date: September 2014
158Contact: linuxppc-dev@lists.ozlabs.org
159Description: read only
160 Identifies the CAIA Version the card implements.
161
Philippe Bergheaud49fd6442014-12-12 11:28:53 +0100162What: /sys/class/cxl/<card>/psl_revision
Ian Munsiea9282d02014-10-08 19:55:05 +1100163Date: September 2014
164Contact: linuxppc-dev@lists.ozlabs.org
165Description: read only
166 Identifies the revision level of the PSL.
167
168What: /sys/class/cxl/<card>/base_image
169Date: September 2014
170Contact: linuxppc-dev@lists.ozlabs.org
171Description: read only
172 Identifies the revision level of the base image for devices
173 that support loadable PSLs. For FPGAs this field identifies
174 the image contained in the on-adapter flash which is loaded
175 during the initial program load.
176
177What: /sys/class/cxl/<card>/image_loaded
178Date: September 2014
179Contact: linuxppc-dev@lists.ozlabs.org
180Description: read only
181 Will return "user" or "factory" depending on the image loaded
182 onto the card.
Ryan Grimm95bc11b2015-01-19 11:52:49 -0600183
184What: /sys/class/cxl/<card>/load_image_on_perst
185Date: December 2014
186Contact: linuxppc-dev@lists.ozlabs.org
187Description: read/write
188 Valid entries are "none", "user", and "factory".
189 "none" means PERST will not cause image to be loaded to the
190 card. A power cycle is required to load the image.
191 "none" could be useful for debugging because the trace arrays
192 are preserved.
193 "user" and "factory" means PERST will cause either the user or
194 user or factory image to be loaded.
195 Default is to reload on PERST whichever image the card has
196 loaded.
Ryan Grimm62fa19d2015-01-19 11:52:51 -0600197
198What: /sys/class/cxl/<card>/reset
199Date: October 2014
200Contact: linuxppc-dev@lists.ozlabs.org
201Description: write only
202 Writing 1 will issue a PERST to card which may cause the card
203 to reload the FPGA depending on load_image_on_perst.