xref: /linux/Documentation/ABI/testing/debugfs-driver-habanalabs (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/addr
2c2164773SOded GabbayDate:           Jan 2019
3c2164773SOded GabbayKernelVersion:  5.1
42f8db5a1SOded GabbayContact:        ogabbay@kernel.org
5c2164773SOded GabbayDescription:    Sets the device address to be used for read or write through
64a0ce776STomer Tayar                PCI bar, or the device VA of a host mapped memory to be read or
74a0ce776STomer Tayar                written directly from the host. The latter option is allowed
84a0ce776STomer Tayar                only when the IOMMU is disabled.
94a0ce776STomer Tayar                The acceptable value is a string that starts with "0x"
10c2164773SOded Gabbay
11cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/clk_gate
12ca62433fSOded GabbayDate:           May 2020
13ca62433fSOded GabbayKernelVersion:  5.8
142f8db5a1SOded GabbayContact:        ogabbay@kernel.org
154edb4ffeSOded GabbayDescription:    This setting is now deprecated as clock gating is handled solely by the f/w
16ca62433fSOded Gabbay
17cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/command_buffers
18c2164773SOded GabbayDate:           Jan 2019
19c2164773SOded GabbayKernelVersion:  5.1
202f8db5a1SOded GabbayContact:        ogabbay@kernel.org
21c2164773SOded GabbayDescription:    Displays a list with information about the currently allocated
22c2164773SOded Gabbay                command buffers
23c2164773SOded Gabbay
24cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/command_submission
25c2164773SOded GabbayDate:           Jan 2019
26c2164773SOded GabbayKernelVersion:  5.1
272f8db5a1SOded GabbayContact:        ogabbay@kernel.org
28c2164773SOded GabbayDescription:    Displays a list with information about the currently active
29c2164773SOded Gabbay                command submissions
30c2164773SOded Gabbay
31cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/command_submission_jobs
32c2164773SOded GabbayDate:           Jan 2019
33c2164773SOded GabbayKernelVersion:  5.1
342f8db5a1SOded GabbayContact:        ogabbay@kernel.org
35c2164773SOded GabbayDescription:    Displays a list with detailed information about each JOB (CB) of
36c2164773SOded Gabbay                each active command submission
37c2164773SOded Gabbay
38cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/data32
39c2164773SOded GabbayDate:           Jan 2019
40c2164773SOded GabbayKernelVersion:  5.1
412f8db5a1SOded GabbayContact:        ogabbay@kernel.org
42c2164773SOded GabbayDescription:    Allows the root user to read or write directly through the
43c2164773SOded Gabbay                device's PCI bar. Writing to this file generates a write
44c2164773SOded Gabbay                transaction while reading from the file generates a read
454a0ce776STomer Tayar                transaction. This custom interface is needed (instead of using
46c2164773SOded Gabbay                the generic Linux user-space PCI mapping) because the DDR bar
47c2164773SOded Gabbay                is very small compared to the DDR memory and only the driver can
484a0ce776STomer Tayar                move the bar before and after the transaction.
4954a19b4dSMauro Carvalho Chehab
504a0ce776STomer Tayar                If the IOMMU is disabled, it also allows the root user to read
514a0ce776STomer Tayar                or write from the host a device VA of a host mapped memory
52c2164773SOded Gabbay
53cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/data64
545cce5146SMoti HaimovskiDate:           Jan 2020
555cce5146SMoti HaimovskiKernelVersion:  5.6
562f8db5a1SOded GabbayContact:        ogabbay@kernel.org
575cce5146SMoti HaimovskiDescription:    Allows the root user to read or write 64 bit data directly
585cce5146SMoti Haimovski                through the device's PCI bar. Writing to this file generates a
595cce5146SMoti Haimovski                write transaction while reading from the file generates a read
605cce5146SMoti Haimovski                transaction. This custom interface is needed (instead of using
615cce5146SMoti Haimovski                the generic Linux user-space PCI mapping) because the DDR bar
625cce5146SMoti Haimovski                is very small compared to the DDR memory and only the driver can
635cce5146SMoti Haimovski                move the bar before and after the transaction.
6454a19b4dSMauro Carvalho Chehab
655cce5146SMoti Haimovski                If the IOMMU is disabled, it also allows the root user to read
665cce5146SMoti Haimovski                or write from the host a device VA of a host mapped memory
675cce5146SMoti Haimovski
68cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/data_dma
69639781dcSOded GabbayDate:           Apr 2021
70639781dcSOded GabbayKernelVersion:  5.13
71639781dcSOded GabbayContact:        ogabbay@kernel.org
72639781dcSOded GabbayDescription:    Allows the root user to read from the device's internal
73639781dcSOded Gabbay                memory (DRAM/SRAM) through a DMA engine.
74639781dcSOded Gabbay                This property is a binary blob that contains the result of the
75639781dcSOded Gabbay                DMA transfer.
76639781dcSOded Gabbay                This custom interface is needed (instead of using the generic
77639781dcSOded Gabbay                Linux user-space PCI mapping) because the amount of internal
78639781dcSOded Gabbay                memory is huge (>32GB) and reading it via the PCI bar will take
79639781dcSOded Gabbay                a very long time.
80639781dcSOded Gabbay                This interface doesn't support concurrency in the same device.
81639781dcSOded Gabbay                In GAUDI and GOYA, this action can cause undefined behavior
8238ed55bcSTomer Tayar                in case it is done while the device is executing user
83639781dcSOded Gabbay                workloads.
84639781dcSOded Gabbay                Only supported on GAUDI at this stage.
85639781dcSOded Gabbay
86cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/device
87c2164773SOded GabbayDate:           Jan 2019
88c2164773SOded GabbayKernelVersion:  5.1
892f8db5a1SOded GabbayContact:        ogabbay@kernel.org
90c2164773SOded GabbayDescription:    Enables the root user to set the device to specific state.
91c2164773SOded Gabbay                Valid values are "disable", "enable", "suspend", "resume".
92c2164773SOded Gabbay                User can read this property to see the valid values
93c2164773SOded Gabbay
94cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/device_release_watchdog_timeout
9511669b58STomer TayarDate:           Oct 2022
9611669b58STomer TayarKernelVersion:  6.2
9711669b58STomer TayarContact:        ttayar@habana.ai
98ebab9426SBjorn HelgaasDescription:    The watchdog timeout value in seconds for a device release upon
9911669b58STomer Tayar                certain error cases, after which the device is reset.
10011669b58STomer Tayar
101cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/dma_size
102639781dcSOded GabbayDate:           Apr 2021
103639781dcSOded GabbayKernelVersion:  5.13
104639781dcSOded GabbayContact:        ogabbay@kernel.org
105639781dcSOded GabbayDescription:    Specify the size of the DMA transaction when using DMA to read
106639781dcSOded Gabbay                from the device's internal memory. The value can not be larger
107639781dcSOded Gabbay                than 128MB. Writing to this value initiates the DMA transfer.
108639781dcSOded Gabbay                When the write is finished, the user can read the "data_dma"
109639781dcSOded Gabbay                blob
110639781dcSOded Gabbay
111cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/dump_razwi_events
112d7bb1ac8SOded GabbayDate:           Aug 2022
113d7bb1ac8SOded GabbayKernelVersion:  5.20
114d7bb1ac8SOded GabbayContact:        fkassabri@habana.ai
115d7bb1ac8SOded GabbayDescription:    Dumps all razwi events to dmesg if exist.
116d7bb1ac8SOded Gabbay                After reading the status register of an existing event
117d7bb1ac8SOded Gabbay                the routine will clear the status register.
118d7bb1ac8SOded Gabbay                Usage: cat dump_razwi_events
119d7bb1ac8SOded Gabbay
120cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/dump_security_violations
121639781dcSOded GabbayDate:           Jan 2021
122639781dcSOded GabbayKernelVersion:  5.12
123639781dcSOded GabbayContact:        ogabbay@kernel.org
124639781dcSOded GabbayDescription:    Dumps all security violations to dmesg. This will also ack
125639781dcSOded Gabbay                all security violations meanings those violations will not be
126639781dcSOded Gabbay                dumped next time user calls this API
127639781dcSOded Gabbay
128cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/engines
12906deb86aSTomer TayarDate:           Jul 2019
13006deb86aSTomer TayarKernelVersion:  5.3
1312f8db5a1SOded GabbayContact:        ogabbay@kernel.org
13206deb86aSTomer TayarDescription:    Displays the status registers values of the device engines and
13306deb86aSTomer Tayar                their derived idle status
13406deb86aSTomer Tayar
135cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/i2c_addr
136c2164773SOded GabbayDate:           Jan 2019
137c2164773SOded GabbayKernelVersion:  5.1
1382f8db5a1SOded GabbayContact:        ogabbay@kernel.org
139c2164773SOded GabbayDescription:    Sets I2C device address for I2C transaction that is generated
14008f0aa95SOfir Bitton                by the device's CPU, Not available when device is loaded with secured
14108f0aa95SOfir Bitton                firmware
142c2164773SOded Gabbay
143cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/i2c_bus
144c2164773SOded GabbayDate:           Jan 2019
145c2164773SOded GabbayKernelVersion:  5.1
1462f8db5a1SOded GabbayContact:        ogabbay@kernel.org
147c2164773SOded GabbayDescription:    Sets I2C bus address for I2C transaction that is generated by
14808f0aa95SOfir Bitton                the device's CPU, Not available when device is loaded with secured
14908f0aa95SOfir Bitton                firmware
150c2164773SOded Gabbay
151cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/i2c_data
152c2164773SOded GabbayDate:           Jan 2019
153c2164773SOded GabbayKernelVersion:  5.1
1542f8db5a1SOded GabbayContact:        ogabbay@kernel.org
155c2164773SOded GabbayDescription:    Triggers an I2C transaction that is generated by the device's
156c2164773SOded Gabbay                CPU. Writing to this file generates a write transaction while
15708f0aa95SOfir Bitton                reading from the file generates a read transaction, Not available
15808f0aa95SOfir Bitton                when device is loaded with secured firmware
159c2164773SOded Gabbay
160cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/i2c_len
1613eb7754fSOfir BittonDate:           Dec 2021
1623eb7754fSOfir BittonKernelVersion:  5.17
1633eb7754fSOfir BittonContact:        obitton@habana.ai
1643eb7754fSOfir BittonDescription:    Sets I2C length in bytes for I2C transaction that is generated by
16508f0aa95SOfir Bitton                the device's CPU, Not available when device is loaded with secured
16608f0aa95SOfir Bitton                firmware
1673eb7754fSOfir Bitton
168cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/i2c_reg
169c2164773SOded GabbayDate:           Jan 2019
170c2164773SOded GabbayKernelVersion:  5.1
1712f8db5a1SOded GabbayContact:        ogabbay@kernel.org
172c2164773SOded GabbayDescription:    Sets I2C register id for I2C transaction that is generated by
17308f0aa95SOfir Bitton                the device's CPU, Not available when device is loaded with secured
17408f0aa95SOfir Bitton                firmware
175c2164773SOded Gabbay
176cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/led0
177c2164773SOded GabbayDate:           Jan 2019
178c2164773SOded GabbayKernelVersion:  5.1
1792f8db5a1SOded GabbayContact:        ogabbay@kernel.org
18008f0aa95SOfir BittonDescription:    Sets the state of the first S/W led on the device, Not available
18108f0aa95SOfir Bitton                when device is loaded with secured firmware
182c2164773SOded Gabbay
183cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/led1
184c2164773SOded GabbayDate:           Jan 2019
185c2164773SOded GabbayKernelVersion:  5.1
1862f8db5a1SOded GabbayContact:        ogabbay@kernel.org
18708f0aa95SOfir BittonDescription:    Sets the state of the second S/W led on the device, Not available
18808f0aa95SOfir Bitton                when device is loaded with secured firmware
189c2164773SOded Gabbay
190cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/led2
191c2164773SOded GabbayDate:           Jan 2019
192c2164773SOded GabbayKernelVersion:  5.1
1932f8db5a1SOded GabbayContact:        ogabbay@kernel.org
19408f0aa95SOfir BittonDescription:    Sets the state of the third S/W led on the device, Not available
19508f0aa95SOfir Bitton                when device is loaded with secured firmware
196c2164773SOded Gabbay
197cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/memory_scrub
1980688474eSDafna HirschfeldDate:           May 2022
1990688474eSDafna HirschfeldKernelVersion:  5.19
2000688474eSDafna HirschfeldContact:        dhirschfeld@habana.ai
2010688474eSDafna HirschfeldDescription:    Allows the root user to scrub the dram memory. The scrubbing
2020688474eSDafna Hirschfeld                value can be set using the debugfs file memory_scrub_val.
2030688474eSDafna Hirschfeld
204cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/memory_scrub_val
2050688474eSDafna HirschfeldDate:           May 2022
2060688474eSDafna HirschfeldKernelVersion:  5.19
2070688474eSDafna HirschfeldContact:        dhirschfeld@habana.ai
2080688474eSDafna HirschfeldDescription:    The value to which the dram will be set to when the user
20970852c95SDafna Hirschfeld                scrubs the dram using 'memory_scrub' debugfs file and
21070852c95SDafna Hirschfeld                the scrubbing value when using module param 'memory_scrub'
2110688474eSDafna Hirschfeld
212cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/mmu
213c2164773SOded GabbayDate:           Jan 2019
214c2164773SOded GabbayKernelVersion:  5.1
2152f8db5a1SOded GabbayContact:        ogabbay@kernel.org
216c2164773SOded GabbayDescription:    Displays the hop values and physical address for a given ASID
217c2164773SOded Gabbay                and virtual address. The user should write the ASID and VA into
218c2164773SOded Gabbay                the file and then read the file to get the result.
219c2164773SOded Gabbay                e.g. to display info about VA 0x1000 for ASID 1 you need to do:
220*340dd775STomer Tayar                echo "1 0x1000" > /sys/kernel/debug/accel/<parent_device>/mmu
221c2164773SOded Gabbay
222cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/mmu_error
223639781dcSOded GabbayDate:           Mar 2021
224639781dcSOded GabbayKernelVersion:  5.12
225639781dcSOded GabbayContact:        fkassabri@habana.ai
226639781dcSOded GabbayDescription:    Check and display page fault or access violation mmu errors for
227639781dcSOded Gabbay                all MMUs specified in mmu_cap_mask.
228639781dcSOded Gabbay                e.g. to display error info for MMU hw cap bit 9, you need to do:
229*340dd775STomer Tayar                echo "0x200" > /sys/kernel/debug/accel/<parent_device>/mmu_error
230*340dd775STomer Tayar                cat /sys/kernel/debug/accel/<parent_device>/mmu_error
231639781dcSOded Gabbay
232cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/monitor_dump
233d0b59cf6SOhad SharabiDate:           Mar 2022
234d0b59cf6SOhad SharabiKernelVersion:  5.19
235d0b59cf6SOhad SharabiContact:        osharabi@habana.ai
236d0b59cf6SOhad SharabiDescription:    Allows the root user to dump monitors status from the device's
237d0b59cf6SOhad Sharabi                protected config space.
238d0b59cf6SOhad Sharabi                This property is a binary blob that contains the result of the
239d0b59cf6SOhad Sharabi                monitors registers dump.
240d0b59cf6SOhad Sharabi                This custom interface is needed (instead of using the generic
241d0b59cf6SOhad Sharabi                Linux user-space PCI mapping) because this space is protected
242d0b59cf6SOhad Sharabi                and cannot be accessed using PCI read.
243d0b59cf6SOhad Sharabi                This interface doesn't support concurrency in the same device.
244d0b59cf6SOhad Sharabi                Only supported on GAUDI.
245d0b59cf6SOhad Sharabi
246cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/monitor_dump_trig
247d0b59cf6SOhad SharabiDate:           Mar 2022
248d0b59cf6SOhad SharabiKernelVersion:  5.19
249d0b59cf6SOhad SharabiContact:        osharabi@habana.ai
250d0b59cf6SOhad SharabiDescription:    Triggers dump of monitor data. The value to trigger the operation
251d0b59cf6SOhad Sharabi                must be 1. Triggering the monitor dump operation initiates dump of
252d0b59cf6SOhad Sharabi                current registers values of all monitors.
253d0b59cf6SOhad Sharabi                When the write is finished, the user can read the "monitor_dump"
254d0b59cf6SOhad Sharabi                blob
255d0b59cf6SOhad Sharabi
25626250af9STal RisinWhat:           /sys/kernel/debug/accel/<parent_device>/server_type
25726250af9STal RisinDate:           Feb 2024
25826250af9STal RisinKernelVersion:  6.11
25926250af9STal RisinContact:        trisin@habana.ai
26026250af9STal RisinDescription:    Exposes the device's server type, maps to enum hl_server_type.
26126250af9STal Risin
262cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/set_power_state
263c2164773SOded GabbayDate:           Jan 2019
264c2164773SOded GabbayKernelVersion:  5.1
2652f8db5a1SOded GabbayContact:        ogabbay@kernel.org
266c2164773SOded GabbayDescription:    Sets the PCI power state. Valid values are "1" for D0 and "2"
267c2164773SOded Gabbay                for D3Hot
268c2164773SOded Gabbay
269cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/skip_reset_on_timeout
2704d041216SYuri NudelmanDate:           Jun 2021
2714d041216SYuri NudelmanKernelVersion:  5.13
2724d041216SYuri NudelmanContact:        ynudelman@habana.ai
2734d041216SYuri NudelmanDescription:    Sets the skip reset on timeout option for the device. Value of
2744d041216SYuri Nudelman                "0" means device will be reset in case some CS has timed out,
2754d041216SYuri Nudelman                otherwise it will not be reset.
2764d041216SYuri Nudelman
277cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/state_dump
278938b793fSYuri NudelmanDate:           Oct 2021
279938b793fSYuri NudelmanKernelVersion:  5.15
280938b793fSYuri NudelmanContact:        ynudelman@habana.ai
281938b793fSYuri NudelmanDescription:    Gets the state dump occurring on a CS timeout or failure.
282938b793fSYuri Nudelman                State dump is used for debug and is created each time in case of
283938b793fSYuri Nudelman                a problem in a CS execution, before reset.
284938b793fSYuri Nudelman                Reading from the node returns the newest state dump available.
285938b793fSYuri Nudelman                Writing an integer X discards X state dumps, so that the
286938b793fSYuri Nudelman                next read would return X+1-st newest state dump.
287938b793fSYuri Nudelman
288cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/stop_on_err
289639781dcSOded GabbayDate:           Mar 2020
290639781dcSOded GabbayKernelVersion:  5.6
291639781dcSOded GabbayContact:        ogabbay@kernel.org
292639781dcSOded GabbayDescription:    Sets the stop-on_error option for the device engines. Value of
293639781dcSOded Gabbay                "0" is for disable, otherwise enable.
294d01e6cc9STomer Tayar                Relevant only for GOYA and GAUDI.
295639781dcSOded Gabbay
296cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/timeout_locked
297a9ecddb9STomer TayarDate:           Sep 2021
298a9ecddb9STomer TayarKernelVersion:  5.16
299a9ecddb9STomer TayarContact:        obitton@habana.ai
300a9ecddb9STomer TayarDescription:    Sets the command submission timeout value in seconds.
301a9ecddb9STomer Tayar
302cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/userptr
303c2164773SOded GabbayDate:           Jan 2019
304c2164773SOded GabbayKernelVersion:  5.1
3052f8db5a1SOded GabbayContact:        ogabbay@kernel.org
30638ed55bcSTomer TayarDescription:    Displays a list with information about the current user
307c2164773SOded Gabbay                pointers (user virtual addresses) that are pinned and mapped
308c2164773SOded Gabbay                to DMA addresses
309c2164773SOded Gabbay
310cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/userptr_lookup
311d7bb1ac8SOded GabbayDate:           Oct 2021
31289b21365SYuri NudelmanKernelVersion:  5.15
31389b21365SYuri NudelmanContact:        ogabbay@kernel.org
31489b21365SYuri NudelmanDescription:    Allows to search for specific user pointers (user virtual
31589b21365SYuri Nudelman                addresses) that are pinned and mapped to DMA addresses, and see
31689b21365SYuri Nudelman                their resolution to the specific dma address.
31789b21365SYuri Nudelman
318cf0719a8STomer TayarWhat:           /sys/kernel/debug/accel/<parent_device>/vm
319c2164773SOded GabbayDate:           Jan 2019
320c2164773SOded GabbayKernelVersion:  5.1
3212f8db5a1SOded GabbayContact:        ogabbay@kernel.org
322c2164773SOded GabbayDescription:    Displays a list with information about all the active virtual
323a4371c1aSSagiv Ozeri                address mappings per ASID and all user mappings of HW blocks
324