Philippe Bergheaud | 49fd644 | 2014-12-12 11:28:53 +0100 | [diff] [blame] | 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. |
| 5 | |
| 6 | |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 7 | Slave contexts (eg. /sys/class/cxl/afu0.0s): |
| 8 | |
Vaibhav Jain | e36f6fe | 2015-05-22 10:56:05 +0530 | [diff] [blame] | 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. |
| 18 | |
| 19 | |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 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. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 29 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 30 | |
| 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. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 39 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 40 | |
| 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. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 47 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 48 | |
| 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" |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 55 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 56 | |
| 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. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 64 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 65 | |
| 66 | |
| 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. Possible values: |
| 73 | none: No prefaulting (default) |
| 74 | work_element_descriptor: Treat the work element |
| 75 | descriptor as an effective address and |
| 76 | prefault what it points to. |
| 77 | all: all segments process calling START_WORK maps. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 78 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 79 | |
| 80 | What: /sys/class/cxl/<afu>/reset |
| 81 | Date: September 2014 |
| 82 | Contact: linuxppc-dev@lists.ozlabs.org |
| 83 | Description: write only |
| 84 | Writing 1 here will reset the AFU provided there are not |
| 85 | contexts active on the AFU. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 86 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 87 | |
| 88 | What: /sys/class/cxl/<afu>/api_version |
| 89 | Date: September 2014 |
| 90 | Contact: linuxppc-dev@lists.ozlabs.org |
| 91 | Description: read only |
| 92 | Decimal value of the current version of the kernel/user API. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 93 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 94 | |
Philippe Bergheaud | 49fd644 | 2014-12-12 11:28:53 +0100 | [diff] [blame] | 95 | What: /sys/class/cxl/<afu>/api_version_compatible |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 96 | Date: September 2014 |
| 97 | Contact: linuxppc-dev@lists.ozlabs.org |
| 98 | Description: read only |
| 99 | Decimal value of the the lowest version of the userspace API |
| 100 | this this kernel supports. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 101 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 102 | |
| 103 | |
Ian Munsie | b087e61 | 2015-02-04 19:09:01 +1100 | [diff] [blame] | 104 | AFU configuration records (eg. /sys/class/cxl/afu0.0/cr0): |
| 105 | |
| 106 | An AFU may optionally export one or more PCIe like configuration records, known |
| 107 | as AFU configuration records, which will show up here (if present). |
| 108 | |
| 109 | What: /sys/class/cxl/<afu>/cr<config num>/vendor |
| 110 | Date: February 2015 |
| 111 | Contact: linuxppc-dev@lists.ozlabs.org |
| 112 | Description: read only |
| 113 | Hexadecimal value of the vendor ID found in this AFU |
| 114 | configuration record. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 115 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | b087e61 | 2015-02-04 19:09:01 +1100 | [diff] [blame] | 116 | |
| 117 | What: /sys/class/cxl/<afu>/cr<config num>/device |
| 118 | Date: February 2015 |
| 119 | Contact: linuxppc-dev@lists.ozlabs.org |
| 120 | Description: read only |
| 121 | Hexadecimal value of the device ID found in this AFU |
| 122 | configuration record. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 123 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | b087e61 | 2015-02-04 19:09:01 +1100 | [diff] [blame] | 124 | |
Philippe Bergheaud | 52fd475 | 2015-03-26 11:46:56 +0100 | [diff] [blame] | 125 | What: /sys/class/cxl/<afu>/cr<config num>/class |
Ian Munsie | b087e61 | 2015-02-04 19:09:01 +1100 | [diff] [blame] | 126 | Date: February 2015 |
| 127 | Contact: linuxppc-dev@lists.ozlabs.org |
| 128 | Description: read only |
| 129 | Hexadecimal value of the class code found in this AFU |
| 130 | configuration record. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 131 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | b087e61 | 2015-02-04 19:09:01 +1100 | [diff] [blame] | 132 | |
| 133 | What: /sys/class/cxl/<afu>/cr<config num>/config |
| 134 | Date: February 2015 |
| 135 | Contact: linuxppc-dev@lists.ozlabs.org |
| 136 | Description: read only |
| 137 | This binary file provides raw access to the AFU configuration |
| 138 | record. The format is expected to match the either the standard |
| 139 | or extended configuration space defined by the PCIe |
| 140 | specification. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 141 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | b087e61 | 2015-02-04 19:09:01 +1100 | [diff] [blame] | 142 | |
| 143 | |
| 144 | |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 145 | Master contexts (eg. /sys/class/cxl/afu0.0m) |
| 146 | |
| 147 | What: /sys/class/cxl/<afu>m/mmio_size |
| 148 | Date: September 2014 |
| 149 | Contact: linuxppc-dev@lists.ozlabs.org |
| 150 | Description: read only |
| 151 | Decimal value of the size of the MMIO space that may be mmaped |
| 152 | by userspace. This includes all slave contexts space also. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 153 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 154 | |
| 155 | What: /sys/class/cxl/<afu>m/pp_mmio_len |
| 156 | Date: September 2014 |
| 157 | Contact: linuxppc-dev@lists.ozlabs.org |
| 158 | Description: read only |
| 159 | Decimal value of the Per Process MMIO space length. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 160 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 161 | |
Christophe Lombard | 4752876 | 2016-03-04 12:26:37 +0100 | [diff] [blame] | 162 | What: /sys/class/cxl/<afu>m/pp_mmio_off (not in a guest) |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 163 | Date: September 2014 |
| 164 | Contact: linuxppc-dev@lists.ozlabs.org |
| 165 | Description: read only |
| 166 | Decimal value of the Per Process MMIO space offset. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 167 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 168 | |
| 169 | |
| 170 | Card info (eg. /sys/class/cxl/card0) |
| 171 | |
| 172 | What: /sys/class/cxl/<card>/caia_version |
| 173 | Date: September 2014 |
| 174 | Contact: linuxppc-dev@lists.ozlabs.org |
| 175 | Description: read only |
| 176 | Identifies the CAIA Version the card implements. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 177 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 178 | |
Philippe Bergheaud | 49fd644 | 2014-12-12 11:28:53 +0100 | [diff] [blame] | 179 | What: /sys/class/cxl/<card>/psl_revision |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 180 | Date: September 2014 |
| 181 | Contact: linuxppc-dev@lists.ozlabs.org |
| 182 | Description: read only |
| 183 | Identifies the revision level of the PSL. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 184 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 185 | |
Christophe Lombard | 4752876 | 2016-03-04 12:26:37 +0100 | [diff] [blame] | 186 | What: /sys/class/cxl/<card>/base_image (not in a guest) |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 187 | Date: September 2014 |
| 188 | Contact: linuxppc-dev@lists.ozlabs.org |
| 189 | Description: read only |
| 190 | Identifies the revision level of the base image for devices |
| 191 | that support loadable PSLs. For FPGAs this field identifies |
| 192 | the image contained in the on-adapter flash which is loaded |
| 193 | during the initial program load. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 194 | Users: https://github.com/ibm-capi/libcxl |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 195 | |
Christophe Lombard | 4752876 | 2016-03-04 12:26:37 +0100 | [diff] [blame] | 196 | What: /sys/class/cxl/<card>/image_loaded (not in a guest) |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 197 | Date: September 2014 |
| 198 | Contact: linuxppc-dev@lists.ozlabs.org |
| 199 | Description: read only |
| 200 | Will return "user" or "factory" depending on the image loaded |
| 201 | onto the card. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 202 | Users: https://github.com/ibm-capi/libcxl |
Ryan Grimm | 95bc11b | 2015-01-19 11:52:49 -0600 | [diff] [blame] | 203 | |
Christophe Lombard | 4752876 | 2016-03-04 12:26:37 +0100 | [diff] [blame] | 204 | What: /sys/class/cxl/<card>/load_image_on_perst (not in a guest) |
Ryan Grimm | 95bc11b | 2015-01-19 11:52:49 -0600 | [diff] [blame] | 205 | Date: December 2014 |
| 206 | Contact: linuxppc-dev@lists.ozlabs.org |
| 207 | Description: read/write |
| 208 | Valid entries are "none", "user", and "factory". |
| 209 | "none" means PERST will not cause image to be loaded to the |
| 210 | card. A power cycle is required to load the image. |
| 211 | "none" could be useful for debugging because the trace arrays |
| 212 | are preserved. |
| 213 | "user" and "factory" means PERST will cause either the user or |
| 214 | user or factory image to be loaded. |
| 215 | Default is to reload on PERST whichever image the card has |
| 216 | loaded. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 217 | Users: https://github.com/ibm-capi/libcxl |
Ryan Grimm | 62fa19d | 2015-01-19 11:52:51 -0600 | [diff] [blame] | 218 | |
| 219 | What: /sys/class/cxl/<card>/reset |
| 220 | Date: October 2014 |
| 221 | Contact: linuxppc-dev@lists.ozlabs.org |
| 222 | Description: write only |
Vaibhav Jain | 70b565b | 2016-10-14 15:08:36 +0530 | [diff] [blame] | 223 | Writing 1 will issue a PERST to card provided there are no |
| 224 | contexts active on any one of the card AFUs. This may cause |
| 225 | the card to reload the FPGA depending on load_image_on_perst. |
| 226 | Writing -1 will do a force PERST irrespective of any active |
| 227 | contexts on the card AFUs. |
Michael Neuling | aee85fb | 2015-05-27 16:07:01 +1000 | [diff] [blame] | 228 | Users: https://github.com/ibm-capi/libcxl |
Daniel Axtens | 13e68d8 | 2015-08-14 17:41:25 +1000 | [diff] [blame] | 229 | |
Christophe Lombard | 4752876 | 2016-03-04 12:26:37 +0100 | [diff] [blame] | 230 | What: /sys/class/cxl/<card>/perst_reloads_same_image (not in a guest) |
Daniel Axtens | 13e68d8 | 2015-08-14 17:41:25 +1000 | [diff] [blame] | 231 | Date: July 2015 |
| 232 | Contact: linuxppc-dev@lists.ozlabs.org |
| 233 | Description: read/write |
| 234 | Trust that when an image is reloaded via PERST, it will not |
| 235 | have changed. |
| 236 | 0 = don't trust, the image may be different (default) |
| 237 | 1 = trust that the image will not change. |
| 238 | Users: https://github.com/ibm-capi/libcxl |
Frederic Barrat | e009a7e | 2016-03-21 14:32:48 -0500 | [diff] [blame] | 239 | |
| 240 | What: /sys/class/cxl/<card>/psl_timebase_synced |
| 241 | Date: March 2016 |
| 242 | Contact: linuxppc-dev@lists.ozlabs.org |
| 243 | Description: read only |
| 244 | Returns 1 if the psl timebase register is synchronized |
| 245 | with the core timebase register, 0 otherwise. |
| 246 | Users: https://github.com/ibm-capi/libcxl |