162306a36Sopenharmony_ciPlease note that attributes that are shared between devices are stored in
262306a36Sopenharmony_cithe directory pointed to by the symlink device/.
362306a36Sopenharmony_ciFor example, the real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is
462306a36Sopenharmony_ci/sys/class/cxl/afu0.0s/device/irqs_max, i.e. /sys/class/cxl/afu0.0/irqs_max.
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciSlave contexts (eg. /sys/class/cxl/afu0.0s):
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/afu_err_buf
1062306a36Sopenharmony_ciDate:           September 2014
1162306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
1262306a36Sopenharmony_ciDescription:    read only
1362306a36Sopenharmony_ci                AFU Error Buffer contents. The contents of this file are
1462306a36Sopenharmony_ci		application specific and depends on the AFU being used.
1562306a36Sopenharmony_ci		Applications interacting with the AFU can use this attribute
1662306a36Sopenharmony_ci		to know about the current error condition and take appropriate
1762306a36Sopenharmony_ci		action like logging the event etc.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/irqs_max
2162306a36Sopenharmony_ciDate:           September 2014
2262306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
2362306a36Sopenharmony_ciDescription:    read/write
2462306a36Sopenharmony_ci                Decimal value of maximum number of interrupts that can be
2562306a36Sopenharmony_ci                requested by userspace.  The default on probe is the maximum
2662306a36Sopenharmony_ci                that hardware can support (eg. 2037). Write values will limit
2762306a36Sopenharmony_ci                userspace applications to that many userspace interrupts. Must
2862306a36Sopenharmony_ci                be >= irqs_min.
2962306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/irqs_min
3262306a36Sopenharmony_ciDate:           September 2014
3362306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
3462306a36Sopenharmony_ciDescription:    read only
3562306a36Sopenharmony_ci                Decimal value of the minimum number of interrupts that
3662306a36Sopenharmony_ci                userspace must request on a CXL_START_WORK ioctl. Userspace may
3762306a36Sopenharmony_ci                omit the num_interrupts field in the START_WORK IOCTL to get
3862306a36Sopenharmony_ci                this minimum automatically.
3962306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/mmio_size
4262306a36Sopenharmony_ciDate:           September 2014
4362306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
4462306a36Sopenharmony_ciDescription:    read only
4562306a36Sopenharmony_ci                Decimal value of the size of the MMIO space that may be mmapped
4662306a36Sopenharmony_ci                by userspace.
4762306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/modes_supported
5062306a36Sopenharmony_ciDate:           September 2014
5162306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
5262306a36Sopenharmony_ciDescription:    read only
5362306a36Sopenharmony_ci                List of the modes this AFU supports. One per line.
5462306a36Sopenharmony_ci                Valid entries are: "dedicated_process" and "afu_directed"
5562306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/mode
5862306a36Sopenharmony_ciDate:           September 2014
5962306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
6062306a36Sopenharmony_ciDescription:    read/write
6162306a36Sopenharmony_ci                The current mode the AFU is using. Will be one of the modes
6262306a36Sopenharmony_ci                given in modes_supported. Writing will change the mode
6362306a36Sopenharmony_ci                provided that no user contexts are attached.
6462306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/prefault_mode
6862306a36Sopenharmony_ciDate:           September 2014
6962306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
7062306a36Sopenharmony_ciDescription:    read/write
7162306a36Sopenharmony_ci                Set the mode for prefaulting in segments into the segment table
7262306a36Sopenharmony_ci                when performing the START_WORK ioctl. Only applicable when
7362306a36Sopenharmony_ci                running under hashed page table mmu.
7462306a36Sopenharmony_ci                Possible values:
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci                =======================  ======================================
7762306a36Sopenharmony_ci		none			 No prefaulting (default)
7862306a36Sopenharmony_ci		work_element_descriptor  Treat the work element
7962306a36Sopenharmony_ci					 descriptor as an effective address and
8062306a36Sopenharmony_ci					 prefault what it points to.
8162306a36Sopenharmony_ci                all			 all segments process calling
8262306a36Sopenharmony_ci					 START_WORK maps.
8362306a36Sopenharmony_ci                =======================  ======================================
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/reset
8862306a36Sopenharmony_ciDate:           September 2014
8962306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
9062306a36Sopenharmony_ciDescription:    write only
9162306a36Sopenharmony_ci                Writing 1 here will reset the AFU provided there are not
9262306a36Sopenharmony_ci                contexts active on the AFU.
9362306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/api_version
9662306a36Sopenharmony_ciDate:           September 2014
9762306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
9862306a36Sopenharmony_ciDescription:    read only
9962306a36Sopenharmony_ci                Decimal value of the current version of the kernel/user API.
10062306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/api_version_compatible
10362306a36Sopenharmony_ciDate:           September 2014
10462306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
10562306a36Sopenharmony_ciDescription:    read only
10662306a36Sopenharmony_ci                Decimal value of the lowest version of the userspace API
10762306a36Sopenharmony_ci                this kernel supports.
10862306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ciAFU configuration records (eg. /sys/class/cxl/afu0.0/cr0):
11262306a36Sopenharmony_ci
11362306a36Sopenharmony_ciAn AFU may optionally export one or more PCIe like configuration records, known
11462306a36Sopenharmony_cias AFU configuration records, which will show up here (if present).
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/cr<config num>/vendor
11762306a36Sopenharmony_ciDate:           February 2015
11862306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
11962306a36Sopenharmony_ciDescription:    read only
12062306a36Sopenharmony_ci		Hexadecimal value of the vendor ID found in this AFU
12162306a36Sopenharmony_ci		configuration record.
12262306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/cr<config num>/device
12562306a36Sopenharmony_ciDate:           February 2015
12662306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
12762306a36Sopenharmony_ciDescription:    read only
12862306a36Sopenharmony_ci		Hexadecimal value of the device ID found in this AFU
12962306a36Sopenharmony_ci		configuration record.
13062306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/cr<config num>/class
13362306a36Sopenharmony_ciDate:           February 2015
13462306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
13562306a36Sopenharmony_ciDescription:    read only
13662306a36Sopenharmony_ci		Hexadecimal value of the class code found in this AFU
13762306a36Sopenharmony_ci		configuration record.
13862306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>/cr<config num>/config
14162306a36Sopenharmony_ciDate:           February 2015
14262306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
14362306a36Sopenharmony_ciDescription:    read only
14462306a36Sopenharmony_ci		This binary file provides raw access to the AFU configuration
14562306a36Sopenharmony_ci		record. The format is expected to match the either the standard
14662306a36Sopenharmony_ci		or extended configuration space defined by the PCIe
14762306a36Sopenharmony_ci		specification.
14862306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ci
15262306a36Sopenharmony_ciMaster contexts (eg. /sys/class/cxl/afu0.0m)
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>m/mmio_size
15562306a36Sopenharmony_ciDate:           September 2014
15662306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
15762306a36Sopenharmony_ciDescription:    read only
15862306a36Sopenharmony_ci                Decimal value of the size of the MMIO space that may be mmapped
15962306a36Sopenharmony_ci                by userspace. This includes all slave contexts space also.
16062306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
16162306a36Sopenharmony_ci
16262306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>m/pp_mmio_len
16362306a36Sopenharmony_ciDate:           September 2014
16462306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
16562306a36Sopenharmony_ciDescription:    read only
16662306a36Sopenharmony_ci                Decimal value of the Per Process MMIO space length.
16762306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_ciWhat:           /sys/class/cxl/<afu>m/pp_mmio_off
17062306a36Sopenharmony_ciDate:           September 2014
17162306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
17262306a36Sopenharmony_ciDescription:    read only
17362306a36Sopenharmony_ci                (not in a guest)
17462306a36Sopenharmony_ci                Decimal value of the Per Process MMIO space offset.
17562306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ci
17862306a36Sopenharmony_ciCard info (eg. /sys/class/cxl/card0)
17962306a36Sopenharmony_ci
18062306a36Sopenharmony_ciWhat:           /sys/class/cxl/<card>/caia_version
18162306a36Sopenharmony_ciDate:           September 2014
18262306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
18362306a36Sopenharmony_ciDescription:    read only
18462306a36Sopenharmony_ci                Identifies the CAIA Version the card implements.
18562306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ciWhat:           /sys/class/cxl/<card>/psl_revision
18862306a36Sopenharmony_ciDate:           September 2014
18962306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
19062306a36Sopenharmony_ciDescription:    read only
19162306a36Sopenharmony_ci                Identifies the revision level of the PSL.
19262306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ciWhat:           /sys/class/cxl/<card>/base_image
19562306a36Sopenharmony_ciDate:           September 2014
19662306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
19762306a36Sopenharmony_ciDescription:    read only
19862306a36Sopenharmony_ci                (not in a guest)
19962306a36Sopenharmony_ci                Identifies the revision level of the base image for devices
20062306a36Sopenharmony_ci                that support loadable PSLs. For FPGAs this field identifies
20162306a36Sopenharmony_ci                the image contained in the on-adapter flash which is loaded
20262306a36Sopenharmony_ci                during the initial program load.
20362306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ciWhat:           /sys/class/cxl/<card>/image_loaded
20662306a36Sopenharmony_ciDate:           September 2014
20762306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
20862306a36Sopenharmony_ciDescription:    read only
20962306a36Sopenharmony_ci                (not in a guest)
21062306a36Sopenharmony_ci                Will return "user" or "factory" depending on the image loaded
21162306a36Sopenharmony_ci                onto the card.
21262306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ciWhat:           /sys/class/cxl/<card>/load_image_on_perst
21562306a36Sopenharmony_ciDate:           December 2014
21662306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
21762306a36Sopenharmony_ciDescription:    read/write
21862306a36Sopenharmony_ci                (not in a guest)
21962306a36Sopenharmony_ci                Valid entries are "none", "user", and "factory".
22062306a36Sopenharmony_ci                "none" means PERST will not cause image to be loaded to the
22162306a36Sopenharmony_ci                card.  A power cycle is required to load the image.
22262306a36Sopenharmony_ci                "none" could be useful for debugging because the trace arrays
22362306a36Sopenharmony_ci                are preserved.
22462306a36Sopenharmony_ci
22562306a36Sopenharmony_ci                "user" and "factory" means PERST will cause either the user or
22662306a36Sopenharmony_ci                user or factory image to be loaded.
22762306a36Sopenharmony_ci                Default is to reload on PERST whichever image the card has
22862306a36Sopenharmony_ci                loaded.
22962306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ciWhat:           /sys/class/cxl/<card>/reset
23262306a36Sopenharmony_ciDate:           October 2014
23362306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
23462306a36Sopenharmony_ciDescription:    write only
23562306a36Sopenharmony_ci                Writing 1 will issue a PERST to card provided there are no
23662306a36Sopenharmony_ci                contexts active on any one of the card AFUs. This may cause
23762306a36Sopenharmony_ci                the card to reload the FPGA depending on load_image_on_perst.
23862306a36Sopenharmony_ci                Writing -1 will do a force PERST irrespective of any active
23962306a36Sopenharmony_ci                contexts on the card AFUs.
24062306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ciWhat:		/sys/class/cxl/<card>/perst_reloads_same_image
24362306a36Sopenharmony_ciDate:		July 2015
24462306a36Sopenharmony_ciContact:	linuxppc-dev@lists.ozlabs.org
24562306a36Sopenharmony_ciDescription:	read/write
24662306a36Sopenharmony_ci                (not in a guest)
24762306a36Sopenharmony_ci		Trust that when an image is reloaded via PERST, it will not
24862306a36Sopenharmony_ci		have changed.
24962306a36Sopenharmony_ci
25062306a36Sopenharmony_ci		==  =================================================
25162306a36Sopenharmony_ci		0   don't trust, the image may be different (default)
25262306a36Sopenharmony_ci		1   trust that the image will not change.
25362306a36Sopenharmony_ci		==  =================================================
25462306a36Sopenharmony_ciUsers:		https://github.com/ibm-capi/libcxl
25562306a36Sopenharmony_ci
25662306a36Sopenharmony_ciWhat:           /sys/class/cxl/<card>/psl_timebase_synced
25762306a36Sopenharmony_ciDate:           March 2016
25862306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
25962306a36Sopenharmony_ciDescription:    read only
26062306a36Sopenharmony_ci                Returns 1 if the psl timebase register is synchronized
26162306a36Sopenharmony_ci                with the core timebase register, 0 otherwise.
26262306a36Sopenharmony_ciUsers:          https://github.com/ibm-capi/libcxl
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ciWhat:           /sys/class/cxl/<card>/tunneled_ops_supported
26562306a36Sopenharmony_ciDate:           May 2018
26662306a36Sopenharmony_ciContact:        linuxppc-dev@lists.ozlabs.org
26762306a36Sopenharmony_ciDescription:    read only
26862306a36Sopenharmony_ci                Returns 1 if tunneled operations are supported in capi mode,
26962306a36Sopenharmony_ci                0 otherwise.
27062306a36Sopenharmony_ciUsers:          https://github.com/ibm-capi/libcxl
271