18c2ecf20Sopenharmony_ciPlease note that attributes that are shared between devices are stored in
28c2ecf20Sopenharmony_cithe directory pointed to by the symlink device/.
38c2ecf20Sopenharmony_ciFor example, the real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is
48c2ecf20Sopenharmony_ci/sys/class/cxl/afu0.0s/device/irqs_max, i.e. /sys/class/cxl/afu0.0/irqs_max.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciSlave contexts (eg. /sys/class/cxl/afu0.0s):
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/afu_err_buf
108c2ecf20Sopenharmony_ciDate:           September 2014
118c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
128c2ecf20Sopenharmony_ciDescription:    read only
138c2ecf20Sopenharmony_ci                AFU Error Buffer contents. The contents of this file are
148c2ecf20Sopenharmony_ci		application specific and depends on the AFU being used.
158c2ecf20Sopenharmony_ci		Applications interacting with the AFU can use this attribute
168c2ecf20Sopenharmony_ci		to know about the current error condition and take appropriate
178c2ecf20Sopenharmony_ci		action like logging the event etc.
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/irqs_max
218c2ecf20Sopenharmony_ciDate:           September 2014
228c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
238c2ecf20Sopenharmony_ciDescription:    read/write
248c2ecf20Sopenharmony_ci                Decimal value of maximum number of interrupts that can be
258c2ecf20Sopenharmony_ci                requested by userspace.  The default on probe is the maximum
268c2ecf20Sopenharmony_ci                that hardware can support (eg. 2037). Write values will limit
278c2ecf20Sopenharmony_ci                userspace applications to that many userspace interrupts. Must
288c2ecf20Sopenharmony_ci                be >= irqs_min.
298c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/irqs_min
328c2ecf20Sopenharmony_ciDate:           September 2014
338c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
348c2ecf20Sopenharmony_ciDescription:    read only
358c2ecf20Sopenharmony_ci                Decimal value of the minimum number of interrupts that
368c2ecf20Sopenharmony_ci                userspace must request on a CXL_START_WORK ioctl. Userspace may
378c2ecf20Sopenharmony_ci                omit the num_interrupts field in the START_WORK IOCTL to get
388c2ecf20Sopenharmony_ci                this minimum automatically.
398c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/mmio_size
428c2ecf20Sopenharmony_ciDate:           September 2014
438c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
448c2ecf20Sopenharmony_ciDescription:    read only
458c2ecf20Sopenharmony_ci                Decimal value of the size of the MMIO space that may be mmaped
468c2ecf20Sopenharmony_ci                by userspace.
478c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/modes_supported
508c2ecf20Sopenharmony_ciDate:           September 2014
518c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
528c2ecf20Sopenharmony_ciDescription:    read only
538c2ecf20Sopenharmony_ci                List of the modes this AFU supports. One per line.
548c2ecf20Sopenharmony_ci                Valid entries are: "dedicated_process" and "afu_directed"
558c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/mode
588c2ecf20Sopenharmony_ciDate:           September 2014
598c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
608c2ecf20Sopenharmony_ciDescription:    read/write
618c2ecf20Sopenharmony_ci                The current mode the AFU is using. Will be one of the modes
628c2ecf20Sopenharmony_ci                given in modes_supported. Writing will change the mode
638c2ecf20Sopenharmony_ci                provided that no user contexts are attached.
648c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/prefault_mode
688c2ecf20Sopenharmony_ciDate:           September 2014
698c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
708c2ecf20Sopenharmony_ciDescription:    read/write
718c2ecf20Sopenharmony_ci                Set the mode for prefaulting in segments into the segment table
728c2ecf20Sopenharmony_ci                when performing the START_WORK ioctl. Only applicable when
738c2ecf20Sopenharmony_ci                running under hashed page table mmu.
748c2ecf20Sopenharmony_ci                Possible values:
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci                =======================  ======================================
778c2ecf20Sopenharmony_ci		none			 No prefaulting (default)
788c2ecf20Sopenharmony_ci		work_element_descriptor  Treat the work element
798c2ecf20Sopenharmony_ci					 descriptor as an effective address and
808c2ecf20Sopenharmony_ci					 prefault what it points to.
818c2ecf20Sopenharmony_ci                all			 all segments process calling
828c2ecf20Sopenharmony_ci					 START_WORK maps.
838c2ecf20Sopenharmony_ci                =======================  ======================================
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/reset
888c2ecf20Sopenharmony_ciDate:           September 2014
898c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
908c2ecf20Sopenharmony_ciDescription:    write only
918c2ecf20Sopenharmony_ci                Writing 1 here will reset the AFU provided there are not
928c2ecf20Sopenharmony_ci                contexts active on the AFU.
938c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/api_version
968c2ecf20Sopenharmony_ciDate:           September 2014
978c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
988c2ecf20Sopenharmony_ciDescription:    read only
998c2ecf20Sopenharmony_ci                Decimal value of the current version of the kernel/user API.
1008c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/api_version_compatible
1038c2ecf20Sopenharmony_ciDate:           September 2014
1048c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1058c2ecf20Sopenharmony_ciDescription:    read only
1068c2ecf20Sopenharmony_ci                Decimal value of the the lowest version of the userspace API
1078c2ecf20Sopenharmony_ci                this this kernel supports.
1088c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ciAFU configuration records (eg. /sys/class/cxl/afu0.0/cr0):
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ciAn AFU may optionally export one or more PCIe like configuration records, known
1148c2ecf20Sopenharmony_cias AFU configuration records, which will show up here (if present).
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/cr<config num>/vendor
1178c2ecf20Sopenharmony_ciDate:           February 2015
1188c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1198c2ecf20Sopenharmony_ciDescription:    read only
1208c2ecf20Sopenharmony_ci		Hexadecimal value of the vendor ID found in this AFU
1218c2ecf20Sopenharmony_ci		configuration record.
1228c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/cr<config num>/device
1258c2ecf20Sopenharmony_ciDate:           February 2015
1268c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1278c2ecf20Sopenharmony_ciDescription:    read only
1288c2ecf20Sopenharmony_ci		Hexadecimal value of the device ID found in this AFU
1298c2ecf20Sopenharmony_ci		configuration record.
1308c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/cr<config num>/class
1338c2ecf20Sopenharmony_ciDate:           February 2015
1348c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1358c2ecf20Sopenharmony_ciDescription:    read only
1368c2ecf20Sopenharmony_ci		Hexadecimal value of the class code found in this AFU
1378c2ecf20Sopenharmony_ci		configuration record.
1388c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/cr<config num>/config
1418c2ecf20Sopenharmony_ciDate:           February 2015
1428c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1438c2ecf20Sopenharmony_ciDescription:    read only
1448c2ecf20Sopenharmony_ci		This binary file provides raw access to the AFU configuration
1458c2ecf20Sopenharmony_ci		record. The format is expected to match the either the standard
1468c2ecf20Sopenharmony_ci		or extended configuration space defined by the PCIe
1478c2ecf20Sopenharmony_ci		specification.
1488c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ci
1528c2ecf20Sopenharmony_ciMaster contexts (eg. /sys/class/cxl/afu0.0m)
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>m/mmio_size
1558c2ecf20Sopenharmony_ciDate:           September 2014
1568c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1578c2ecf20Sopenharmony_ciDescription:    read only
1588c2ecf20Sopenharmony_ci                Decimal value of the size of the MMIO space that may be mmaped
1598c2ecf20Sopenharmony_ci                by userspace. This includes all slave contexts space also.
1608c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>m/pp_mmio_len
1638c2ecf20Sopenharmony_ciDate:           September 2014
1648c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1658c2ecf20Sopenharmony_ciDescription:    read only
1668c2ecf20Sopenharmony_ci                Decimal value of the Per Process MMIO space length.
1678c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<afu>m/pp_mmio_off (not in a guest)
1708c2ecf20Sopenharmony_ciDate:           September 2014
1718c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1728c2ecf20Sopenharmony_ciDescription:    read only
1738c2ecf20Sopenharmony_ci                Decimal value of the Per Process MMIO space offset.
1748c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1758c2ecf20Sopenharmony_ci
1768c2ecf20Sopenharmony_ci
1778c2ecf20Sopenharmony_ciCard info (eg. /sys/class/cxl/card0)
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<card>/caia_version
1808c2ecf20Sopenharmony_ciDate:           September 2014
1818c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1828c2ecf20Sopenharmony_ciDescription:    read only
1838c2ecf20Sopenharmony_ci                Identifies the CAIA Version the card implements.
1848c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<card>/psl_revision
1878c2ecf20Sopenharmony_ciDate:           September 2014
1888c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1898c2ecf20Sopenharmony_ciDescription:    read only
1908c2ecf20Sopenharmony_ci                Identifies the revision level of the PSL.
1918c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<card>/base_image (not in a guest)
1948c2ecf20Sopenharmony_ciDate:           September 2014
1958c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1968c2ecf20Sopenharmony_ciDescription:    read only
1978c2ecf20Sopenharmony_ci                Identifies the revision level of the base image for devices
1988c2ecf20Sopenharmony_ci                that support loadable PSLs. For FPGAs this field identifies
1998c2ecf20Sopenharmony_ci                the image contained in the on-adapter flash which is loaded
2008c2ecf20Sopenharmony_ci                during the initial program load.
2018c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
2028c2ecf20Sopenharmony_ci
2038c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<card>/image_loaded (not in a guest)
2048c2ecf20Sopenharmony_ciDate:           September 2014
2058c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
2068c2ecf20Sopenharmony_ciDescription:    read only
2078c2ecf20Sopenharmony_ci                Will return "user" or "factory" depending on the image loaded
2088c2ecf20Sopenharmony_ci                onto the card.
2098c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
2108c2ecf20Sopenharmony_ci
2118c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<card>/load_image_on_perst (not in a guest)
2128c2ecf20Sopenharmony_ciDate:           December 2014
2138c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
2148c2ecf20Sopenharmony_ciDescription:    read/write
2158c2ecf20Sopenharmony_ci                Valid entries are "none", "user", and "factory".
2168c2ecf20Sopenharmony_ci                "none" means PERST will not cause image to be loaded to the
2178c2ecf20Sopenharmony_ci                card.  A power cycle is required to load the image.
2188c2ecf20Sopenharmony_ci                "none" could be useful for debugging because the trace arrays
2198c2ecf20Sopenharmony_ci                are preserved.
2208c2ecf20Sopenharmony_ci
2218c2ecf20Sopenharmony_ci                "user" and "factory" means PERST will cause either the user or
2228c2ecf20Sopenharmony_ci                user or factory image to be loaded.
2238c2ecf20Sopenharmony_ci                Default is to reload on PERST whichever image the card has
2248c2ecf20Sopenharmony_ci                loaded.
2258c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
2268c2ecf20Sopenharmony_ci
2278c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<card>/reset
2288c2ecf20Sopenharmony_ciDate:           October 2014
2298c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
2308c2ecf20Sopenharmony_ciDescription:    write only
2318c2ecf20Sopenharmony_ci                Writing 1 will issue a PERST to card provided there are no
2328c2ecf20Sopenharmony_ci                contexts active on any one of the card AFUs. This may cause
2338c2ecf20Sopenharmony_ci                the card to reload the FPGA depending on load_image_on_perst.
2348c2ecf20Sopenharmony_ci                Writing -1 will do a force PERST irrespective of any active
2358c2ecf20Sopenharmony_ci                contexts on the card AFUs.
2368c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_ciWhat:		/sys/class/cxl/<card>/perst_reloads_same_image (not in a guest)
2398c2ecf20Sopenharmony_ciDate:		July 2015
2408c2ecf20Sopenharmony_ciContact:	linuxppc-dev@lists.ozlabs.org
2418c2ecf20Sopenharmony_ciDescription:	read/write
2428c2ecf20Sopenharmony_ci		Trust that when an image is reloaded via PERST, it will not
2438c2ecf20Sopenharmony_ci		have changed.
2448c2ecf20Sopenharmony_ci
2458c2ecf20Sopenharmony_ci		==  =================================================
2468c2ecf20Sopenharmony_ci		0   don't trust, the image may be different (default)
2478c2ecf20Sopenharmony_ci		1   trust that the image will not change.
2488c2ecf20Sopenharmony_ci		==  =================================================
2498c2ecf20Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
2508c2ecf20Sopenharmony_ci
2518c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<card>/psl_timebase_synced
2528c2ecf20Sopenharmony_ciDate:           March 2016
2538c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
2548c2ecf20Sopenharmony_ciDescription:    read only
2558c2ecf20Sopenharmony_ci                Returns 1 if the psl timebase register is synchronized
2568c2ecf20Sopenharmony_ci                with the core timebase register, 0 otherwise.
2578c2ecf20Sopenharmony_ciUsers:          https://github.com/ibm-capi/libcxl
2588c2ecf20Sopenharmony_ci
2598c2ecf20Sopenharmony_ciWhat:           /sys/class/cxl/<card>/tunneled_ops_supported
2608c2ecf20Sopenharmony_ciDate:           May 2018
2618c2ecf20Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
2628c2ecf20Sopenharmony_ciDescription:    read only
2638c2ecf20Sopenharmony_ci                Returns 1 if tunneled operations are supported in capi mode,
2648c2ecf20Sopenharmony_ci                0 otherwise.
2658c2ecf20Sopenharmony_ciUsers:          https://github.com/ibm-capi/libcxl
266