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 45*ebab9426SBjorn Helgaas Decimal value of the size of the MMIO space that may be mmapped 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: 7534433332SMauro Carvalho Chehab 7634433332SMauro Carvalho Chehab ======================= ====================================== 7734433332SMauro Carvalho Chehab none No prefaulting (default) 7834433332SMauro Carvalho Chehab work_element_descriptor Treat the work element 79a9282d01SIan Munsie descriptor as an effective address and 80a9282d01SIan Munsie prefault what it points to. 8134433332SMauro Carvalho Chehab all all segments process calling 8234433332SMauro Carvalho Chehab START_WORK maps. 8334433332SMauro Carvalho Chehab ======================= ====================================== 8434433332SMauro 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 1065749e7c1SSohaib Mohamed Decimal value of the lowest version of the userspace API 1075749e7c1SSohaib Mohamed 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 158*ebab9426SBjorn Helgaas Decimal value of the size of the MMIO space that may be mmapped 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 1691e0349f6SMauro Carvalho ChehabWhat: /sys/class/cxl/<afu>m/pp_mmio_off 170a9282d01SIan MunsieDate: September 2014 171a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 172a9282d01SIan MunsieDescription: read only 1731e0349f6SMauro Carvalho Chehab (not in a guest) 174a9282d01SIan Munsie Decimal value of the Per Process MMIO space offset. 175aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 176a9282d01SIan Munsie 177a9282d01SIan Munsie 178a9282d01SIan MunsieCard info (eg. /sys/class/cxl/card0) 179a9282d01SIan Munsie 180a9282d01SIan MunsieWhat: /sys/class/cxl/<card>/caia_version 181a9282d01SIan MunsieDate: September 2014 182a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 183a9282d01SIan MunsieDescription: read only 184a9282d01SIan Munsie Identifies the CAIA Version the card implements. 185aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 186a9282d01SIan Munsie 18749fd644cSPhilippe BergheaudWhat: /sys/class/cxl/<card>/psl_revision 188a9282d01SIan MunsieDate: September 2014 189a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 190a9282d01SIan MunsieDescription: read only 191a9282d01SIan Munsie Identifies the revision level of the PSL. 192aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 193a9282d01SIan Munsie 1941e0349f6SMauro Carvalho ChehabWhat: /sys/class/cxl/<card>/base_image 195a9282d01SIan MunsieDate: September 2014 196a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 197a9282d01SIan MunsieDescription: read only 1981e0349f6SMauro Carvalho Chehab (not in a guest) 199a9282d01SIan Munsie Identifies the revision level of the base image for devices 200a9282d01SIan Munsie that support loadable PSLs. For FPGAs this field identifies 201a9282d01SIan Munsie the image contained in the on-adapter flash which is loaded 202a9282d01SIan Munsie during the initial program load. 203aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 204a9282d01SIan Munsie 2051e0349f6SMauro Carvalho ChehabWhat: /sys/class/cxl/<card>/image_loaded 206a9282d01SIan MunsieDate: September 2014 207a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 208a9282d01SIan MunsieDescription: read only 2091e0349f6SMauro Carvalho Chehab (not in a guest) 210a9282d01SIan Munsie Will return "user" or "factory" depending on the image loaded 211a9282d01SIan Munsie onto the card. 212aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 21395bc11bcSRyan Grimm 2141e0349f6SMauro Carvalho ChehabWhat: /sys/class/cxl/<card>/load_image_on_perst 21595bc11bcSRyan GrimmDate: December 2014 21695bc11bcSRyan GrimmContact: linuxppc-dev@lists.ozlabs.org 21795bc11bcSRyan GrimmDescription: read/write 2181e0349f6SMauro Carvalho Chehab (not in a guest) 21995bc11bcSRyan Grimm Valid entries are "none", "user", and "factory". 22095bc11bcSRyan Grimm "none" means PERST will not cause image to be loaded to the 22195bc11bcSRyan Grimm card. A power cycle is required to load the image. 22295bc11bcSRyan Grimm "none" could be useful for debugging because the trace arrays 22395bc11bcSRyan Grimm are preserved. 22454a19b4dSMauro Carvalho Chehab 22595bc11bcSRyan Grimm "user" and "factory" means PERST will cause either the user or 22695bc11bcSRyan Grimm user or factory image to be loaded. 22795bc11bcSRyan Grimm Default is to reload on PERST whichever image the card has 22895bc11bcSRyan Grimm loaded. 229aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 23062fa19d4SRyan Grimm 23162fa19d4SRyan GrimmWhat: /sys/class/cxl/<card>/reset 23262fa19d4SRyan GrimmDate: October 2014 23362fa19d4SRyan GrimmContact: linuxppc-dev@lists.ozlabs.org 23462fa19d4SRyan GrimmDescription: write only 23570b565bbSVaibhav Jain Writing 1 will issue a PERST to card provided there are no 23670b565bbSVaibhav Jain contexts active on any one of the card AFUs. This may cause 23770b565bbSVaibhav Jain the card to reload the FPGA depending on load_image_on_perst. 23870b565bbSVaibhav Jain Writing -1 will do a force PERST irrespective of any active 23970b565bbSVaibhav Jain contexts on the card AFUs. 240aee85fb6SMichael NeulingUsers: https://github.com/ibm-capi/libcxl 24113e68d8bSDaniel Axtens 2421e0349f6SMauro Carvalho ChehabWhat: /sys/class/cxl/<card>/perst_reloads_same_image 24313e68d8bSDaniel AxtensDate: July 2015 24413e68d8bSDaniel AxtensContact: linuxppc-dev@lists.ozlabs.org 24513e68d8bSDaniel AxtensDescription: read/write 2461e0349f6SMauro Carvalho Chehab (not in a guest) 24713e68d8bSDaniel Axtens Trust that when an image is reloaded via PERST, it will not 24813e68d8bSDaniel Axtens have changed. 24954a19b4dSMauro Carvalho Chehab 25054a19b4dSMauro Carvalho Chehab == ================================================= 25154a19b4dSMauro Carvalho Chehab 0 don't trust, the image may be different (default) 25254a19b4dSMauro Carvalho Chehab 1 trust that the image will not change. 25354a19b4dSMauro Carvalho Chehab == ================================================= 25413e68d8bSDaniel AxtensUsers: https://github.com/ibm-capi/libcxl 255e009a7e8SFrederic Barrat 256e009a7e8SFrederic BarratWhat: /sys/class/cxl/<card>/psl_timebase_synced 257e009a7e8SFrederic BarratDate: March 2016 258e009a7e8SFrederic BarratContact: linuxppc-dev@lists.ozlabs.org 259e009a7e8SFrederic BarratDescription: read only 260e009a7e8SFrederic Barrat Returns 1 if the psl timebase register is synchronized 261e009a7e8SFrederic Barrat with the core timebase register, 0 otherwise. 262e009a7e8SFrederic BarratUsers: https://github.com/ibm-capi/libcxl 263497a0790SPhilippe Bergheaud 264497a0790SPhilippe BergheaudWhat: /sys/class/cxl/<card>/tunneled_ops_supported 265497a0790SPhilippe BergheaudDate: May 2018 266497a0790SPhilippe BergheaudContact: linuxppc-dev@lists.ozlabs.org 267497a0790SPhilippe BergheaudDescription: read only 268497a0790SPhilippe Bergheaud Returns 1 if tunneled operations are supported in capi mode, 269497a0790SPhilippe Bergheaud 0 otherwise. 270497a0790SPhilippe BergheaudUsers: https://github.com/ibm-capi/libcxl 271