xref: /linux/Documentation/ABI/testing/debugfs-driver-habanalabs (revision 4dee7a7138fae69e613ffc833927f35bcdeb0615)
1What:           /sys/kernel/debug/habanalabs/hl<n>/addr
2Date:           Jan 2019
3KernelVersion:  5.1
4Contact:        ogabbay@kernel.org
5Description:    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
11What:           /sys/kernel/debug/habanalabs/hl<n>/clk_gate
12Date:           May 2020
13KernelVersion:  5.8
14Contact:        ogabbay@kernel.org
15Description:    This setting is now deprecated as clock gating is handled solely by the f/w
16
17What:           /sys/kernel/debug/habanalabs/hl<n>/command_buffers
18Date:           Jan 2019
19KernelVersion:  5.1
20Contact:        ogabbay@kernel.org
21Description:    Displays a list with information about the currently allocated
22                command buffers
23
24What:           /sys/kernel/debug/habanalabs/hl<n>/command_submission
25Date:           Jan 2019
26KernelVersion:  5.1
27Contact:        ogabbay@kernel.org
28Description:    Displays a list with information about the currently active
29                command submissions
30
31What:           /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs
32Date:           Jan 2019
33KernelVersion:  5.1
34Contact:        ogabbay@kernel.org
35Description:    Displays a list with detailed information about each JOB (CB) of
36                each active command submission
37
38What:           /sys/kernel/debug/habanalabs/hl<n>/data32
39Date:           Jan 2019
40KernelVersion:  5.1
41Contact:        ogabbay@kernel.org
42Description:    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
53What:           /sys/kernel/debug/habanalabs/hl<n>/data64
54Date:           Jan 2020
55KernelVersion:  5.6
56Contact:        ogabbay@kernel.org
57Description:    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
68What:           /sys/kernel/debug/habanalabs/hl<n>/data_dma
69Date:           Apr 2021
70KernelVersion:  5.13
71Contact:        ogabbay@kernel.org
72Description:    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
86What:           /sys/kernel/debug/habanalabs/hl<n>/device
87Date:           Jan 2019
88KernelVersion:  5.1
89Contact:        ogabbay@kernel.org
90Description:    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
94What:           /sys/kernel/debug/habanalabs/hl<n>/dma_size
95Date:           Apr 2021
96KernelVersion:  5.13
97Contact:        ogabbay@kernel.org
98Description:    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
104What:           /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations
105Date:           Jan 2021
106KernelVersion:  5.12
107Contact:        ogabbay@kernel.org
108Description:    Dumps all security violations to dmesg. This will also ack
109                all security violations meanings those violations will not be
110                dumped next time user calls this API
111
112What:           /sys/kernel/debug/habanalabs/hl<n>/engines
113Date:           Jul 2019
114KernelVersion:  5.3
115Contact:        ogabbay@kernel.org
116Description:    Displays the status registers values of the device engines and
117                their derived idle status
118
119What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
120Date:           Jan 2019
121KernelVersion:  5.1
122Contact:        ogabbay@kernel.org
123Description:    Sets I2C device address for I2C transaction that is generated
124                by the device's CPU
125
126What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_bus
127Date:           Jan 2019
128KernelVersion:  5.1
129Contact:        ogabbay@kernel.org
130Description:    Sets I2C bus address for I2C transaction that is generated by
131                the device's CPU
132
133What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_data
134Date:           Jan 2019
135KernelVersion:  5.1
136Contact:        ogabbay@kernel.org
137Description:    Triggers an I2C transaction that is generated by the device's
138                CPU. Writing to this file generates a write transaction while
139                reading from the file generates a read transaction
140
141What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_len
142Date:           Dec 2021
143KernelVersion:  5.17
144Contact:        obitton@habana.ai
145Description:    Sets I2C length in bytes for I2C transaction that is generated by
146                the device's CPU
147
148What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
149Date:           Jan 2019
150KernelVersion:  5.1
151Contact:        ogabbay@kernel.org
152Description:    Sets I2C register id for I2C transaction that is generated by
153                the device's CPU
154
155What:           /sys/kernel/debug/habanalabs/hl<n>/led0
156Date:           Jan 2019
157KernelVersion:  5.1
158Contact:        ogabbay@kernel.org
159Description:    Sets the state of the first S/W led on the device
160
161What:           /sys/kernel/debug/habanalabs/hl<n>/led1
162Date:           Jan 2019
163KernelVersion:  5.1
164Contact:        ogabbay@kernel.org
165Description:    Sets the state of the second S/W led on the device
166
167What:           /sys/kernel/debug/habanalabs/hl<n>/led2
168Date:           Jan 2019
169KernelVersion:  5.1
170Contact:        ogabbay@kernel.org
171Description:    Sets the state of the third S/W led on the device
172
173What:           /sys/kernel/debug/habanalabs/hl<n>/mmu
174Date:           Jan 2019
175KernelVersion:  5.1
176Contact:        ogabbay@kernel.org
177Description:    Displays the hop values and physical address for a given ASID
178                and virtual address. The user should write the ASID and VA into
179                the file and then read the file to get the result.
180                e.g. to display info about VA 0x1000 for ASID 1 you need to do:
181                echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
182
183What:           /sys/kernel/debug/habanalabs/hl<n>/mmu_error
184Date:           Mar 2021
185KernelVersion:  5.12
186Contact:        fkassabri@habana.ai
187Description:    Check and display page fault or access violation mmu errors for
188                all MMUs specified in mmu_cap_mask.
189                e.g. to display error info for MMU hw cap bit 9, you need to do:
190                echo "0x200" > /sys/kernel/debug/habanalabs/hl0/mmu_error
191                cat /sys/kernel/debug/habanalabs/hl0/mmu_error
192
193What:           /sys/kernel/debug/habanalabs/hl<n>/set_power_state
194Date:           Jan 2019
195KernelVersion:  5.1
196Contact:        ogabbay@kernel.org
197Description:    Sets the PCI power state. Valid values are "1" for D0 and "2"
198                for D3Hot
199
200What:           /sys/kernel/debug/habanalabs/hl<n>/skip_reset_on_timeout
201Date:           Jun 2021
202KernelVersion:  5.13
203Contact:        ynudelman@habana.ai
204Description:    Sets the skip reset on timeout option for the device. Value of
205                "0" means device will be reset in case some CS has timed out,
206                otherwise it will not be reset.
207
208What:           /sys/kernel/debug/habanalabs/hl<n>/state_dump
209Date:           Oct 2021
210KernelVersion:  5.15
211Contact:        ynudelman@habana.ai
212Description:    Gets the state dump occurring on a CS timeout or failure.
213                State dump is used for debug and is created each time in case of
214                a problem in a CS execution, before reset.
215                Reading from the node returns the newest state dump available.
216                Writing an integer X discards X state dumps, so that the
217                next read would return X+1-st newest state dump.
218
219What:           /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
220Date:           Mar 2020
221KernelVersion:  5.6
222Contact:        ogabbay@kernel.org
223Description:    Sets the stop-on_error option for the device engines. Value of
224                "0" is for disable, otherwise enable.
225                Relevant only for GOYA and GAUDI.
226
227What:           /sys/kernel/debug/habanalabs/hl<n>/timeout_locked
228Date:           Sep 2021
229KernelVersion:  5.16
230Contact:        obitton@habana.ai
231Description:    Sets the command submission timeout value in seconds.
232
233What:           /sys/kernel/debug/habanalabs/hl<n>/userptr
234Date:           Jan 2019
235KernelVersion:  5.1
236Contact:        ogabbay@kernel.org
237Description:    Displays a list with information about the currently user
238                pointers (user virtual addresses) that are pinned and mapped
239                to DMA addresses
240
241What:           /sys/kernel/debug/habanalabs/hl<n>/userptr_lookup
242Date:           Aug 2021
243KernelVersion:  5.15
244Contact:        ogabbay@kernel.org
245Description:    Allows to search for specific user pointers (user virtual
246                addresses) that are pinned and mapped to DMA addresses, and see
247                their resolution to the specific dma address.
248
249What:           /sys/kernel/debug/habanalabs/hl<n>/vm
250Date:           Jan 2019
251KernelVersion:  5.1
252Contact:        ogabbay@kernel.org
253Description:    Displays a list with information about all the active virtual
254                address mappings per ASID and all user mappings of HW blocks
255