Philippe Bergheaud | 49fd644 | 2014-12-12 11:28:53 +0100 | [diff] [blame] | 1 | Note: Attributes that are shared between devices are stored in the directory |
| 2 | pointed to by the symlink device/. |
| 3 | Example: The real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is |
| 4 | /sys/class/cxl/afu0.0s/device/irqs_max, i.e. /sys/class/cxl/afu0.0/irqs_max. |
| 5 | |
| 6 | |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 7 | Slave contexts (eg. /sys/class/cxl/afu0.0s): |
| 8 | |
| 9 | What: /sys/class/cxl/<afu>/irqs_max |
| 10 | Date: September 2014 |
| 11 | Contact: linuxppc-dev@lists.ozlabs.org |
| 12 | Description: read/write |
| 13 | Decimal value of maximum number of interrupts that can be |
| 14 | requested by userspace. The default on probe is the maximum |
| 15 | that hardware can support (eg. 2037). Write values will limit |
| 16 | userspace applications to that many userspace interrupts. Must |
| 17 | be >= irqs_min. |
| 18 | |
| 19 | What: /sys/class/cxl/<afu>/irqs_min |
| 20 | Date: September 2014 |
| 21 | Contact: linuxppc-dev@lists.ozlabs.org |
| 22 | Description: read only |
| 23 | Decimal value of the minimum number of interrupts that |
| 24 | userspace must request on a CXL_START_WORK ioctl. Userspace may |
| 25 | omit the num_interrupts field in the START_WORK IOCTL to get |
| 26 | this minimum automatically. |
| 27 | |
| 28 | What: /sys/class/cxl/<afu>/mmio_size |
| 29 | Date: September 2014 |
| 30 | Contact: linuxppc-dev@lists.ozlabs.org |
| 31 | Description: read only |
| 32 | Decimal value of the size of the MMIO space that may be mmaped |
| 33 | by userspace. |
| 34 | |
| 35 | What: /sys/class/cxl/<afu>/modes_supported |
| 36 | Date: September 2014 |
| 37 | Contact: linuxppc-dev@lists.ozlabs.org |
| 38 | Description: read only |
| 39 | List of the modes this AFU supports. One per line. |
| 40 | Valid entries are: "dedicated_process" and "afu_directed" |
| 41 | |
| 42 | What: /sys/class/cxl/<afu>/mode |
| 43 | Date: September 2014 |
| 44 | Contact: linuxppc-dev@lists.ozlabs.org |
| 45 | Description: read/write |
| 46 | The current mode the AFU is using. Will be one of the modes |
| 47 | given in modes_supported. Writing will change the mode |
| 48 | provided that no user contexts are attached. |
| 49 | |
| 50 | |
| 51 | What: /sys/class/cxl/<afu>/prefault_mode |
| 52 | Date: September 2014 |
| 53 | Contact: linuxppc-dev@lists.ozlabs.org |
| 54 | Description: read/write |
| 55 | Set the mode for prefaulting in segments into the segment table |
| 56 | when performing the START_WORK ioctl. Possible values: |
| 57 | none: No prefaulting (default) |
| 58 | work_element_descriptor: Treat the work element |
| 59 | descriptor as an effective address and |
| 60 | prefault what it points to. |
| 61 | all: all segments process calling START_WORK maps. |
| 62 | |
| 63 | What: /sys/class/cxl/<afu>/reset |
| 64 | Date: September 2014 |
| 65 | Contact: linuxppc-dev@lists.ozlabs.org |
| 66 | Description: write only |
| 67 | Writing 1 here will reset the AFU provided there are not |
| 68 | contexts active on the AFU. |
| 69 | |
| 70 | What: /sys/class/cxl/<afu>/api_version |
| 71 | Date: September 2014 |
| 72 | Contact: linuxppc-dev@lists.ozlabs.org |
| 73 | Description: read only |
| 74 | Decimal value of the current version of the kernel/user API. |
| 75 | |
Philippe Bergheaud | 49fd644 | 2014-12-12 11:28:53 +0100 | [diff] [blame] | 76 | What: /sys/class/cxl/<afu>/api_version_compatible |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 77 | Date: September 2014 |
| 78 | Contact: linuxppc-dev@lists.ozlabs.org |
| 79 | Description: read only |
| 80 | Decimal value of the the lowest version of the userspace API |
| 81 | this this kernel supports. |
| 82 | |
| 83 | |
Ian Munsie | b087e61 | 2015-02-04 19:09:01 +1100 | [diff] [blame] | 84 | AFU configuration records (eg. /sys/class/cxl/afu0.0/cr0): |
| 85 | |
| 86 | An AFU may optionally export one or more PCIe like configuration records, known |
| 87 | as AFU configuration records, which will show up here (if present). |
| 88 | |
| 89 | What: /sys/class/cxl/<afu>/cr<config num>/vendor |
| 90 | Date: February 2015 |
| 91 | Contact: linuxppc-dev@lists.ozlabs.org |
| 92 | Description: read only |
| 93 | Hexadecimal value of the vendor ID found in this AFU |
| 94 | configuration record. |
| 95 | |
| 96 | What: /sys/class/cxl/<afu>/cr<config num>/device |
| 97 | Date: February 2015 |
| 98 | Contact: linuxppc-dev@lists.ozlabs.org |
| 99 | Description: read only |
| 100 | Hexadecimal value of the device ID found in this AFU |
| 101 | configuration record. |
| 102 | |
Philippe Bergheaud | 52fd475 | 2015-03-26 11:46:56 +0100 | [diff] [blame] | 103 | What: /sys/class/cxl/<afu>/cr<config num>/class |
Ian Munsie | b087e61 | 2015-02-04 19:09:01 +1100 | [diff] [blame] | 104 | Date: February 2015 |
| 105 | Contact: linuxppc-dev@lists.ozlabs.org |
| 106 | Description: read only |
| 107 | Hexadecimal value of the class code found in this AFU |
| 108 | configuration record. |
| 109 | |
| 110 | What: /sys/class/cxl/<afu>/cr<config num>/config |
| 111 | Date: February 2015 |
| 112 | Contact: linuxppc-dev@lists.ozlabs.org |
| 113 | Description: read only |
| 114 | This binary file provides raw access to the AFU configuration |
| 115 | record. The format is expected to match the either the standard |
| 116 | or extended configuration space defined by the PCIe |
| 117 | specification. |
| 118 | |
| 119 | |
| 120 | |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 121 | Master contexts (eg. /sys/class/cxl/afu0.0m) |
| 122 | |
| 123 | What: /sys/class/cxl/<afu>m/mmio_size |
| 124 | Date: September 2014 |
| 125 | Contact: linuxppc-dev@lists.ozlabs.org |
| 126 | Description: read only |
| 127 | Decimal value of the size of the MMIO space that may be mmaped |
| 128 | by userspace. This includes all slave contexts space also. |
| 129 | |
| 130 | What: /sys/class/cxl/<afu>m/pp_mmio_len |
| 131 | Date: September 2014 |
| 132 | Contact: linuxppc-dev@lists.ozlabs.org |
| 133 | Description: read only |
| 134 | Decimal value of the Per Process MMIO space length. |
| 135 | |
| 136 | What: /sys/class/cxl/<afu>m/pp_mmio_off |
| 137 | Date: September 2014 |
| 138 | Contact: linuxppc-dev@lists.ozlabs.org |
| 139 | Description: read only |
| 140 | Decimal value of the Per Process MMIO space offset. |
| 141 | |
| 142 | |
| 143 | Card info (eg. /sys/class/cxl/card0) |
| 144 | |
| 145 | What: /sys/class/cxl/<card>/caia_version |
| 146 | Date: September 2014 |
| 147 | Contact: linuxppc-dev@lists.ozlabs.org |
| 148 | Description: read only |
| 149 | Identifies the CAIA Version the card implements. |
| 150 | |
Philippe Bergheaud | 49fd644 | 2014-12-12 11:28:53 +0100 | [diff] [blame] | 151 | What: /sys/class/cxl/<card>/psl_revision |
Ian Munsie | a9282d0 | 2014-10-08 19:55:05 +1100 | [diff] [blame] | 152 | Date: September 2014 |
| 153 | Contact: linuxppc-dev@lists.ozlabs.org |
| 154 | Description: read only |
| 155 | Identifies the revision level of the PSL. |
| 156 | |
| 157 | What: /sys/class/cxl/<card>/base_image |
| 158 | Date: September 2014 |
| 159 | Contact: linuxppc-dev@lists.ozlabs.org |
| 160 | Description: read only |
| 161 | Identifies the revision level of the base image for devices |
| 162 | that support loadable PSLs. For FPGAs this field identifies |
| 163 | the image contained in the on-adapter flash which is loaded |
| 164 | during the initial program load. |
| 165 | |
| 166 | What: /sys/class/cxl/<card>/image_loaded |
| 167 | Date: September 2014 |
| 168 | Contact: linuxppc-dev@lists.ozlabs.org |
| 169 | Description: read only |
| 170 | Will return "user" or "factory" depending on the image loaded |
| 171 | onto the card. |
Ryan Grimm | 95bc11b | 2015-01-19 11:52:49 -0600 | [diff] [blame] | 172 | |
| 173 | What: /sys/class/cxl/<card>/load_image_on_perst |
| 174 | Date: December 2014 |
| 175 | Contact: linuxppc-dev@lists.ozlabs.org |
| 176 | Description: read/write |
| 177 | Valid entries are "none", "user", and "factory". |
| 178 | "none" means PERST will not cause image to be loaded to the |
| 179 | card. A power cycle is required to load the image. |
| 180 | "none" could be useful for debugging because the trace arrays |
| 181 | are preserved. |
| 182 | "user" and "factory" means PERST will cause either the user or |
| 183 | user or factory image to be loaded. |
| 184 | Default is to reload on PERST whichever image the card has |
| 185 | loaded. |
Ryan Grimm | 62fa19d | 2015-01-19 11:52:51 -0600 | [diff] [blame] | 186 | |
| 187 | What: /sys/class/cxl/<card>/reset |
| 188 | Date: October 2014 |
| 189 | Contact: linuxppc-dev@lists.ozlabs.org |
| 190 | Description: write only |
| 191 | Writing 1 will issue a PERST to card which may cause the card |
| 192 | to reload the FPGA depending on load_image_on_perst. |