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