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 84a9282d01SIan MunsieMaster contexts (eg. /sys/class/cxl/afu0.0m) 85a9282d01SIan Munsie 86a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/mmio_size 87a9282d01SIan MunsieDate: September 2014 88a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 89a9282d01SIan MunsieDescription: read only 90a9282d01SIan Munsie Decimal value of the size of the MMIO space that may be mmaped 91a9282d01SIan Munsie by userspace. This includes all slave contexts space also. 92a9282d01SIan Munsie 93a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/pp_mmio_len 94a9282d01SIan MunsieDate: September 2014 95a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 96a9282d01SIan MunsieDescription: read only 97a9282d01SIan Munsie Decimal value of the Per Process MMIO space length. 98a9282d01SIan Munsie 99a9282d01SIan MunsieWhat: /sys/class/cxl/<afu>m/pp_mmio_off 100a9282d01SIan MunsieDate: September 2014 101a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 102a9282d01SIan MunsieDescription: read only 103a9282d01SIan Munsie Decimal value of the Per Process MMIO space offset. 104a9282d01SIan Munsie 105a9282d01SIan Munsie 106a9282d01SIan MunsieCard info (eg. /sys/class/cxl/card0) 107a9282d01SIan Munsie 108a9282d01SIan MunsieWhat: /sys/class/cxl/<card>/caia_version 109a9282d01SIan MunsieDate: September 2014 110a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 111a9282d01SIan MunsieDescription: read only 112a9282d01SIan Munsie Identifies the CAIA Version the card implements. 113a9282d01SIan Munsie 11449fd644cSPhilippe BergheaudWhat: /sys/class/cxl/<card>/psl_revision 115a9282d01SIan MunsieDate: September 2014 116a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 117a9282d01SIan MunsieDescription: read only 118a9282d01SIan Munsie Identifies the revision level of the PSL. 119a9282d01SIan Munsie 120a9282d01SIan MunsieWhat: /sys/class/cxl/<card>/base_image 121a9282d01SIan MunsieDate: September 2014 122a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 123a9282d01SIan MunsieDescription: read only 124a9282d01SIan Munsie Identifies the revision level of the base image for devices 125a9282d01SIan Munsie that support loadable PSLs. For FPGAs this field identifies 126a9282d01SIan Munsie the image contained in the on-adapter flash which is loaded 127a9282d01SIan Munsie during the initial program load. 128a9282d01SIan Munsie 129a9282d01SIan MunsieWhat: /sys/class/cxl/<card>/image_loaded 130a9282d01SIan MunsieDate: September 2014 131a9282d01SIan MunsieContact: linuxppc-dev@lists.ozlabs.org 132a9282d01SIan MunsieDescription: read only 133a9282d01SIan Munsie Will return "user" or "factory" depending on the image loaded 134a9282d01SIan Munsie onto the card. 135*95bc11bcSRyan Grimm 136*95bc11bcSRyan GrimmWhat: /sys/class/cxl/<card>/load_image_on_perst 137*95bc11bcSRyan GrimmDate: December 2014 138*95bc11bcSRyan GrimmContact: linuxppc-dev@lists.ozlabs.org 139*95bc11bcSRyan GrimmDescription: read/write 140*95bc11bcSRyan Grimm Valid entries are "none", "user", and "factory". 141*95bc11bcSRyan Grimm "none" means PERST will not cause image to be loaded to the 142*95bc11bcSRyan Grimm card. A power cycle is required to load the image. 143*95bc11bcSRyan Grimm "none" could be useful for debugging because the trace arrays 144*95bc11bcSRyan Grimm are preserved. 145*95bc11bcSRyan Grimm "user" and "factory" means PERST will cause either the user or 146*95bc11bcSRyan Grimm user or factory image to be loaded. 147*95bc11bcSRyan Grimm Default is to reload on PERST whichever image the card has 148*95bc11bcSRyan Grimm loaded. 149