149fd644cSPhilippe BergheaudNote: Attributes that are shared between devices are stored in the directory 249fd644cSPhilippe Bergheaudpointed to by the symlink device/. 349fd644cSPhilippe BergheaudExample: 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 72a9282d01SIan Munsie when performing the START_WORK ioctl. Possible values: 73a9282d01SIan Munsie none: No prefaulting (default) 74a9282d01SIan Munsie work_element_descriptor: Treat the work element 75a9282d01SIan Munsie descriptor as an effective address and 76a9282d01SIan Munsie prefault what it points to. 77a9282d01SIan Munsie all: all segments process calling START_WORK maps. 78aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 79a9282d01SIan Munsie 80a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/reset 81a9282d01SIan MunsieDate: September 2014 82a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 83a9282d01SIan MunsieDescription: write only 84a9282d01SIan Munsie Writing 1 here will reset the AFU provided there are not 85a9282d01SIan Munsie contexts active on the AFU. 86aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 87a9282d01SIan Munsie 88a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/api_version 89a9282d01SIan MunsieDate: September 2014 90a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 91a9282d01SIan MunsieDescription: read only 92a9282d01SIan Munsie Decimal value of the current version of the kernel/user API. 93aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 94a9282d01SIan Munsie 9549fd644cSPhilippe BergheaudWhat: /sys/class/cxl/<afu>/api_version_compatible 96a9282d01SIan MunsieDate: September 2014 97a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 98a9282d01SIan MunsieDescription: read only 99a9282d01SIan Munsie Decimal value of the the lowest version of the userspace API 100a9282d01SIan Munsie this this kernel supports. 101aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 102a9282d01SIan Munsie 103a9282d01SIan Munsie 104b087e619SIan MunsieAFU configuration records (eg. /sys/class/cxl/afu0.0/cr0): 105b087e619SIan Munsie 106b087e619SIan MunsieAn AFU may optionally export one or more PCIe like configuration records, known 107b087e619SIan Munsieas AFU configuration records, which will show up here (if present). 108b087e619SIan Munsie 109b087e619SIan MunsieWhat: /sys/class/cxl/<afu>/cr<config num>/vendor 110b087e619SIan MunsieDate: February 2015 111b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 112b087e619SIan MunsieDescription: read only 113b087e619SIan Munsie Hexadecimal value of the vendor ID found in this AFU 114b087e619SIan Munsie configuration record. 115aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 116b087e619SIan Munsie 117b087e619SIan MunsieWhat: /sys/class/cxl/<afu>/cr<config num>/device 118b087e619SIan MunsieDate: February 2015 119b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 120b087e619SIan MunsieDescription: read only 121b087e619SIan Munsie Hexadecimal value of the device ID found in this AFU 122b087e619SIan Munsie configuration record. 123aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 124b087e619SIan Munsie 12552fd4750SPhilippe BergheaudWhat: /sys/class/cxl/<afu>/cr<config num>/class 126b087e619SIan MunsieDate: February 2015 127b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 128b087e619SIan MunsieDescription: read only 129b087e619SIan Munsie Hexadecimal value of the class code found in this AFU 130b087e619SIan Munsie configuration record. 131aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 132b087e619SIan Munsie 133b087e619SIan MunsieWhat: /sys/class/cxl/<afu>/cr<config num>/config 134b087e619SIan MunsieDate: February 2015 135b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 136b087e619SIan MunsieDescription: read only 137b087e619SIan Munsie This binary file provides raw access to the AFU configuration 138b087e619SIan Munsie record. The format is expected to match the either the standard 139b087e619SIan Munsie or extended configuration space defined by the PCIe 140b087e619SIan Munsie specification. 141aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 142b087e619SIan Munsie 143b087e619SIan Munsie 144b087e619SIan Munsie 145a9282d01SIan MunsieMaster contexts (eg. /sys/class/cxl/afu0.0m) 146a9282d01SIan Munsie 147a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/mmio_size 148a9282d01SIan MunsieDate: September 2014 149a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 150a9282d01SIan MunsieDescription: read only 151a9282d01SIan Munsie Decimal value of the size of the MMIO space that may be mmaped 152a9282d01SIan Munsie by userspace. This includes all slave contexts space also. 153aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 154a9282d01SIan Munsie 155a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/pp_mmio_len 156a9282d01SIan MunsieDate: September 2014 157a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 158a9282d01SIan MunsieDescription: read only 159a9282d01SIan Munsie Decimal value of the Per Process MMIO space length. 160aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 161a9282d01SIan Munsie 162*4752876cSChristophe LombardWhat: /sys/class/cxl/<afu>m/pp_mmio_off (not in a guest) 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 offset. 167aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 168a9282d01SIan Munsie 169a9282d01SIan Munsie 170a9282d01SIan MunsieCard info (eg. /sys/class/cxl/card0) 171a9282d01SIan Munsie 172a9282d01SIan MunsieWhat: /sys/class/cxl/<card>/caia_version 173a9282d01SIan MunsieDate: September 2014 174a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 175a9282d01SIan MunsieDescription: read only 176a9282d01SIan Munsie Identifies the CAIA Version the card implements. 177aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 178a9282d01SIan Munsie 17949fd644cSPhilippe BergheaudWhat: /sys/class/cxl/<card>/psl_revision 180a9282d01SIan MunsieDate: September 2014 181a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 182a9282d01SIan MunsieDescription: read only 183a9282d01SIan Munsie Identifies the revision level of the PSL. 184aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 185a9282d01SIan Munsie 186*4752876cSChristophe LombardWhat: /sys/class/cxl/<card>/base_image (not in a guest) 187a9282d01SIan MunsieDate: September 2014 188a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 189a9282d01SIan MunsieDescription: read only 190a9282d01SIan Munsie Identifies the revision level of the base image for devices 191a9282d01SIan Munsie that support loadable PSLs. For FPGAs this field identifies 192a9282d01SIan Munsie the image contained in the on-adapter flash which is loaded 193a9282d01SIan Munsie during the initial program load. 194aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 195a9282d01SIan Munsie 196*4752876cSChristophe LombardWhat: /sys/class/cxl/<card>/image_loaded (not in a guest) 197a9282d01SIan MunsieDate: September 2014 198a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 199a9282d01SIan MunsieDescription: read only 200a9282d01SIan Munsie Will return "user" or "factory" depending on the image loaded 201a9282d01SIan Munsie onto the card. 202aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 20395bc11bcSRyan Grimm 204*4752876cSChristophe LombardWhat: /sys/class/cxl/<card>/load_image_on_perst (not in a guest) 20595bc11bcSRyan GrimmDate: December 2014 20695bc11bcSRyan GrimmContact: linuxppc-dev@lists.ozlabs.org 20795bc11bcSRyan GrimmDescription: read/write 20895bc11bcSRyan Grimm Valid entries are "none", "user", and "factory". 20995bc11bcSRyan Grimm "none" means PERST will not cause image to be loaded to the 21095bc11bcSRyan Grimm card. A power cycle is required to load the image. 21195bc11bcSRyan Grimm "none" could be useful for debugging because the trace arrays 21295bc11bcSRyan Grimm are preserved. 21395bc11bcSRyan Grimm "user" and "factory" means PERST will cause either the user or 21495bc11bcSRyan Grimm user or factory image to be loaded. 21595bc11bcSRyan Grimm Default is to reload on PERST whichever image the card has 21695bc11bcSRyan Grimm loaded. 217aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 21862fa19d4SRyan Grimm 21962fa19d4SRyan GrimmWhat: /sys/class/cxl/<card>/reset 22062fa19d4SRyan GrimmDate: October 2014 22162fa19d4SRyan GrimmContact: linuxppc-dev@lists.ozlabs.org 22262fa19d4SRyan GrimmDescription: write only 22362fa19d4SRyan Grimm Writing 1 will issue a PERST to card which may cause the card 22462fa19d4SRyan Grimm to reload the FPGA depending on load_image_on_perst. 225aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 22613e68d8bSDaniel Axtens 227*4752876cSChristophe LombardWhat: /sys/class/cxl/<card>/perst_reloads_same_image (not in a guest) 22813e68d8bSDaniel AxtensDate: July 2015 22913e68d8bSDaniel AxtensContact: linuxppc-dev@lists.ozlabs.org 23013e68d8bSDaniel AxtensDescription: read/write 23113e68d8bSDaniel Axtens Trust that when an image is reloaded via PERST, it will not 23213e68d8bSDaniel Axtens have changed. 23313e68d8bSDaniel Axtens 0 = don't trust, the image may be different (default) 23413e68d8bSDaniel Axtens 1 = trust that the image will not change. 23513e68d8bSDaniel AxtensUsers: https://github.com/ibm-capi/libcxl 236