1ed66bcd0SMauro Carvalho ChehabPlease note that attributes that are shared between devices are stored in 2ed66bcd0SMauro Carvalho Chehabthe directory pointed to by the symlink device/. 3ed66bcd0SMauro Carvalho ChehabFor example, the real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is 449fd644cSPhilippe Bergheaud/sys/class/cxl/afu0.0s/device/irqs_max, i.e. /sys/class/cxl/afu0.0/irqs_max. 549fd644cSPhilippe Bergheaud 649fd644cSPhilippe Bergheaud 7a9282d01SIan MunsieSlave contexts (eg. /sys/class/cxl/afu0.0s): 8a9282d01SIan Munsie 9e36f6fe1SVaibhav JainWhat: /sys/class/cxl/<afu>/afu_err_buf 10e36f6fe1SVaibhav JainDate: September 2014 11e36f6fe1SVaibhav JainContact: linuxppc-dev@lists.ozlabs.org 12e36f6fe1SVaibhav JainDescription: read only 13e36f6fe1SVaibhav Jain AFU Error Buffer contents. The contents of this file are 14e36f6fe1SVaibhav Jain application specific and depends on the AFU being used. 15e36f6fe1SVaibhav Jain Applications interacting with the AFU can use this attribute 16e36f6fe1SVaibhav Jain to know about the current error condition and take appropriate 17e36f6fe1SVaibhav Jain action like logging the event etc. 18e36f6fe1SVaibhav Jain 19e36f6fe1SVaibhav Jain 20a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/irqs_max 21a9282d01SIan MunsieDate: September 2014 22a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 23a9282d01SIan MunsieDescription: read/write 24a9282d01SIan Munsie Decimal value of maximum number of interrupts that can be 25a9282d01SIan Munsie requested by userspace. The default on probe is the maximum 26a9282d01SIan Munsie that hardware can support (eg. 2037). Write values will limit 27a9282d01SIan Munsie userspace applications to that many userspace interrupts. Must 28a9282d01SIan Munsie be >= irqs_min. 29aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 30a9282d01SIan Munsie 31a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/irqs_min 32a9282d01SIan MunsieDate: September 2014 33a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 34a9282d01SIan MunsieDescription: read only 35a9282d01SIan Munsie Decimal value of the minimum number of interrupts that 36a9282d01SIan Munsie userspace must request on a CXL_START_WORK ioctl. Userspace may 37a9282d01SIan Munsie omit the num_interrupts field in the START_WORK IOCTL to get 38a9282d01SIan Munsie this minimum automatically. 39aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 40a9282d01SIan Munsie 41a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/mmio_size 42a9282d01SIan MunsieDate: September 2014 43a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 44a9282d01SIan MunsieDescription: read only 45a9282d01SIan Munsie Decimal value of the size of the MMIO space that may be mmaped 46a9282d01SIan Munsie by userspace. 47aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 48a9282d01SIan Munsie 49a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/modes_supported 50a9282d01SIan MunsieDate: September 2014 51a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 52a9282d01SIan MunsieDescription: read only 53a9282d01SIan Munsie List of the modes this AFU supports. One per line. 54a9282d01SIan Munsie Valid entries are: "dedicated_process" and "afu_directed" 55aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 56a9282d01SIan Munsie 57a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/mode 58a9282d01SIan MunsieDate: September 2014 59a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 60a9282d01SIan MunsieDescription: read/write 61a9282d01SIan Munsie The current mode the AFU is using. Will be one of the modes 62a9282d01SIan Munsie given in modes_supported. Writing will change the mode 63a9282d01SIan Munsie provided that no user contexts are attached. 64aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 65a9282d01SIan Munsie 66a9282d01SIan Munsie 67a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/prefault_mode 68a9282d01SIan MunsieDate: September 2014 69a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 70a9282d01SIan MunsieDescription: read/write 71a9282d01SIan Munsie Set the mode for prefaulting in segments into the segment table 72b6c84ba2SVaibhav Jain when performing the START_WORK ioctl. Only applicable when 73b6c84ba2SVaibhav Jain running under hashed page table mmu. 74b6c84ba2SVaibhav Jain Possible values: 75*34433332SMauro Carvalho Chehab 76*34433332SMauro Carvalho Chehab ======================= ====================================== 77*34433332SMauro Carvalho Chehab none No prefaulting (default) 78*34433332SMauro Carvalho Chehab work_element_descriptor Treat the work element 79a9282d01SIan Munsie descriptor as an effective address and 80a9282d01SIan Munsie prefault what it points to. 81*34433332SMauro Carvalho Chehab all all segments process calling 82*34433332SMauro Carvalho Chehab START_WORK maps. 83*34433332SMauro Carvalho Chehab ======================= ====================================== 84*34433332SMauro Carvalho Chehab 85aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 86a9282d01SIan Munsie 87a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/reset 88a9282d01SIan MunsieDate: September 2014 89a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 90a9282d01SIan MunsieDescription: write only 91a9282d01SIan Munsie Writing 1 here will reset the AFU provided there are not 92a9282d01SIan Munsie contexts active on the AFU. 93aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 94a9282d01SIan Munsie 95a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/api_version 96a9282d01SIan MunsieDate: September 2014 97a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 98a9282d01SIan MunsieDescription: read only 99a9282d01SIan Munsie Decimal value of the current version of the kernel/user API. 100aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 101a9282d01SIan Munsie 10249fd644cSPhilippe BergheaudWhat: /sys/class/cxl/<afu>/api_version_compatible 103a9282d01SIan MunsieDate: September 2014 104a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 105a9282d01SIan MunsieDescription: read only 106a9282d01SIan Munsie Decimal value of the the lowest version of the userspace API 107a9282d01SIan Munsie this this kernel supports. 108aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 109a9282d01SIan Munsie 110a9282d01SIan Munsie 111b087e619SIan MunsieAFU configuration records (eg. /sys/class/cxl/afu0.0/cr0): 112b087e619SIan Munsie 113b087e619SIan MunsieAn AFU may optionally export one or more PCIe like configuration records, known 114b087e619SIan Munsieas AFU configuration records, which will show up here (if present). 115b087e619SIan Munsie 116b087e619SIan MunsieWhat: /sys/class/cxl/<afu>/cr<config num>/vendor 117b087e619SIan MunsieDate: February 2015 118b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 119b087e619SIan MunsieDescription: read only 120b087e619SIan Munsie Hexadecimal value of the vendor ID found in this AFU 121b087e619SIan Munsie configuration record. 122aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 123b087e619SIan Munsie 124b087e619SIan MunsieWhat: /sys/class/cxl/<afu>/cr<config num>/device 125b087e619SIan MunsieDate: February 2015 126b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 127b087e619SIan MunsieDescription: read only 128b087e619SIan Munsie Hexadecimal value of the device ID found in this AFU 129b087e619SIan Munsie configuration record. 130aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 131b087e619SIan Munsie 13252fd4750SPhilippe BergheaudWhat: /sys/class/cxl/<afu>/cr<config num>/class 133b087e619SIan MunsieDate: February 2015 134b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 135b087e619SIan MunsieDescription: read only 136b087e619SIan Munsie Hexadecimal value of the class code found in this AFU 137b087e619SIan Munsie configuration record. 138aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 139b087e619SIan Munsie 140b087e619SIan MunsieWhat: /sys/class/cxl/<afu>/cr<config num>/config 141b087e619SIan MunsieDate: February 2015 142b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 143b087e619SIan MunsieDescription: read only 144b087e619SIan Munsie This binary file provides raw access to the AFU configuration 145b087e619SIan Munsie record. The format is expected to match the either the standard 146b087e619SIan Munsie or extended configuration space defined by the PCIe 147b087e619SIan Munsie specification. 148aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 149b087e619SIan Munsie 150b087e619SIan Munsie 151b087e619SIan Munsie 152a9282d01SIan MunsieMaster contexts (eg. /sys/class/cxl/afu0.0m) 153a9282d01SIan Munsie 154a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/mmio_size 155a9282d01SIan MunsieDate: September 2014 156a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 157a9282d01SIan MunsieDescription: read only 158a9282d01SIan Munsie Decimal value of the size of the MMIO space that may be mmaped 159a9282d01SIan Munsie by userspace. This includes all slave contexts space also. 160aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 161a9282d01SIan Munsie 162a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/pp_mmio_len 163a9282d01SIan MunsieDate: September 2014 164a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 165a9282d01SIan MunsieDescription: read only 166a9282d01SIan Munsie Decimal value of the Per Process MMIO space length. 167aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 168a9282d01SIan Munsie 1694752876cSChristophe LombardWhat: /sys/class/cxl/<afu>m/pp_mmio_off (not in a guest) 170a9282d01SIan MunsieDate: September 2014 171a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 172a9282d01SIan MunsieDescription: read only 173a9282d01SIan Munsie Decimal value of the Per Process MMIO space offset. 174aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 175a9282d01SIan Munsie 176a9282d01SIan Munsie 177a9282d01SIan MunsieCard info (eg. /sys/class/cxl/card0) 178a9282d01SIan Munsie 179a9282d01SIan MunsieWhat: /sys/class/cxl/<card>/caia_version 180a9282d01SIan MunsieDate: September 2014 181a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 182a9282d01SIan MunsieDescription: read only 183a9282d01SIan Munsie Identifies the CAIA Version the card implements. 184aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 185a9282d01SIan Munsie 18649fd644cSPhilippe BergheaudWhat: /sys/class/cxl/<card>/psl_revision 187a9282d01SIan MunsieDate: September 2014 188a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 189a9282d01SIan MunsieDescription: read only 190a9282d01SIan Munsie Identifies the revision level of the PSL. 191aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 192a9282d01SIan Munsie 1934752876cSChristophe LombardWhat: /sys/class/cxl/<card>/base_image (not in a guest) 194a9282d01SIan MunsieDate: September 2014 195a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 196a9282d01SIan MunsieDescription: read only 197a9282d01SIan Munsie Identifies the revision level of the base image for devices 198a9282d01SIan Munsie that support loadable PSLs. For FPGAs this field identifies 199a9282d01SIan Munsie the image contained in the on-adapter flash which is loaded 200a9282d01SIan Munsie during the initial program load. 201aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 202a9282d01SIan Munsie 2034752876cSChristophe LombardWhat: /sys/class/cxl/<card>/image_loaded (not in a guest) 204a9282d01SIan MunsieDate: September 2014 205a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 206a9282d01SIan MunsieDescription: read only 207a9282d01SIan Munsie Will return "user" or "factory" depending on the image loaded 208a9282d01SIan Munsie onto the card. 209aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 21095bc11bcSRyan Grimm 2114752876cSChristophe LombardWhat: /sys/class/cxl/<card>/load_image_on_perst (not in a guest) 21295bc11bcSRyan GrimmDate: December 2014 21395bc11bcSRyan GrimmContact: linuxppc-dev@lists.ozlabs.org 21495bc11bcSRyan GrimmDescription: read/write 21595bc11bcSRyan Grimm Valid entries are "none", "user", and "factory". 21695bc11bcSRyan Grimm "none" means PERST will not cause image to be loaded to the 21795bc11bcSRyan Grimm card. A power cycle is required to load the image. 21895bc11bcSRyan Grimm "none" could be useful for debugging because the trace arrays 21995bc11bcSRyan Grimm are preserved. 22095bc11bcSRyan Grimm "user" and "factory" means PERST will cause either the user or 22195bc11bcSRyan Grimm user or factory image to be loaded. 22295bc11bcSRyan Grimm Default is to reload on PERST whichever image the card has 22395bc11bcSRyan Grimm loaded. 224aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 22562fa19d4SRyan Grimm 22662fa19d4SRyan GrimmWhat: /sys/class/cxl/<card>/reset 22762fa19d4SRyan GrimmDate: October 2014 22862fa19d4SRyan GrimmContact: linuxppc-dev@lists.ozlabs.org 22962fa19d4SRyan GrimmDescription: write only 23070b565bbSVaibhav Jain Writing 1 will issue a PERST to card provided there are no 23170b565bbSVaibhav Jain contexts active on any one of the card AFUs. This may cause 23270b565bbSVaibhav Jain the card to reload the FPGA depending on load_image_on_perst. 23370b565bbSVaibhav Jain Writing -1 will do a force PERST irrespective of any active 23470b565bbSVaibhav Jain contexts on the card AFUs. 235aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 23613e68d8bSDaniel Axtens 2374752876cSChristophe LombardWhat: /sys/class/cxl/<card>/perst_reloads_same_image (not in a guest) 23813e68d8bSDaniel AxtensDate: July 2015 23913e68d8bSDaniel AxtensContact: linuxppc-dev@lists.ozlabs.org 24013e68d8bSDaniel AxtensDescription: read/write 24113e68d8bSDaniel Axtens Trust that when an image is reloaded via PERST, it will not 24213e68d8bSDaniel Axtens have changed. 24313e68d8bSDaniel Axtens 0 = don't trust, the image may be different (default) 24413e68d8bSDaniel Axtens 1 = trust that the image will not change. 24513e68d8bSDaniel AxtensUsers: https://github.com/ibm-capi/libcxl 246e009a7e8SFrederic Barrat 247e009a7e8SFrederic BarratWhat: /sys/class/cxl/<card>/psl_timebase_synced 248e009a7e8SFrederic BarratDate: March 2016 249e009a7e8SFrederic BarratContact: linuxppc-dev@lists.ozlabs.org 250e009a7e8SFrederic BarratDescription: read only 251e009a7e8SFrederic Barrat Returns 1 if the psl timebase register is synchronized 252e009a7e8SFrederic Barrat with the core timebase register, 0 otherwise. 253e009a7e8SFrederic BarratUsers: https://github.com/ibm-capi/libcxl 254497a0790SPhilippe Bergheaud 255497a0790SPhilippe BergheaudWhat: /sys/class/cxl/<card>/tunneled_ops_supported 256497a0790SPhilippe BergheaudDate: May 2018 257497a0790SPhilippe BergheaudContact: linuxppc-dev@lists.ozlabs.org 258497a0790SPhilippe BergheaudDescription: read only 259497a0790SPhilippe Bergheaud Returns 1 if tunneled operations are supported in capi mode, 260497a0790SPhilippe Bergheaud 0 otherwise. 261497a0790SPhilippe BergheaudUsers: https://github.com/ibm-capi/libcxl 262