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 9a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/irqs_max 10a9282d01SIan MunsieDate: September 2014 11a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 12a9282d01SIan MunsieDescription: read/write 13a9282d01SIan Munsie Decimal value of maximum number of interrupts that can be 14a9282d01SIan Munsie requested by userspace. The default on probe is the maximum 15a9282d01SIan Munsie that hardware can support (eg. 2037). Write values will limit 16a9282d01SIan Munsie userspace applications to that many userspace interrupts. Must 17a9282d01SIan Munsie be >= irqs_min. 18a9282d01SIan Munsie 19a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/irqs_min 20a9282d01SIan MunsieDate: September 2014 21a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 22a9282d01SIan MunsieDescription: read only 23a9282d01SIan Munsie Decimal value of the minimum number of interrupts that 24a9282d01SIan Munsie userspace must request on a CXL_START_WORK ioctl. Userspace may 25a9282d01SIan Munsie omit the num_interrupts field in the START_WORK IOCTL to get 26a9282d01SIan Munsie this minimum automatically. 27a9282d01SIan Munsie 28a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/mmio_size 29a9282d01SIan MunsieDate: September 2014 30a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 31a9282d01SIan MunsieDescription: read only 32a9282d01SIan Munsie Decimal value of the size of the MMIO space that may be mmaped 33a9282d01SIan Munsie by userspace. 34a9282d01SIan Munsie 35a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/modes_supported 36a9282d01SIan MunsieDate: September 2014 37a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 38a9282d01SIan MunsieDescription: read only 39a9282d01SIan Munsie List of the modes this AFU supports. One per line. 40a9282d01SIan Munsie Valid entries are: "dedicated_process" and "afu_directed" 41a9282d01SIan Munsie 42a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/mode 43a9282d01SIan MunsieDate: September 2014 44a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 45a9282d01SIan MunsieDescription: read/write 46a9282d01SIan Munsie The current mode the AFU is using. Will be one of the modes 47a9282d01SIan Munsie given in modes_supported. Writing will change the mode 48a9282d01SIan Munsie provided that no user contexts are attached. 49a9282d01SIan Munsie 50a9282d01SIan Munsie 51a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/prefault_mode 52a9282d01SIan MunsieDate: September 2014 53a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 54a9282d01SIan MunsieDescription: read/write 55a9282d01SIan Munsie Set the mode for prefaulting in segments into the segment table 56a9282d01SIan Munsie when performing the START_WORK ioctl. Possible values: 57a9282d01SIan Munsie none: No prefaulting (default) 58a9282d01SIan Munsie work_element_descriptor: Treat the work element 59a9282d01SIan Munsie descriptor as an effective address and 60a9282d01SIan Munsie prefault what it points to. 61a9282d01SIan Munsie all: all segments process calling START_WORK maps. 62a9282d01SIan Munsie 63a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/reset 64a9282d01SIan MunsieDate: September 2014 65a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 66a9282d01SIan MunsieDescription: write only 67a9282d01SIan Munsie Writing 1 here will reset the AFU provided there are not 68a9282d01SIan Munsie contexts active on the AFU. 69a9282d01SIan Munsie 70a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>/api_version 71a9282d01SIan MunsieDate: September 2014 72a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 73a9282d01SIan MunsieDescription: read only 74a9282d01SIan Munsie Decimal value of the current version of the kernel/user API. 75a9282d01SIan Munsie 7649fd644cSPhilippe BergheaudWhat: /sys/class/cxl/<afu>/api_version_compatible 77a9282d01SIan MunsieDate: September 2014 78a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 79a9282d01SIan MunsieDescription: read only 80a9282d01SIan Munsie Decimal value of the the lowest version of the userspace API 81a9282d01SIan Munsie this this kernel supports. 82a9282d01SIan Munsie 83a9282d01SIan Munsie 84b087e619SIan MunsieAFU configuration records (eg. /sys/class/cxl/afu0.0/cr0): 85b087e619SIan Munsie 86b087e619SIan MunsieAn AFU may optionally export one or more PCIe like configuration records, known 87b087e619SIan Munsieas AFU configuration records, which will show up here (if present). 88b087e619SIan Munsie 89b087e619SIan MunsieWhat: /sys/class/cxl/<afu>/cr<config num>/vendor 90b087e619SIan MunsieDate: February 2015 91b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 92b087e619SIan MunsieDescription: read only 93b087e619SIan Munsie Hexadecimal value of the vendor ID found in this AFU 94b087e619SIan Munsie configuration record. 95b087e619SIan Munsie 96b087e619SIan MunsieWhat: /sys/class/cxl/<afu>/cr<config num>/device 97b087e619SIan MunsieDate: February 2015 98b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 99b087e619SIan MunsieDescription: read only 100b087e619SIan Munsie Hexadecimal value of the device ID found in this AFU 101b087e619SIan Munsie configuration record. 102b087e619SIan Munsie 103*52fd4750SPhilippe BergheaudWhat: /sys/class/cxl/<afu>/cr<config num>/class 104b087e619SIan MunsieDate: February 2015 105b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 106b087e619SIan MunsieDescription: read only 107b087e619SIan Munsie Hexadecimal value of the class code found in this AFU 108b087e619SIan Munsie configuration record. 109b087e619SIan Munsie 110b087e619SIan MunsieWhat: /sys/class/cxl/<afu>/cr<config num>/config 111b087e619SIan MunsieDate: February 2015 112b087e619SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 113b087e619SIan MunsieDescription: read only 114b087e619SIan Munsie This binary file provides raw access to the AFU configuration 115b087e619SIan Munsie record. The format is expected to match the either the standard 116b087e619SIan Munsie or extended configuration space defined by the PCIe 117b087e619SIan Munsie specification. 118b087e619SIan Munsie 119b087e619SIan Munsie 120b087e619SIan Munsie 121a9282d01SIan MunsieMaster contexts (eg. /sys/class/cxl/afu0.0m) 122a9282d01SIan Munsie 123a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/mmio_size 124a9282d01SIan MunsieDate: September 2014 125a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 126a9282d01SIan MunsieDescription: read only 127a9282d01SIan Munsie Decimal value of the size of the MMIO space that may be mmaped 128a9282d01SIan Munsie by userspace. This includes all slave contexts space also. 129a9282d01SIan Munsie 130a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/pp_mmio_len 131a9282d01SIan MunsieDate: September 2014 132a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 133a9282d01SIan MunsieDescription: read only 134a9282d01SIan Munsie Decimal value of the Per Process MMIO space length. 135a9282d01SIan Munsie 136a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/pp_mmio_off 137a9282d01SIan MunsieDate: September 2014 138a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 139a9282d01SIan MunsieDescription: read only 140a9282d01SIan Munsie Decimal value of the Per Process MMIO space offset. 141a9282d01SIan Munsie 142a9282d01SIan Munsie 143a9282d01SIan MunsieCard info (eg. /sys/class/cxl/card0) 144a9282d01SIan Munsie 145a9282d01SIan MunsieWhat: /sys/class/cxl/<card>/caia_version 146a9282d01SIan MunsieDate: September 2014 147a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 148a9282d01SIan MunsieDescription: read only 149a9282d01SIan Munsie Identifies the CAIA Version the card implements. 150a9282d01SIan Munsie 15149fd644cSPhilippe BergheaudWhat: /sys/class/cxl/<card>/psl_revision 152a9282d01SIan MunsieDate: September 2014 153a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 154a9282d01SIan MunsieDescription: read only 155a9282d01SIan Munsie Identifies the revision level of the PSL. 156a9282d01SIan Munsie 157a9282d01SIan MunsieWhat: /sys/class/cxl/<card>/base_image 158a9282d01SIan MunsieDate: September 2014 159a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 160a9282d01SIan MunsieDescription: read only 161a9282d01SIan Munsie Identifies the revision level of the base image for devices 162a9282d01SIan Munsie that support loadable PSLs. For FPGAs this field identifies 163a9282d01SIan Munsie the image contained in the on-adapter flash which is loaded 164a9282d01SIan Munsie during the initial program load. 165a9282d01SIan Munsie 166a9282d01SIan MunsieWhat: /sys/class/cxl/<card>/image_loaded 167a9282d01SIan MunsieDate: September 2014 168a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 169a9282d01SIan MunsieDescription: read only 170a9282d01SIan Munsie Will return "user" or "factory" depending on the image loaded 171a9282d01SIan Munsie onto the card. 17295bc11bcSRyan Grimm 17395bc11bcSRyan GrimmWhat: /sys/class/cxl/<card>/load_image_on_perst 17495bc11bcSRyan GrimmDate: December 2014 17595bc11bcSRyan GrimmContact: linuxppc-dev@lists.ozlabs.org 17695bc11bcSRyan GrimmDescription: read/write 17795bc11bcSRyan Grimm Valid entries are "none", "user", and "factory". 17895bc11bcSRyan Grimm "none" means PERST will not cause image to be loaded to the 17995bc11bcSRyan Grimm card. A power cycle is required to load the image. 18095bc11bcSRyan Grimm "none" could be useful for debugging because the trace arrays 18195bc11bcSRyan Grimm are preserved. 18295bc11bcSRyan Grimm "user" and "factory" means PERST will cause either the user or 18395bc11bcSRyan Grimm user or factory image to be loaded. 18495bc11bcSRyan Grimm Default is to reload on PERST whichever image the card has 18595bc11bcSRyan Grimm loaded. 18662fa19d4SRyan Grimm 18762fa19d4SRyan GrimmWhat: /sys/class/cxl/<card>/reset 18862fa19d4SRyan GrimmDate: October 2014 18962fa19d4SRyan GrimmContact: linuxppc-dev@lists.ozlabs.org 19062fa19d4SRyan GrimmDescription: write only 19162fa19d4SRyan Grimm Writing 1 will issue a PERST to card which may cause the card 19262fa19d4SRyan Grimm to reload the FPGA depending on load_image_on_perst. 193