1Note: 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
7Slave contexts (eg. /sys/class/cxl/afu0.0s):
8
9What:           /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
20What:           /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
87What:           /sys/class/cxl/<afu>/api_version_compatible
88Date:           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
95AFU 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
114What:           /sys/class/cxl/<afu>/cr<config num>/class
115Date:           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
132Master 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
162What:           /sys/class/cxl/<card>/psl_revision
163Date:           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.
183
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.
197
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.
204