Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 1 | What: /sys/kernel/debug/habanalabs/hl<n>/addr |
| 2 | Date: Jan 2019 |
| 3 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 4 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 5 | Description: Sets the device address to be used for read or write through |
Tomer Tayar | 4a0ce77 | 2019-06-16 13:48:29 +0000 | [diff] [blame] | 6 | PCI bar, or the device VA of a host mapped memory to be read or |
| 7 | written directly from the host. The latter option is allowed |
| 8 | only when the IOMMU is disabled. |
| 9 | The acceptable value is a string that starts with "0x" |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 10 | |
Oded Gabbay | ca62433 | 2020-05-09 12:17:21 +0300 | [diff] [blame] | 11 | What: /sys/kernel/debug/habanalabs/hl<n>/clk_gate |
| 12 | Date: May 2020 |
| 13 | KernelVersion: 5.8 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 14 | Contact: ogabbay@kernel.org |
Oded Gabbay | ca62433 | 2020-05-09 12:17:21 +0300 | [diff] [blame] | 15 | Description: Allow the root user to disable/enable in runtime the clock |
| 16 | gating mechanism in Gaudi. Due to how Gaudi is built, the |
| 17 | clock gating needs to be disabled in order to access the |
| 18 | registers of the TPC and MME engines. This is sometimes needed |
Oded Gabbay | e38bfd3 | 2020-07-03 20:46:12 +0300 | [diff] [blame] | 19 | during debug by the user and hence the user needs this option. |
| 20 | The user can supply a bitmask value, each bit represents |
| 21 | a different engine to disable/enable its clock gating feature. |
| 22 | The bitmask is composed of 20 bits: |
Mauro Carvalho Chehab | 54a19b4 | 2020-10-30 08:40:50 +0100 | [diff] [blame] | 23 | |
Tomer Tayar | a9ecddb | 2021-11-14 09:29:48 +0200 | [diff] [blame] | 24 | ======= ============ |
Mauro Carvalho Chehab | 54a19b4 | 2020-10-30 08:40:50 +0100 | [diff] [blame] | 25 | 0 - 7 DMA channels |
| 26 | 8 - 11 MME engines |
| 27 | 12 - 19 TPC engines |
Tomer Tayar | a9ecddb | 2021-11-14 09:29:48 +0200 | [diff] [blame] | 28 | ======= ============ |
Mauro Carvalho Chehab | 54a19b4 | 2020-10-30 08:40:50 +0100 | [diff] [blame] | 29 | |
Oded Gabbay | e38bfd3 | 2020-07-03 20:46:12 +0300 | [diff] [blame] | 30 | The bit's location of a specific engine can be determined |
| 31 | using (1 << GAUDI_ENGINE_ID_*). GAUDI_ENGINE_ID_* values |
| 32 | are defined in uapi habanalabs.h file in enum gaudi_engine_id |
Oded Gabbay | ca62433 | 2020-05-09 12:17:21 +0300 | [diff] [blame] | 33 | |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 34 | What: /sys/kernel/debug/habanalabs/hl<n>/command_buffers |
| 35 | Date: Jan 2019 |
| 36 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 37 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 38 | Description: Displays a list with information about the currently allocated |
| 39 | command buffers |
| 40 | |
| 41 | What: /sys/kernel/debug/habanalabs/hl<n>/command_submission |
| 42 | Date: Jan 2019 |
| 43 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 44 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 45 | Description: Displays a list with information about the currently active |
| 46 | command submissions |
| 47 | |
| 48 | What: /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs |
| 49 | Date: Jan 2019 |
| 50 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 51 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 52 | Description: Displays a list with detailed information about each JOB (CB) of |
| 53 | each active command submission |
| 54 | |
| 55 | What: /sys/kernel/debug/habanalabs/hl<n>/data32 |
| 56 | Date: Jan 2019 |
| 57 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 58 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 59 | Description: Allows the root user to read or write directly through the |
| 60 | device's PCI bar. Writing to this file generates a write |
| 61 | transaction while reading from the file generates a read |
Tomer Tayar | 4a0ce77 | 2019-06-16 13:48:29 +0000 | [diff] [blame] | 62 | transaction. This custom interface is needed (instead of using |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 63 | the generic Linux user-space PCI mapping) because the DDR bar |
| 64 | is very small compared to the DDR memory and only the driver can |
Tomer Tayar | 4a0ce77 | 2019-06-16 13:48:29 +0000 | [diff] [blame] | 65 | move the bar before and after the transaction. |
Mauro Carvalho Chehab | 54a19b4 | 2020-10-30 08:40:50 +0100 | [diff] [blame] | 66 | |
Tomer Tayar | 4a0ce77 | 2019-06-16 13:48:29 +0000 | [diff] [blame] | 67 | If the IOMMU is disabled, it also allows the root user to read |
| 68 | or write from the host a device VA of a host mapped memory |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 69 | |
Moti Haimovski | 5cce514 | 2019-11-12 09:40:11 +0200 | [diff] [blame] | 70 | What: /sys/kernel/debug/habanalabs/hl<n>/data64 |
| 71 | Date: Jan 2020 |
| 72 | KernelVersion: 5.6 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 73 | Contact: ogabbay@kernel.org |
Moti Haimovski | 5cce514 | 2019-11-12 09:40:11 +0200 | [diff] [blame] | 74 | Description: Allows the root user to read or write 64 bit data directly |
| 75 | through the device's PCI bar. Writing to this file generates a |
| 76 | write transaction while reading from the file generates a read |
| 77 | transaction. This custom interface is needed (instead of using |
| 78 | the generic Linux user-space PCI mapping) because the DDR bar |
| 79 | is very small compared to the DDR memory and only the driver can |
| 80 | move the bar before and after the transaction. |
Mauro Carvalho Chehab | 54a19b4 | 2020-10-30 08:40:50 +0100 | [diff] [blame] | 81 | |
Moti Haimovski | 5cce514 | 2019-11-12 09:40:11 +0200 | [diff] [blame] | 82 | If the IOMMU is disabled, it also allows the root user to read |
| 83 | or write from the host a device VA of a host mapped memory |
| 84 | |
Oded Gabbay | 639781d | 2021-04-02 01:43:18 +0300 | [diff] [blame] | 85 | What: /sys/kernel/debug/habanalabs/hl<n>/data_dma |
| 86 | Date: Apr 2021 |
| 87 | KernelVersion: 5.13 |
| 88 | Contact: ogabbay@kernel.org |
| 89 | Description: Allows the root user to read from the device's internal |
| 90 | memory (DRAM/SRAM) through a DMA engine. |
| 91 | This property is a binary blob that contains the result of the |
| 92 | DMA transfer. |
| 93 | This custom interface is needed (instead of using the generic |
| 94 | Linux user-space PCI mapping) because the amount of internal |
| 95 | memory is huge (>32GB) and reading it via the PCI bar will take |
| 96 | a very long time. |
| 97 | This interface doesn't support concurrency in the same device. |
| 98 | In GAUDI and GOYA, this action can cause undefined behavior |
| 99 | in case the it is done while the device is executing user |
| 100 | workloads. |
| 101 | Only supported on GAUDI at this stage. |
| 102 | |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 103 | What: /sys/kernel/debug/habanalabs/hl<n>/device |
| 104 | Date: Jan 2019 |
| 105 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 106 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 107 | Description: Enables the root user to set the device to specific state. |
| 108 | Valid values are "disable", "enable", "suspend", "resume". |
| 109 | User can read this property to see the valid values |
| 110 | |
Oded Gabbay | 639781d | 2021-04-02 01:43:18 +0300 | [diff] [blame] | 111 | What: /sys/kernel/debug/habanalabs/hl<n>/dma_size |
| 112 | Date: Apr 2021 |
| 113 | KernelVersion: 5.13 |
| 114 | Contact: ogabbay@kernel.org |
| 115 | Description: Specify the size of the DMA transaction when using DMA to read |
| 116 | from the device's internal memory. The value can not be larger |
| 117 | than 128MB. Writing to this value initiates the DMA transfer. |
| 118 | When the write is finished, the user can read the "data_dma" |
| 119 | blob |
| 120 | |
| 121 | What: /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations |
| 122 | Date: Jan 2021 |
| 123 | KernelVersion: 5.12 |
| 124 | Contact: ogabbay@kernel.org |
| 125 | Description: Dumps all security violations to dmesg. This will also ack |
| 126 | all security violations meanings those violations will not be |
| 127 | dumped next time user calls this API |
| 128 | |
Tomer Tayar | 06deb86 | 2019-07-01 13:59:45 +0000 | [diff] [blame] | 129 | What: /sys/kernel/debug/habanalabs/hl<n>/engines |
| 130 | Date: Jul 2019 |
| 131 | KernelVersion: 5.3 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 132 | Contact: ogabbay@kernel.org |
Tomer Tayar | 06deb86 | 2019-07-01 13:59:45 +0000 | [diff] [blame] | 133 | Description: Displays the status registers values of the device engines and |
| 134 | their derived idle status |
| 135 | |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 136 | What: /sys/kernel/debug/habanalabs/hl<n>/i2c_addr |
| 137 | Date: Jan 2019 |
| 138 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 139 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 140 | Description: Sets I2C device address for I2C transaction that is generated |
| 141 | by the device's CPU |
| 142 | |
| 143 | What: /sys/kernel/debug/habanalabs/hl<n>/i2c_bus |
| 144 | Date: Jan 2019 |
| 145 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 146 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 147 | Description: Sets I2C bus address for I2C transaction that is generated by |
| 148 | the device's CPU |
| 149 | |
| 150 | What: /sys/kernel/debug/habanalabs/hl<n>/i2c_data |
| 151 | Date: Jan 2019 |
| 152 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 153 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 154 | Description: Triggers an I2C transaction that is generated by the device's |
| 155 | CPU. Writing to this file generates a write transaction while |
Carlos Bilbao | 3e42d1d | 2021-05-13 09:31:10 -0400 | [diff] [blame] | 156 | reading from the file generates a read transaction |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 157 | |
Ofir Bitton | 3eb7754 | 2021-10-12 20:52:46 +0300 | [diff] [blame] | 158 | What: /sys/kernel/debug/habanalabs/hl<n>/i2c_len |
| 159 | Date: Dec 2021 |
| 160 | KernelVersion: 5.17 |
| 161 | Contact: obitton@habana.ai |
| 162 | Description: Sets I2C length in bytes for I2C transaction that is generated by |
| 163 | the device's CPU |
| 164 | |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 165 | What: /sys/kernel/debug/habanalabs/hl<n>/i2c_reg |
| 166 | Date: Jan 2019 |
| 167 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 168 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 169 | Description: Sets I2C register id for I2C transaction that is generated by |
| 170 | the device's CPU |
| 171 | |
| 172 | What: /sys/kernel/debug/habanalabs/hl<n>/led0 |
| 173 | Date: Jan 2019 |
| 174 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 175 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 176 | Description: Sets the state of the first S/W led on the device |
| 177 | |
| 178 | What: /sys/kernel/debug/habanalabs/hl<n>/led1 |
| 179 | Date: Jan 2019 |
| 180 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 181 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 182 | Description: Sets the state of the second S/W led on the device |
| 183 | |
| 184 | What: /sys/kernel/debug/habanalabs/hl<n>/led2 |
| 185 | Date: Jan 2019 |
| 186 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 187 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 188 | Description: Sets the state of the third S/W led on the device |
| 189 | |
| 190 | What: /sys/kernel/debug/habanalabs/hl<n>/mmu |
| 191 | Date: Jan 2019 |
| 192 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 193 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 194 | Description: Displays the hop values and physical address for a given ASID |
| 195 | and virtual address. The user should write the ASID and VA into |
| 196 | the file and then read the file to get the result. |
| 197 | e.g. to display info about VA 0x1000 for ASID 1 you need to do: |
| 198 | echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu |
| 199 | |
Oded Gabbay | 639781d | 2021-04-02 01:43:18 +0300 | [diff] [blame] | 200 | What: /sys/kernel/debug/habanalabs/hl<n>/mmu_error |
| 201 | Date: Mar 2021 |
| 202 | KernelVersion: 5.12 |
| 203 | Contact: fkassabri@habana.ai |
| 204 | Description: Check and display page fault or access violation mmu errors for |
| 205 | all MMUs specified in mmu_cap_mask. |
| 206 | e.g. to display error info for MMU hw cap bit 9, you need to do: |
| 207 | echo "0x200" > /sys/kernel/debug/habanalabs/hl0/mmu_error |
| 208 | cat /sys/kernel/debug/habanalabs/hl0/mmu_error |
| 209 | |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 210 | What: /sys/kernel/debug/habanalabs/hl<n>/set_power_state |
| 211 | Date: Jan 2019 |
| 212 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 213 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 214 | Description: Sets the PCI power state. Valid values are "1" for D0 and "2" |
| 215 | for D3Hot |
| 216 | |
Yuri Nudelman | 4d04121 | 2021-06-13 09:22:20 +0300 | [diff] [blame] | 217 | What: /sys/kernel/debug/habanalabs/hl<n>/skip_reset_on_timeout |
| 218 | Date: Jun 2021 |
| 219 | KernelVersion: 5.13 |
| 220 | Contact: ynudelman@habana.ai |
| 221 | Description: Sets the skip reset on timeout option for the device. Value of |
| 222 | "0" means device will be reset in case some CS has timed out, |
| 223 | otherwise it will not be reset. |
| 224 | |
Yuri Nudelman | 938b793 | 2021-06-06 10:28:51 +0300 | [diff] [blame] | 225 | What: /sys/kernel/debug/habanalabs/hl<n>/state_dump |
| 226 | Date: Oct 2021 |
| 227 | KernelVersion: 5.15 |
| 228 | Contact: ynudelman@habana.ai |
| 229 | Description: Gets the state dump occurring on a CS timeout or failure. |
| 230 | State dump is used for debug and is created each time in case of |
| 231 | a problem in a CS execution, before reset. |
| 232 | Reading from the node returns the newest state dump available. |
| 233 | Writing an integer X discards X state dumps, so that the |
| 234 | next read would return X+1-st newest state dump. |
| 235 | |
Oded Gabbay | 639781d | 2021-04-02 01:43:18 +0300 | [diff] [blame] | 236 | What: /sys/kernel/debug/habanalabs/hl<n>/stop_on_err |
| 237 | Date: Mar 2020 |
| 238 | KernelVersion: 5.6 |
| 239 | Contact: ogabbay@kernel.org |
| 240 | Description: Sets the stop-on_error option for the device engines. Value of |
| 241 | "0" is for disable, otherwise enable. |
| 242 | |
Tomer Tayar | a9ecddb | 2021-11-14 09:29:48 +0200 | [diff] [blame] | 243 | What: /sys/kernel/debug/habanalabs/hl<n>/timeout_locked |
| 244 | Date: Sep 2021 |
| 245 | KernelVersion: 5.16 |
| 246 | Contact: obitton@habana.ai |
| 247 | Description: Sets the command submission timeout value in seconds. |
| 248 | |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 249 | What: /sys/kernel/debug/habanalabs/hl<n>/userptr |
| 250 | Date: Jan 2019 |
| 251 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 252 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 253 | Description: Displays a list with information about the currently user |
| 254 | pointers (user virtual addresses) that are pinned and mapped |
| 255 | to DMA addresses |
| 256 | |
Yuri Nudelman | 89b2136 | 2021-07-29 11:44:28 +0300 | [diff] [blame] | 257 | What: /sys/kernel/debug/habanalabs/hl<n>/userptr_lookup |
| 258 | Date: Aug 2021 |
| 259 | KernelVersion: 5.15 |
| 260 | Contact: ogabbay@kernel.org |
| 261 | Description: Allows to search for specific user pointers (user virtual |
| 262 | addresses) that are pinned and mapped to DMA addresses, and see |
| 263 | their resolution to the specific dma address. |
| 264 | |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 265 | What: /sys/kernel/debug/habanalabs/hl<n>/vm |
| 266 | Date: Jan 2019 |
| 267 | KernelVersion: 5.1 |
Oded Gabbay | 2f8db5a | 2021-01-12 15:13:06 +0200 | [diff] [blame] | 268 | Contact: ogabbay@kernel.org |
Oded Gabbay | c216477 | 2019-02-16 00:39:24 +0200 | [diff] [blame] | 269 | Description: Displays a list with information about all the active virtual |
Sagiv Ozeri | a4371c1 | 2021-02-23 11:01:08 +0200 | [diff] [blame] | 270 | address mappings per ASID and all user mappings of HW blocks |