xref: /linux/Documentation/ABI/testing/debugfs-driver-habanalabs (revision 4edb4ffe39c9bdaec50186d0ca583a7ff01143de)
1c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/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
11ca62433fSOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/clk_gate
12ca62433fSOded GabbayDate:           May 2020
13ca62433fSOded GabbayKernelVersion:  5.8
142f8db5a1SOded GabbayContact:        ogabbay@kernel.org
15*4edb4ffeSOded GabbayDescription:    This setting is now deprecated as clock gating is handled solely by the f/w
16ca62433fSOded Gabbay
17c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/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
24c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/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
31c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/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
38c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/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
535cce5146SMoti HaimovskiWhat:           /sys/kernel/debug/habanalabs/hl<n>/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
68639781dcSOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/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
82639781dcSOded Gabbay                in case the it is done while the device is executing user
83639781dcSOded Gabbay                workloads.
84639781dcSOded Gabbay                Only supported on GAUDI at this stage.
85639781dcSOded Gabbay
86c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/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
94639781dcSOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/dma_size
95639781dcSOded GabbayDate:           Apr 2021
96639781dcSOded GabbayKernelVersion:  5.13
97639781dcSOded GabbayContact:        ogabbay@kernel.org
98639781dcSOded GabbayDescription:    Specify the size of the DMA transaction when using DMA to read
99639781dcSOded Gabbay                from the device's internal memory. The value can not be larger
100639781dcSOded Gabbay                than 128MB. Writing to this value initiates the DMA transfer.
101639781dcSOded Gabbay                When the write is finished, the user can read the "data_dma"
102639781dcSOded Gabbay                blob
103639781dcSOded Gabbay
104639781dcSOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations
105639781dcSOded GabbayDate:           Jan 2021
106639781dcSOded GabbayKernelVersion:  5.12
107639781dcSOded GabbayContact:        ogabbay@kernel.org
108639781dcSOded GabbayDescription:    Dumps all security violations to dmesg. This will also ack
109639781dcSOded Gabbay                all security violations meanings those violations will not be
110639781dcSOded Gabbay                dumped next time user calls this API
111639781dcSOded Gabbay
11206deb86aSTomer TayarWhat:           /sys/kernel/debug/habanalabs/hl<n>/engines
11306deb86aSTomer TayarDate:           Jul 2019
11406deb86aSTomer TayarKernelVersion:  5.3
1152f8db5a1SOded GabbayContact:        ogabbay@kernel.org
11606deb86aSTomer TayarDescription:    Displays the status registers values of the device engines and
11706deb86aSTomer Tayar                their derived idle status
11806deb86aSTomer Tayar
119c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
120c2164773SOded GabbayDate:           Jan 2019
121c2164773SOded GabbayKernelVersion:  5.1
1222f8db5a1SOded GabbayContact:        ogabbay@kernel.org
123c2164773SOded GabbayDescription:    Sets I2C device address for I2C transaction that is generated
124c2164773SOded Gabbay                by the device's CPU
125c2164773SOded Gabbay
126c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/i2c_bus
127c2164773SOded GabbayDate:           Jan 2019
128c2164773SOded GabbayKernelVersion:  5.1
1292f8db5a1SOded GabbayContact:        ogabbay@kernel.org
130c2164773SOded GabbayDescription:    Sets I2C bus address for I2C transaction that is generated by
131c2164773SOded Gabbay                the device's CPU
132c2164773SOded Gabbay
133c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/i2c_data
134c2164773SOded GabbayDate:           Jan 2019
135c2164773SOded GabbayKernelVersion:  5.1
1362f8db5a1SOded GabbayContact:        ogabbay@kernel.org
137c2164773SOded GabbayDescription:    Triggers an I2C transaction that is generated by the device's
138c2164773SOded Gabbay                CPU. Writing to this file generates a write transaction while
1393e42d1deSCarlos Bilbao                reading from the file generates a read transaction
140c2164773SOded Gabbay
1413eb7754fSOfir BittonWhat:           /sys/kernel/debug/habanalabs/hl<n>/i2c_len
1423eb7754fSOfir BittonDate:           Dec 2021
1433eb7754fSOfir BittonKernelVersion:  5.17
1443eb7754fSOfir BittonContact:        obitton@habana.ai
1453eb7754fSOfir BittonDescription:    Sets I2C length in bytes for I2C transaction that is generated by
1463eb7754fSOfir Bitton                the device's CPU
1473eb7754fSOfir Bitton
148c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
149c2164773SOded GabbayDate:           Jan 2019
150c2164773SOded GabbayKernelVersion:  5.1
1512f8db5a1SOded GabbayContact:        ogabbay@kernel.org
152c2164773SOded GabbayDescription:    Sets I2C register id for I2C transaction that is generated by
153c2164773SOded Gabbay                the device's CPU
154c2164773SOded Gabbay
155c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/led0
156c2164773SOded GabbayDate:           Jan 2019
157c2164773SOded GabbayKernelVersion:  5.1
1582f8db5a1SOded GabbayContact:        ogabbay@kernel.org
159c2164773SOded GabbayDescription:    Sets the state of the first S/W led on the device
160c2164773SOded Gabbay
161c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/led1
162c2164773SOded GabbayDate:           Jan 2019
163c2164773SOded GabbayKernelVersion:  5.1
1642f8db5a1SOded GabbayContact:        ogabbay@kernel.org
165c2164773SOded GabbayDescription:    Sets the state of the second S/W led on the device
166c2164773SOded Gabbay
167c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/led2
168c2164773SOded GabbayDate:           Jan 2019
169c2164773SOded GabbayKernelVersion:  5.1
1702f8db5a1SOded GabbayContact:        ogabbay@kernel.org
171c2164773SOded GabbayDescription:    Sets the state of the third S/W led on the device
172c2164773SOded Gabbay
173c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/mmu
174c2164773SOded GabbayDate:           Jan 2019
175c2164773SOded GabbayKernelVersion:  5.1
1762f8db5a1SOded GabbayContact:        ogabbay@kernel.org
177c2164773SOded GabbayDescription:    Displays the hop values and physical address for a given ASID
178c2164773SOded Gabbay                and virtual address. The user should write the ASID and VA into
179c2164773SOded Gabbay                the file and then read the file to get the result.
180c2164773SOded Gabbay                e.g. to display info about VA 0x1000 for ASID 1 you need to do:
181c2164773SOded Gabbay                echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
182c2164773SOded Gabbay
183639781dcSOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/mmu_error
184639781dcSOded GabbayDate:           Mar 2021
185639781dcSOded GabbayKernelVersion:  5.12
186639781dcSOded GabbayContact:        fkassabri@habana.ai
187639781dcSOded GabbayDescription:    Check and display page fault or access violation mmu errors for
188639781dcSOded Gabbay                all MMUs specified in mmu_cap_mask.
189639781dcSOded Gabbay                e.g. to display error info for MMU hw cap bit 9, you need to do:
190639781dcSOded Gabbay                echo "0x200" > /sys/kernel/debug/habanalabs/hl0/mmu_error
191639781dcSOded Gabbay                cat /sys/kernel/debug/habanalabs/hl0/mmu_error
192639781dcSOded Gabbay
193c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/set_power_state
194c2164773SOded GabbayDate:           Jan 2019
195c2164773SOded GabbayKernelVersion:  5.1
1962f8db5a1SOded GabbayContact:        ogabbay@kernel.org
197c2164773SOded GabbayDescription:    Sets the PCI power state. Valid values are "1" for D0 and "2"
198c2164773SOded Gabbay                for D3Hot
199c2164773SOded Gabbay
2004d041216SYuri NudelmanWhat:           /sys/kernel/debug/habanalabs/hl<n>/skip_reset_on_timeout
2014d041216SYuri NudelmanDate:           Jun 2021
2024d041216SYuri NudelmanKernelVersion:  5.13
2034d041216SYuri NudelmanContact:        ynudelman@habana.ai
2044d041216SYuri NudelmanDescription:    Sets the skip reset on timeout option for the device. Value of
2054d041216SYuri Nudelman                "0" means device will be reset in case some CS has timed out,
2064d041216SYuri Nudelman                otherwise it will not be reset.
2074d041216SYuri Nudelman
208938b793fSYuri NudelmanWhat:           /sys/kernel/debug/habanalabs/hl<n>/state_dump
209938b793fSYuri NudelmanDate:           Oct 2021
210938b793fSYuri NudelmanKernelVersion:  5.15
211938b793fSYuri NudelmanContact:        ynudelman@habana.ai
212938b793fSYuri NudelmanDescription:    Gets the state dump occurring on a CS timeout or failure.
213938b793fSYuri Nudelman                State dump is used for debug and is created each time in case of
214938b793fSYuri Nudelman                a problem in a CS execution, before reset.
215938b793fSYuri Nudelman                Reading from the node returns the newest state dump available.
216938b793fSYuri Nudelman                Writing an integer X discards X state dumps, so that the
217938b793fSYuri Nudelman                next read would return X+1-st newest state dump.
218938b793fSYuri Nudelman
219639781dcSOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
220639781dcSOded GabbayDate:           Mar 2020
221639781dcSOded GabbayKernelVersion:  5.6
222639781dcSOded GabbayContact:        ogabbay@kernel.org
223639781dcSOded GabbayDescription:    Sets the stop-on_error option for the device engines. Value of
224639781dcSOded Gabbay                "0" is for disable, otherwise enable.
225639781dcSOded Gabbay
226a9ecddb9STomer TayarWhat:           /sys/kernel/debug/habanalabs/hl<n>/timeout_locked
227a9ecddb9STomer TayarDate:           Sep 2021
228a9ecddb9STomer TayarKernelVersion:  5.16
229a9ecddb9STomer TayarContact:        obitton@habana.ai
230a9ecddb9STomer TayarDescription:    Sets the command submission timeout value in seconds.
231a9ecddb9STomer Tayar
232c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/userptr
233c2164773SOded GabbayDate:           Jan 2019
234c2164773SOded GabbayKernelVersion:  5.1
2352f8db5a1SOded GabbayContact:        ogabbay@kernel.org
236c2164773SOded GabbayDescription:    Displays a list with information about the currently user
237c2164773SOded Gabbay                pointers (user virtual addresses) that are pinned and mapped
238c2164773SOded Gabbay                to DMA addresses
239c2164773SOded Gabbay
24089b21365SYuri NudelmanWhat:           /sys/kernel/debug/habanalabs/hl<n>/userptr_lookup
24189b21365SYuri NudelmanDate:           Aug 2021
24289b21365SYuri NudelmanKernelVersion:  5.15
24389b21365SYuri NudelmanContact:        ogabbay@kernel.org
24489b21365SYuri NudelmanDescription:    Allows to search for specific user pointers (user virtual
24589b21365SYuri Nudelman                addresses) that are pinned and mapped to DMA addresses, and see
24689b21365SYuri Nudelman                their resolution to the specific dma address.
24789b21365SYuri Nudelman
248c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/vm
249c2164773SOded GabbayDate:           Jan 2019
250c2164773SOded GabbayKernelVersion:  5.1
2512f8db5a1SOded GabbayContact:        ogabbay@kernel.org
252c2164773SOded GabbayDescription:    Displays a list with information about all the active virtual
253a4371c1aSSagiv Ozeri                address mappings per ASID and all user mappings of HW blocks
254