summaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/testing/debugfs-driver-habanalabs
blob: 042fd125fbc96a8dd1502480b3b7732a9382976c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
What:           /sys/kernel/debug/accel/<n>/addr
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Sets the device address to be used for read or write through
                PCI bar, or the device VA of a host mapped memory to be read or
                written directly from the host. The latter option is allowed
                only when the IOMMU is disabled.
                The acceptable value is a string that starts with "0x"

What:           /sys/kernel/debug/accel/<n>/clk_gate
Date:           May 2020
KernelVersion:  5.8
Contact:        ogabbay@kernel.org
Description:    This setting is now deprecated as clock gating is handled solely by the f/w

What:           /sys/kernel/debug/accel/<n>/command_buffers
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Displays a list with information about the currently allocated
                command buffers

What:           /sys/kernel/debug/accel/<n>/command_submission
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Displays a list with information about the currently active
                command submissions

What:           /sys/kernel/debug/accel/<n>/command_submission_jobs
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Displays a list with detailed information about each JOB (CB) of
                each active command submission

What:           /sys/kernel/debug/accel/<n>/data32
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Allows the root user to read or write directly through the
                device's PCI bar. Writing to this file generates a write
                transaction while reading from the file generates a read
                transaction. This custom interface is needed (instead of using
                the generic Linux user-space PCI mapping) because the DDR bar
                is very small compared to the DDR memory and only the driver can
                move the bar before and after the transaction.

                If the IOMMU is disabled, it also allows the root user to read
                or write from the host a device VA of a host mapped memory

What:           /sys/kernel/debug/accel/<n>/data64
Date:           Jan 2020
KernelVersion:  5.6
Contact:        ogabbay@kernel.org
Description:    Allows the root user to read or write 64 bit data directly
                through the device's PCI bar. Writing to this file generates a
                write transaction while reading from the file generates a read
                transaction. This custom interface is needed (instead of using
                the generic Linux user-space PCI mapping) because the DDR bar
                is very small compared to the DDR memory and only the driver can
                move the bar before and after the transaction.

                If the IOMMU is disabled, it also allows the root user to read
                or write from the host a device VA of a host mapped memory

What:           /sys/kernel/debug/accel/<n>/data_dma
Date:           Apr 2021
KernelVersion:  5.13
Contact:        ogabbay@kernel.org
Description:    Allows the root user to read from the device's internal
                memory (DRAM/SRAM) through a DMA engine.
                This property is a binary blob that contains the result of the
                DMA transfer.
                This custom interface is needed (instead of using the generic
                Linux user-space PCI mapping) because the amount of internal
                memory is huge (>32GB) and reading it via the PCI bar will take
                a very long time.
                This interface doesn't support concurrency in the same device.
                In GAUDI and GOYA, this action can cause undefined behavior
                in case it is done while the device is executing user
                workloads.
                Only supported on GAUDI at this stage.

What:           /sys/kernel/debug/accel/<n>/device
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Enables the root user to set the device to specific state.
                Valid values are "disable", "enable", "suspend", "resume".
                User can read this property to see the valid values

What:           /sys/kernel/debug/accel/<n>/device_release_watchdog_timeout
Date:           Oct 2022
KernelVersion:  6.2
Contact:        ttayar@habana.ai
Description:    The watchdog timeout value in seconds for a device release upon
                certain error cases, after which the device is reset.

What:           /sys/kernel/debug/accel/<n>/dma_size
Date:           Apr 2021
KernelVersion:  5.13
Contact:        ogabbay@kernel.org
Description:    Specify the size of the DMA transaction when using DMA to read
                from the device's internal memory. The value can not be larger
                than 128MB. Writing to this value initiates the DMA transfer.
                When the write is finished, the user can read the "data_dma"
                blob

What:           /sys/kernel/debug/accel/<n>/dump_razwi_events
Date:           Aug 2022
KernelVersion:  5.20
Contact:        fkassabri@habana.ai
Description:    Dumps all razwi events to dmesg if exist.
                After reading the status register of an existing event
                the routine will clear the status register.
                Usage: cat dump_razwi_events

What:           /sys/kernel/debug/accel/<n>/dump_security_violations
Date:           Jan 2021
KernelVersion:  5.12
Contact:        ogabbay@kernel.org
Description:    Dumps all security violations to dmesg. This will also ack
                all security violations meanings those violations will not be
                dumped next time user calls this API

What:           /sys/kernel/debug/accel/<n>/engines
Date:           Jul 2019
KernelVersion:  5.3
Contact:        ogabbay@kernel.org
Description:    Displays the status registers values of the device engines and
                their derived idle status

What:           /sys/kernel/debug/accel/<n>/i2c_addr
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Sets I2C device address for I2C transaction that is generated
                by the device's CPU, Not available when device is loaded with secured
                firmware

What:           /sys/kernel/debug/accel/<n>/i2c_bus
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Sets I2C bus address for I2C transaction that is generated by
                the device's CPU, Not available when device is loaded with secured
                firmware

What:           /sys/kernel/debug/accel/<n>/i2c_data
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Triggers an I2C transaction that is generated by the device's
                CPU. Writing to this file generates a write transaction while
                reading from the file generates a read transaction, Not available
                when device is loaded with secured firmware

What:           /sys/kernel/debug/accel/<n>/i2c_len
Date:           Dec 2021
KernelVersion:  5.17
Contact:        obitton@habana.ai
Description:    Sets I2C length in bytes for I2C transaction that is generated by
                the device's CPU, Not available when device is loaded with secured
                firmware

What:           /sys/kernel/debug/accel/<n>/i2c_reg
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Sets I2C register id for I2C transaction that is generated by
                the device's CPU, Not available when device is loaded with secured
                firmware

What:           /sys/kernel/debug/accel/<n>/led0
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Sets the state of the first S/W led on the device, Not available
                when device is loaded with secured firmware

What:           /sys/kernel/debug/accel/<n>/led1
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Sets the state of the second S/W led on the device, Not available
                when device is loaded with secured firmware

What:           /sys/kernel/debug/accel/<n>/led2
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Sets the state of the third S/W led on the device, Not available
                when device is loaded with secured firmware

What:           /sys/kernel/debug/accel/<n>/memory_scrub
Date:           May 2022
KernelVersion:  5.19
Contact:        dhirschfeld@habana.ai
Description:    Allows the root user to scrub the dram memory. The scrubbing
                value can be set using the debugfs file memory_scrub_val.

What:           /sys/kernel/debug/accel/<n>/memory_scrub_val
Date:           May 2022
KernelVersion:  5.19
Contact:        dhirschfeld@habana.ai
Description:    The value to which the dram will be set to when the user
                scrubs the dram using 'memory_scrub' debugfs file and
                the scrubbing value when using module param 'memory_scrub'

What:           /sys/kernel/debug/accel/<n>/mmu
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Displays the hop values and physical address for a given ASID
                and virtual address. The user should write the ASID and VA into
                the file and then read the file to get the result.
                e.g. to display info about VA 0x1000 for ASID 1 you need to do:
                echo "1 0x1000" > /sys/kernel/debug/accel/0/mmu

What:           /sys/kernel/debug/accel/<n>/mmu_error
Date:           Mar 2021
KernelVersion:  5.12
Contact:        fkassabri@habana.ai
Description:    Check and display page fault or access violation mmu errors for
                all MMUs specified in mmu_cap_mask.
                e.g. to display error info for MMU hw cap bit 9, you need to do:
                echo "0x200" > /sys/kernel/debug/accel/0/mmu_error
                cat /sys/kernel/debug/accel/0/mmu_error

What:           /sys/kernel/debug/accel/<n>/monitor_dump
Date:           Mar 2022
KernelVersion:  5.19
Contact:        osharabi@habana.ai
Description:    Allows the root user to dump monitors status from the device's
                protected config space.
                This property is a binary blob that contains the result of the
                monitors registers dump.
                This custom interface is needed (instead of using the generic
                Linux user-space PCI mapping) because this space is protected
                and cannot be accessed using PCI read.
                This interface doesn't support concurrency in the same device.
                Only supported on GAUDI.

What:           /sys/kernel/debug/accel/<n>/monitor_dump_trig
Date:           Mar 2022
KernelVersion:  5.19
Contact:        osharabi@habana.ai
Description:    Triggers dump of monitor data. The value to trigger the operation
                must be 1. Triggering the monitor dump operation initiates dump of
                current registers values of all monitors.
                When the write is finished, the user can read the "monitor_dump"
                blob

What:           /sys/kernel/debug/accel/<n>/set_power_state
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Sets the PCI power state. Valid values are "1" for D0 and "2"
                for D3Hot

What:           /sys/kernel/debug/accel/<n>/skip_reset_on_timeout
Date:           Jun 2021
KernelVersion:  5.13
Contact:        ynudelman@habana.ai
Description:    Sets the skip reset on timeout option for the device. Value of
                "0" means device will be reset in case some CS has timed out,
                otherwise it will not be reset.

What:           /sys/kernel/debug/accel/<n>/state_dump
Date:           Oct 2021
KernelVersion:  5.15
Contact:        ynudelman@habana.ai
Description:    Gets the state dump occurring on a CS timeout or failure.
                State dump is used for debug and is created each time in case of
                a problem in a CS execution, before reset.
                Reading from the node returns the newest state dump available.
                Writing an integer X discards X state dumps, so that the
                next read would return X+1-st newest state dump.

What:           /sys/kernel/debug/accel/<n>/stop_on_err
Date:           Mar 2020
KernelVersion:  5.6
Contact:        ogabbay@kernel.org
Description:    Sets the stop-on_error option for the device engines. Value of
                "0" is for disable, otherwise enable.
                Relevant only for GOYA and GAUDI.

What:           /sys/kernel/debug/accel/<n>/timeout_locked
Date:           Sep 2021
KernelVersion:  5.16
Contact:        obitton@habana.ai
Description:    Sets the command submission timeout value in seconds.

What:           /sys/kernel/debug/accel/<n>/userptr
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Displays a list with information about the current user
                pointers (user virtual addresses) that are pinned and mapped
                to DMA addresses

What:           /sys/kernel/debug/accel/<n>/userptr_lookup
Date:           Oct 2021
KernelVersion:  5.15
Contact:        ogabbay@kernel.org
Description:    Allows to search for specific user pointers (user virtual
                addresses) that are pinned and mapped to DMA addresses, and see
                their resolution to the specific dma address.

What:           /sys/kernel/debug/accel/<n>/vm
Date:           Jan 2019
KernelVersion:  5.1
Contact:        ogabbay@kernel.org
Description:    Displays a list with information about all the active virtual
                address mappings per ASID and all user mappings of HW blocks