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