GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / ABI / testing / debugfs-driver-habanalabs
1 What:           /sys/kernel/debug/habanalabs/hl<n>/addr
2 Date:           Jan 2019
3 KernelVersion:  5.1
4 Contact:        ogabbay@kernel.org
5 Description:    Sets the device address to be used for read or write through
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"
10
11 What:           /sys/kernel/debug/habanalabs/hl<n>/clk_gate
12 Date:           May 2020
13 KernelVersion:  5.8
14 Contact:        ogabbay@kernel.org
15 Description:    This setting is now deprecated as clock gating is handled solely by the f/w
16
17 What:           /sys/kernel/debug/habanalabs/hl<n>/command_buffers
18 Date:           Jan 2019
19 KernelVersion:  5.1
20 Contact:        ogabbay@kernel.org
21 Description:    Displays a list with information about the currently allocated
22                 command buffers
23
24 What:           /sys/kernel/debug/habanalabs/hl<n>/command_submission
25 Date:           Jan 2019
26 KernelVersion:  5.1
27 Contact:        ogabbay@kernel.org
28 Description:    Displays a list with information about the currently active
29                 command submissions
30
31 What:           /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs
32 Date:           Jan 2019
33 KernelVersion:  5.1
34 Contact:        ogabbay@kernel.org
35 Description:    Displays a list with detailed information about each JOB (CB) of
36                 each active command submission
37
38 What:           /sys/kernel/debug/habanalabs/hl<n>/data32
39 Date:           Jan 2019
40 KernelVersion:  5.1
41 Contact:        ogabbay@kernel.org
42 Description:    Allows the root user to read or write directly through the
43                 device's PCI bar. Writing to this file generates a write
44                 transaction while reading from the file generates a read
45                 transaction. This custom interface is needed (instead of using
46                 the generic Linux user-space PCI mapping) because the DDR bar
47                 is very small compared to the DDR memory and only the driver can
48                 move the bar before and after the transaction.
49
50                 If the IOMMU is disabled, it also allows the root user to read
51                 or write from the host a device VA of a host mapped memory
52
53 What:           /sys/kernel/debug/habanalabs/hl<n>/data64
54 Date:           Jan 2020
55 KernelVersion:  5.6
56 Contact:        ogabbay@kernel.org
57 Description:    Allows the root user to read or write 64 bit data directly
58                 through the device's PCI bar. Writing to this file generates a
59                 write transaction while reading from the file generates a read
60                 transaction. This custom interface is needed (instead of using
61                 the generic Linux user-space PCI mapping) because the DDR bar
62                 is very small compared to the DDR memory and only the driver can
63                 move the bar before and after the transaction.
64
65                 If the IOMMU is disabled, it also allows the root user to read
66                 or write from the host a device VA of a host mapped memory
67
68 What:           /sys/kernel/debug/habanalabs/hl<n>/data_dma
69 Date:           Apr 2021
70 KernelVersion:  5.13
71 Contact:        ogabbay@kernel.org
72 Description:    Allows the root user to read from the device's internal
73                 memory (DRAM/SRAM) through a DMA engine.
74                 This property is a binary blob that contains the result of the
75                 DMA transfer.
76                 This custom interface is needed (instead of using the generic
77                 Linux user-space PCI mapping) because the amount of internal
78                 memory is huge (>32GB) and reading it via the PCI bar will take
79                 a very long time.
80                 This interface doesn't support concurrency in the same device.
81                 In GAUDI and GOYA, this action can cause undefined behavior
82                 in case the it is done while the device is executing user
83                 workloads.
84                 Only supported on GAUDI at this stage.
85
86 What:           /sys/kernel/debug/habanalabs/hl<n>/device
87 Date:           Jan 2019
88 KernelVersion:  5.1
89 Contact:        ogabbay@kernel.org
90 Description:    Enables the root user to set the device to specific state.
91                 Valid values are "disable", "enable", "suspend", "resume".
92                 User can read this property to see the valid values
93
94 What:           /sys/kernel/debug/habanalabs/hl<n>/dma_size
95 Date:           Apr 2021
96 KernelVersion:  5.13
97 Contact:        ogabbay@kernel.org
98 Description:    Specify the size of the DMA transaction when using DMA to read
99                 from the device's internal memory. The value can not be larger
100                 than 128MB. Writing to this value initiates the DMA transfer.
101                 When the write is finished, the user can read the "data_dma"
102                 blob
103
104 What:           /sys/kernel/debug/habanalabs/hl<n>/dump_razwi_events
105 Date:           Aug 2022
106 KernelVersion:  5.20
107 Contact:        fkassabri@habana.ai
108 Description:    Dumps all razwi events to dmesg if exist.
109                 After reading the status register of an existing event
110                 the routine will clear the status register.
111                 Usage: cat dump_razwi_events
112
113 What:           /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations
114 Date:           Jan 2021
115 KernelVersion:  5.12
116 Contact:        ogabbay@kernel.org
117 Description:    Dumps all security violations to dmesg. This will also ack
118                 all security violations meanings those violations will not be
119                 dumped next time user calls this API
120
121 What:           /sys/kernel/debug/habanalabs/hl<n>/engines
122 Date:           Jul 2019
123 KernelVersion:  5.3
124 Contact:        ogabbay@kernel.org
125 Description:    Displays the status registers values of the device engines and
126                 their derived idle status
127
128 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
129 Date:           Jan 2019
130 KernelVersion:  5.1
131 Contact:        ogabbay@kernel.org
132 Description:    Sets I2C device address for I2C transaction that is generated
133                 by the device's CPU, Not available when device is loaded with secured
134                 firmware
135
136 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_bus
137 Date:           Jan 2019
138 KernelVersion:  5.1
139 Contact:        ogabbay@kernel.org
140 Description:    Sets I2C bus address for I2C transaction that is generated by
141                 the device's CPU, Not available when device is loaded with secured
142                 firmware
143
144 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_data
145 Date:           Jan 2019
146 KernelVersion:  5.1
147 Contact:        ogabbay@kernel.org
148 Description:    Triggers an I2C transaction that is generated by the device's
149                 CPU. Writing to this file generates a write transaction while
150                 reading from the file generates a read transaction, Not available
151                 when device is loaded with secured firmware
152
153 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_len
154 Date:           Dec 2021
155 KernelVersion:  5.17
156 Contact:        obitton@habana.ai
157 Description:    Sets I2C length in bytes for I2C transaction that is generated by
158                 the device's CPU, Not available when device is loaded with secured
159                 firmware
160
161 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
162 Date:           Jan 2019
163 KernelVersion:  5.1
164 Contact:        ogabbay@kernel.org
165 Description:    Sets I2C register id for I2C transaction that is generated by
166                 the device's CPU, Not available when device is loaded with secured
167                 firmware
168
169 What:           /sys/kernel/debug/habanalabs/hl<n>/led0
170 Date:           Jan 2019
171 KernelVersion:  5.1
172 Contact:        ogabbay@kernel.org
173 Description:    Sets the state of the first S/W led on the device, Not available
174                 when device is loaded with secured firmware
175
176 What:           /sys/kernel/debug/habanalabs/hl<n>/led1
177 Date:           Jan 2019
178 KernelVersion:  5.1
179 Contact:        ogabbay@kernel.org
180 Description:    Sets the state of the second S/W led on the device, Not available
181                 when device is loaded with secured firmware
182
183 What:           /sys/kernel/debug/habanalabs/hl<n>/led2
184 Date:           Jan 2019
185 KernelVersion:  5.1
186 Contact:        ogabbay@kernel.org
187 Description:    Sets the state of the third S/W led on the device, Not available
188                 when device is loaded with secured firmware
189
190 What:           /sys/kernel/debug/habanalabs/hl<n>/memory_scrub
191 Date:           May 2022
192 KernelVersion:  5.19
193 Contact:        dhirschfeld@habana.ai
194 Description:    Allows the root user to scrub the dram memory. The scrubbing
195                 value can be set using the debugfs file memory_scrub_val.
196
197 What:           /sys/kernel/debug/habanalabs/hl<n>/memory_scrub_val
198 Date:           May 2022
199 KernelVersion:  5.19
200 Contact:        dhirschfeld@habana.ai
201 Description:    The value to which the dram will be set to when the user
202                 scrubs the dram using 'memory_scrub' debugfs file and
203                 the scrubbing value when using module param 'memory_scrub'
204
205 What:           /sys/kernel/debug/habanalabs/hl<n>/mmu
206 Date:           Jan 2019
207 KernelVersion:  5.1
208 Contact:        ogabbay@kernel.org
209 Description:    Displays the hop values and physical address for a given ASID
210                 and virtual address. The user should write the ASID and VA into
211                 the file and then read the file to get the result.
212                 e.g. to display info about VA 0x1000 for ASID 1 you need to do:
213                 echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
214
215 What:           /sys/kernel/debug/habanalabs/hl<n>/mmu_error
216 Date:           Mar 2021
217 KernelVersion:  5.12
218 Contact:        fkassabri@habana.ai
219 Description:    Check and display page fault or access violation mmu errors for
220                 all MMUs specified in mmu_cap_mask.
221                 e.g. to display error info for MMU hw cap bit 9, you need to do:
222                 echo "0x200" > /sys/kernel/debug/habanalabs/hl0/mmu_error
223                 cat /sys/kernel/debug/habanalabs/hl0/mmu_error
224
225 What:           /sys/kernel/debug/habanalabs/hl<n>/monitor_dump
226 Date:           Mar 2022
227 KernelVersion:  5.19
228 Contact:        osharabi@habana.ai
229 Description:    Allows the root user to dump monitors status from the device's
230                 protected config space.
231                 This property is a binary blob that contains the result of the
232                 monitors registers dump.
233                 This custom interface is needed (instead of using the generic
234                 Linux user-space PCI mapping) because this space is protected
235                 and cannot be accessed using PCI read.
236                 This interface doesn't support concurrency in the same device.
237                 Only supported on GAUDI.
238
239 What:           /sys/kernel/debug/habanalabs/hl<n>/monitor_dump_trig
240 Date:           Mar 2022
241 KernelVersion:  5.19
242 Contact:        osharabi@habana.ai
243 Description:    Triggers dump of monitor data. The value to trigger the operation
244                 must be 1. Triggering the monitor dump operation initiates dump of
245                 current registers values of all monitors.
246                 When the write is finished, the user can read the "monitor_dump"
247                 blob
248
249 What:           /sys/kernel/debug/habanalabs/hl<n>/set_power_state
250 Date:           Jan 2019
251 KernelVersion:  5.1
252 Contact:        ogabbay@kernel.org
253 Description:    Sets the PCI power state. Valid values are "1" for D0 and "2"
254                 for D3Hot
255
256 What:           /sys/kernel/debug/habanalabs/hl<n>/skip_reset_on_timeout
257 Date:           Jun 2021
258 KernelVersion:  5.13
259 Contact:        ynudelman@habana.ai
260 Description:    Sets the skip reset on timeout option for the device. Value of
261                 "0" means device will be reset in case some CS has timed out,
262                 otherwise it will not be reset.
263
264 What:           /sys/kernel/debug/habanalabs/hl<n>/state_dump
265 Date:           Oct 2021
266 KernelVersion:  5.15
267 Contact:        ynudelman@habana.ai
268 Description:    Gets the state dump occurring on a CS timeout or failure.
269                 State dump is used for debug and is created each time in case of
270                 a problem in a CS execution, before reset.
271                 Reading from the node returns the newest state dump available.
272                 Writing an integer X discards X state dumps, so that the
273                 next read would return X+1-st newest state dump.
274
275 What:           /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
276 Date:           Mar 2020
277 KernelVersion:  5.6
278 Contact:        ogabbay@kernel.org
279 Description:    Sets the stop-on_error option for the device engines. Value of
280                 "0" is for disable, otherwise enable.
281                 Relevant only for GOYA and GAUDI.
282
283 What:           /sys/kernel/debug/habanalabs/hl<n>/timeout_locked
284 Date:           Sep 2021
285 KernelVersion:  5.16
286 Contact:        obitton@habana.ai
287 Description:    Sets the command submission timeout value in seconds.
288
289 What:           /sys/kernel/debug/habanalabs/hl<n>/userptr
290 Date:           Jan 2019
291 KernelVersion:  5.1
292 Contact:        ogabbay@kernel.org
293 Description:    Displays a list with information about the currently user
294                 pointers (user virtual addresses) that are pinned and mapped
295                 to DMA addresses
296
297 What:           /sys/kernel/debug/habanalabs/hl<n>/userptr_lookup
298 Date:           Oct 2021
299 KernelVersion:  5.15
300 Contact:        ogabbay@kernel.org
301 Description:    Allows to search for specific user pointers (user virtual
302                 addresses) that are pinned and mapped to DMA addresses, and see
303                 their resolution to the specific dma address.
304
305 What:           /sys/kernel/debug/habanalabs/hl<n>/vm
306 Date:           Jan 2019
307 KernelVersion:  5.1
308 Contact:        ogabbay@kernel.org
309 Description:    Displays a list with information about all the active virtual
310                 address mappings per ASID and all user mappings of HW blocks