1 Note: Attributes that are shared between devices are stored in the directory
2 pointed to by the symlink device/.
3 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>/irqs_max
11 Contact: linuxppc-dev@lists.ozlabs.org
12 Description: read/write
13 Decimal value of maximum number of interrupts that can be
14 requested by userspace. The default on probe is the maximum
15 that hardware can support (eg. 2037). Write values will limit
16 userspace applications to that many userspace interrupts. Must
19 What: /sys/class/cxl/<afu>/irqs_min
21 Contact: linuxppc-dev@lists.ozlabs.org
22 Description: read only
23 Decimal value of the minimum number of interrupts that
24 userspace must request on a CXL_START_WORK ioctl. Userspace may
25 omit the num_interrupts field in the START_WORK IOCTL to get
26 this minimum automatically.
28 What: /sys/class/cxl/<afu>/mmio_size
30 Contact: linuxppc-dev@lists.ozlabs.org
31 Description: read only
32 Decimal value of the size of the MMIO space that may be mmaped
35 What: /sys/class/cxl/<afu>/modes_supported
37 Contact: linuxppc-dev@lists.ozlabs.org
38 Description: read only
39 List of the modes this AFU supports. One per line.
40 Valid entries are: "dedicated_process" and "afu_directed"
42 What: /sys/class/cxl/<afu>/mode
44 Contact: linuxppc-dev@lists.ozlabs.org
45 Description: read/write
46 The current mode the AFU is using. Will be one of the modes
47 given in modes_supported. Writing will change the mode
48 provided that no user contexts are attached.
51 What: /sys/class/cxl/<afu>/prefault_mode
53 Contact: linuxppc-dev@lists.ozlabs.org
54 Description: read/write
55 Set the mode for prefaulting in segments into the segment table
56 when performing the START_WORK ioctl. Possible values:
57 none: No prefaulting (default)
58 work_element_descriptor: Treat the work element
59 descriptor as an effective address and
60 prefault what it points to.
61 all: all segments process calling START_WORK maps.
63 What: /sys/class/cxl/<afu>/reset
65 Contact: linuxppc-dev@lists.ozlabs.org
66 Description: write only
67 Writing 1 here will reset the AFU provided there are not
68 contexts active on the AFU.
70 What: /sys/class/cxl/<afu>/api_version
72 Contact: linuxppc-dev@lists.ozlabs.org
73 Description: read only
74 Decimal value of the current version of the kernel/user API.
76 What: /sys/class/cxl/<afu>/api_version_compatible
78 Contact: linuxppc-dev@lists.ozlabs.org
79 Description: read only
80 Decimal value of the the lowest version of the userspace API
81 this this kernel supports.
84 AFU configuration records (eg. /sys/class/cxl/afu0.0/cr0):
86 An AFU may optionally export one or more PCIe like configuration records, known
87 as AFU configuration records, which will show up here (if present).
89 What: /sys/class/cxl/<afu>/cr<config num>/vendor
91 Contact: linuxppc-dev@lists.ozlabs.org
92 Description: read only
93 Hexadecimal value of the vendor ID found in this AFU
96 What: /sys/class/cxl/<afu>/cr<config num>/device
98 Contact: linuxppc-dev@lists.ozlabs.org
99 Description: read only
100 Hexadecimal value of the device ID found in this AFU
101 configuration record.
103 What: /sys/class/cxl/<afu>/cr<config num>/class
105 Contact: linuxppc-dev@lists.ozlabs.org
106 Description: read only
107 Hexadecimal value of the class code found in this AFU
108 configuration record.
110 What: /sys/class/cxl/<afu>/cr<config num>/config
112 Contact: linuxppc-dev@lists.ozlabs.org
113 Description: read only
114 This binary file provides raw access to the AFU configuration
115 record. The format is expected to match the either the standard
116 or extended configuration space defined by the PCIe
121 Master contexts (eg. /sys/class/cxl/afu0.0m)
123 What: /sys/class/cxl/<afu>m/mmio_size
125 Contact: linuxppc-dev@lists.ozlabs.org
126 Description: read only
127 Decimal value of the size of the MMIO space that may be mmaped
128 by userspace. This includes all slave contexts space also.
130 What: /sys/class/cxl/<afu>m/pp_mmio_len
132 Contact: linuxppc-dev@lists.ozlabs.org
133 Description: read only
134 Decimal value of the Per Process MMIO space length.
136 What: /sys/class/cxl/<afu>m/pp_mmio_off
138 Contact: linuxppc-dev@lists.ozlabs.org
139 Description: read only
140 Decimal value of the Per Process MMIO space offset.
143 Card info (eg. /sys/class/cxl/card0)
145 What: /sys/class/cxl/<card>/caia_version
147 Contact: linuxppc-dev@lists.ozlabs.org
148 Description: read only
149 Identifies the CAIA Version the card implements.
151 What: /sys/class/cxl/<card>/psl_revision
153 Contact: linuxppc-dev@lists.ozlabs.org
154 Description: read only
155 Identifies the revision level of the PSL.
157 What: /sys/class/cxl/<card>/base_image
159 Contact: linuxppc-dev@lists.ozlabs.org
160 Description: read only
161 Identifies the revision level of the base image for devices
162 that support loadable PSLs. For FPGAs this field identifies
163 the image contained in the on-adapter flash which is loaded
164 during the initial program load.
166 What: /sys/class/cxl/<card>/image_loaded
168 Contact: linuxppc-dev@lists.ozlabs.org
169 Description: read only
170 Will return "user" or "factory" depending on the image loaded
173 What: /sys/class/cxl/<card>/load_image_on_perst
175 Contact: linuxppc-dev@lists.ozlabs.org
176 Description: read/write
177 Valid entries are "none", "user", and "factory".
178 "none" means PERST will not cause image to be loaded to the
179 card. A power cycle is required to load the image.
180 "none" could be useful for debugging because the trace arrays
182 "user" and "factory" means PERST will cause either the user or
183 user or factory image to be loaded.
184 Default is to reload on PERST whichever image the card has
187 What: /sys/class/cxl/<card>/reset
189 Contact: linuxppc-dev@lists.ozlabs.org
190 Description: write only
191 Writing 1 will issue a PERST to card which may cause the card
192 to reload the FPGA depending on load_image_on_perst.