1*892c4e46SMichael EllermanThe cxl driver was removed in 6.15. 25a0fcb0eSAndrew Donnellan 35a0fcb0eSAndrew DonnellanPlease note that attributes that are shared between devices are stored in 45a0fcb0eSAndrew Donnellanthe directory pointed to by the symlink device/. 55a0fcb0eSAndrew DonnellanFor example, the real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is 65a0fcb0eSAndrew Donnellan/sys/class/cxl/afu0.0s/device/irqs_max, i.e. /sys/class/cxl/afu0.0/irqs_max. 75a0fcb0eSAndrew Donnellan 85a0fcb0eSAndrew Donnellan 95a0fcb0eSAndrew DonnellanSlave contexts (eg. /sys/class/cxl/afu0.0s): 105a0fcb0eSAndrew Donnellan 115a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/afu_err_buf 125a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 135a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 145a0fcb0eSAndrew DonnellanDescription: read only 155a0fcb0eSAndrew Donnellan AFU Error Buffer contents. The contents of this file are 165a0fcb0eSAndrew Donnellan application specific and depends on the AFU being used. 175a0fcb0eSAndrew Donnellan Applications interacting with the AFU can use this attribute 185a0fcb0eSAndrew Donnellan to know about the current error condition and take appropriate 195a0fcb0eSAndrew Donnellan action like logging the event etc. 205a0fcb0eSAndrew Donnellan 215a0fcb0eSAndrew Donnellan 225a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/irqs_max 235a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 245a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 255a0fcb0eSAndrew DonnellanDescription: read/write 265a0fcb0eSAndrew Donnellan Decimal value of maximum number of interrupts that can be 275a0fcb0eSAndrew Donnellan requested by userspace. The default on probe is the maximum 285a0fcb0eSAndrew Donnellan that hardware can support (eg. 2037). Write values will limit 295a0fcb0eSAndrew Donnellan userspace applications to that many userspace interrupts. Must 305a0fcb0eSAndrew Donnellan be >= irqs_min. 315a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 325a0fcb0eSAndrew Donnellan 335a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/irqs_min 345a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 355a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 365a0fcb0eSAndrew DonnellanDescription: read only 375a0fcb0eSAndrew Donnellan Decimal value of the minimum number of interrupts that 385a0fcb0eSAndrew Donnellan userspace must request on a CXL_START_WORK ioctl. Userspace may 395a0fcb0eSAndrew Donnellan omit the num_interrupts field in the START_WORK IOCTL to get 405a0fcb0eSAndrew Donnellan this minimum automatically. 415a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 425a0fcb0eSAndrew Donnellan 435a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/mmio_size 445a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 455a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 465a0fcb0eSAndrew DonnellanDescription: read only 475a0fcb0eSAndrew Donnellan Decimal value of the size of the MMIO space that may be mmapped 485a0fcb0eSAndrew Donnellan by userspace. 495a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 505a0fcb0eSAndrew Donnellan 515a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/modes_supported 525a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 535a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 545a0fcb0eSAndrew DonnellanDescription: read only 555a0fcb0eSAndrew Donnellan List of the modes this AFU supports. One per line. 565a0fcb0eSAndrew Donnellan Valid entries are: "dedicated_process" and "afu_directed" 575a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 585a0fcb0eSAndrew Donnellan 595a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/mode 605a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 615a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 625a0fcb0eSAndrew DonnellanDescription: read/write 635a0fcb0eSAndrew Donnellan The current mode the AFU is using. Will be one of the modes 645a0fcb0eSAndrew Donnellan given in modes_supported. Writing will change the mode 655a0fcb0eSAndrew Donnellan provided that no user contexts are attached. 665a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 675a0fcb0eSAndrew Donnellan 685a0fcb0eSAndrew Donnellan 695a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/prefault_mode 705a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 715a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 725a0fcb0eSAndrew DonnellanDescription: read/write 735a0fcb0eSAndrew Donnellan Set the mode for prefaulting in segments into the segment table 745a0fcb0eSAndrew Donnellan when performing the START_WORK ioctl. Only applicable when 755a0fcb0eSAndrew Donnellan running under hashed page table mmu. 765a0fcb0eSAndrew Donnellan Possible values: 775a0fcb0eSAndrew Donnellan 785a0fcb0eSAndrew Donnellan ======================= ====================================== 795a0fcb0eSAndrew Donnellan none No prefaulting (default) 805a0fcb0eSAndrew Donnellan work_element_descriptor Treat the work element 815a0fcb0eSAndrew Donnellan descriptor as an effective address and 825a0fcb0eSAndrew Donnellan prefault what it points to. 835a0fcb0eSAndrew Donnellan all all segments process calling 845a0fcb0eSAndrew Donnellan START_WORK maps. 855a0fcb0eSAndrew Donnellan ======================= ====================================== 865a0fcb0eSAndrew Donnellan 875a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 885a0fcb0eSAndrew Donnellan 895a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/reset 905a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 915a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 925a0fcb0eSAndrew DonnellanDescription: write only 935a0fcb0eSAndrew Donnellan Writing 1 here will reset the AFU provided there are not 945a0fcb0eSAndrew Donnellan contexts active on the AFU. 955a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 965a0fcb0eSAndrew Donnellan 975a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/api_version 985a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 995a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1005a0fcb0eSAndrew DonnellanDescription: read only 1015a0fcb0eSAndrew Donnellan Decimal value of the current version of the kernel/user API. 1025a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1035a0fcb0eSAndrew Donnellan 1045a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/api_version_compatible 1055a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 1065a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1075a0fcb0eSAndrew DonnellanDescription: read only 1085a0fcb0eSAndrew Donnellan Decimal value of the lowest version of the userspace API 1095a0fcb0eSAndrew Donnellan this kernel supports. 1105a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1115a0fcb0eSAndrew Donnellan 1125a0fcb0eSAndrew Donnellan 1135a0fcb0eSAndrew DonnellanAFU configuration records (eg. /sys/class/cxl/afu0.0/cr0): 1145a0fcb0eSAndrew Donnellan 1155a0fcb0eSAndrew DonnellanAn AFU may optionally export one or more PCIe like configuration records, known 1165a0fcb0eSAndrew Donnellanas AFU configuration records, which will show up here (if present). 1175a0fcb0eSAndrew Donnellan 1185a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/cr<config num>/vendor 1195a0fcb0eSAndrew DonnellanDate: February 2015, removed February 2025 1205a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1215a0fcb0eSAndrew DonnellanDescription: read only 1225a0fcb0eSAndrew Donnellan Hexadecimal value of the vendor ID found in this AFU 1235a0fcb0eSAndrew Donnellan configuration record. 1245a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1255a0fcb0eSAndrew Donnellan 1265a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/cr<config num>/device 1275a0fcb0eSAndrew DonnellanDate: February 2015, removed February 2025 1285a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1295a0fcb0eSAndrew DonnellanDescription: read only 1305a0fcb0eSAndrew Donnellan Hexadecimal value of the device ID found in this AFU 1315a0fcb0eSAndrew Donnellan configuration record. 1325a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1335a0fcb0eSAndrew Donnellan 1345a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/cr<config num>/class 1355a0fcb0eSAndrew DonnellanDate: February 2015, removed February 2025 1365a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1375a0fcb0eSAndrew DonnellanDescription: read only 1385a0fcb0eSAndrew Donnellan Hexadecimal value of the class code found in this AFU 1395a0fcb0eSAndrew Donnellan configuration record. 1405a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1415a0fcb0eSAndrew Donnellan 1425a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>/cr<config num>/config 1435a0fcb0eSAndrew DonnellanDate: February 2015, removed February 2025 1445a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1455a0fcb0eSAndrew DonnellanDescription: read only 1465a0fcb0eSAndrew Donnellan This binary file provides raw access to the AFU configuration 1475a0fcb0eSAndrew Donnellan record. The format is expected to match the either the standard 1485a0fcb0eSAndrew Donnellan or extended configuration space defined by the PCIe 1495a0fcb0eSAndrew Donnellan specification. 1505a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1515a0fcb0eSAndrew Donnellan 1525a0fcb0eSAndrew Donnellan 1535a0fcb0eSAndrew Donnellan 1545a0fcb0eSAndrew DonnellanMaster contexts (eg. /sys/class/cxl/afu0.0m) 1555a0fcb0eSAndrew Donnellan 1565a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>m/mmio_size 1575a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 1585a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1595a0fcb0eSAndrew DonnellanDescription: read only 1605a0fcb0eSAndrew Donnellan Decimal value of the size of the MMIO space that may be mmapped 1615a0fcb0eSAndrew Donnellan by userspace. This includes all slave contexts space also. 1625a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1635a0fcb0eSAndrew Donnellan 1645a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>m/pp_mmio_len 1655a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 1665a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1675a0fcb0eSAndrew DonnellanDescription: read only 1685a0fcb0eSAndrew Donnellan Decimal value of the Per Process MMIO space length. 1695a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1705a0fcb0eSAndrew Donnellan 1715a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<afu>m/pp_mmio_off 1725a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 1735a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1745a0fcb0eSAndrew DonnellanDescription: read only 1755a0fcb0eSAndrew Donnellan (not in a guest) 1765a0fcb0eSAndrew Donnellan Decimal value of the Per Process MMIO space offset. 1775a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1785a0fcb0eSAndrew Donnellan 1795a0fcb0eSAndrew Donnellan 1805a0fcb0eSAndrew DonnellanCard info (eg. /sys/class/cxl/card0) 1815a0fcb0eSAndrew Donnellan 1825a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<card>/caia_version 1835a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 1845a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1855a0fcb0eSAndrew DonnellanDescription: read only 1865a0fcb0eSAndrew Donnellan Identifies the CAIA Version the card implements. 1875a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1885a0fcb0eSAndrew Donnellan 1895a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<card>/psl_revision 1905a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 1915a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1925a0fcb0eSAndrew DonnellanDescription: read only 1935a0fcb0eSAndrew Donnellan Identifies the revision level of the PSL. 1945a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 1955a0fcb0eSAndrew Donnellan 1965a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<card>/base_image 1975a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 1985a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 1995a0fcb0eSAndrew DonnellanDescription: read only 2005a0fcb0eSAndrew Donnellan (not in a guest) 2015a0fcb0eSAndrew Donnellan Identifies the revision level of the base image for devices 2025a0fcb0eSAndrew Donnellan that support loadable PSLs. For FPGAs this field identifies 2035a0fcb0eSAndrew Donnellan the image contained in the on-adapter flash which is loaded 2045a0fcb0eSAndrew Donnellan during the initial program load. 2055a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 2065a0fcb0eSAndrew Donnellan 2075a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<card>/image_loaded 2085a0fcb0eSAndrew DonnellanDate: September 2014, removed February 2025 2095a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 2105a0fcb0eSAndrew DonnellanDescription: read only 2115a0fcb0eSAndrew Donnellan (not in a guest) 2125a0fcb0eSAndrew Donnellan Will return "user" or "factory" depending on the image loaded 2135a0fcb0eSAndrew Donnellan onto the card. 2145a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 2155a0fcb0eSAndrew Donnellan 2165a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<card>/load_image_on_perst 2175a0fcb0eSAndrew DonnellanDate: December 2014, removed February 2025 2185a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 2195a0fcb0eSAndrew DonnellanDescription: read/write 2205a0fcb0eSAndrew Donnellan (not in a guest) 2215a0fcb0eSAndrew Donnellan Valid entries are "none", "user", and "factory". 2225a0fcb0eSAndrew Donnellan "none" means PERST will not cause image to be loaded to the 2235a0fcb0eSAndrew Donnellan card. A power cycle is required to load the image. 2245a0fcb0eSAndrew Donnellan "none" could be useful for debugging because the trace arrays 2255a0fcb0eSAndrew Donnellan are preserved. 2265a0fcb0eSAndrew Donnellan 2275a0fcb0eSAndrew Donnellan "user" and "factory" means PERST will cause either the user or 2285a0fcb0eSAndrew Donnellan user or factory image to be loaded. 2295a0fcb0eSAndrew Donnellan Default is to reload on PERST whichever image the card has 2305a0fcb0eSAndrew Donnellan loaded. 2315a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 2325a0fcb0eSAndrew Donnellan 2335a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<card>/reset 2345a0fcb0eSAndrew DonnellanDate: October 2014, removed February 2025 2355a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 2365a0fcb0eSAndrew DonnellanDescription: write only 2375a0fcb0eSAndrew Donnellan Writing 1 will issue a PERST to card provided there are no 2385a0fcb0eSAndrew Donnellan contexts active on any one of the card AFUs. This may cause 2395a0fcb0eSAndrew Donnellan the card to reload the FPGA depending on load_image_on_perst. 2405a0fcb0eSAndrew Donnellan Writing -1 will do a force PERST irrespective of any active 2415a0fcb0eSAndrew Donnellan contexts on the card AFUs. 2425a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 2435a0fcb0eSAndrew Donnellan 2445a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<card>/perst_reloads_same_image 2455a0fcb0eSAndrew DonnellanDate: July 2015, removed February 2025 2465a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 2475a0fcb0eSAndrew DonnellanDescription: read/write 2485a0fcb0eSAndrew Donnellan (not in a guest) 2495a0fcb0eSAndrew Donnellan Trust that when an image is reloaded via PERST, it will not 2505a0fcb0eSAndrew Donnellan have changed. 2515a0fcb0eSAndrew Donnellan 2525a0fcb0eSAndrew Donnellan == ================================================= 2535a0fcb0eSAndrew Donnellan 0 don't trust, the image may be different (default) 2545a0fcb0eSAndrew Donnellan 1 trust that the image will not change. 2555a0fcb0eSAndrew Donnellan == ================================================= 2565a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 2575a0fcb0eSAndrew Donnellan 2585a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<card>/psl_timebase_synced 2595a0fcb0eSAndrew DonnellanDate: March 2016, removed February 2025 2605a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 2615a0fcb0eSAndrew DonnellanDescription: read only 2625a0fcb0eSAndrew Donnellan Returns 1 if the psl timebase register is synchronized 2635a0fcb0eSAndrew Donnellan with the core timebase register, 0 otherwise. 2645a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 2655a0fcb0eSAndrew Donnellan 2665a0fcb0eSAndrew DonnellanWhat: /sys/class/cxl/<card>/tunneled_ops_supported 2675a0fcb0eSAndrew DonnellanDate: May 2018, removed February 2025 2685a0fcb0eSAndrew DonnellanContact: linuxppc-dev@lists.ozlabs.org 2695a0fcb0eSAndrew DonnellanDescription: read only 2705a0fcb0eSAndrew Donnellan Returns 1 if tunneled operations are supported in capi mode, 2715a0fcb0eSAndrew Donnellan 0 otherwise. 2725a0fcb0eSAndrew DonnellanUsers: https://github.com/ibm-capi/libcxl 273