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_reg
159Date:           Jan 2019
160KernelVersion:  5.1
161Contact:        ogabbay@kernel.org
162Description:    Sets I2C register id for I2C transaction that is generated by
163                the device's CPU
164
165What:           /sys/kernel/debug/habanalabs/hl<n>/led0
166Date:           Jan 2019
167KernelVersion:  5.1
168Contact:        ogabbay@kernel.org
169Description:    Sets the state of the first S/W led on the device
170
171What:           /sys/kernel/debug/habanalabs/hl<n>/led1
172Date:           Jan 2019
173KernelVersion:  5.1
174Contact:        ogabbay@kernel.org
175Description:    Sets the state of the second S/W led on the device
176
177What:           /sys/kernel/debug/habanalabs/hl<n>/led2
178Date:           Jan 2019
179KernelVersion:  5.1
180Contact:        ogabbay@kernel.org
181Description:    Sets the state of the third S/W led on the device
182
183What:           /sys/kernel/debug/habanalabs/hl<n>/mmu
184Date:           Jan 2019
185KernelVersion:  5.1
186Contact:        ogabbay@kernel.org
187Description:    Displays the hop values and physical address for a given ASID
188                and virtual address. The user should write the ASID and VA into
189                the file and then read the file to get the result.
190                e.g. to display info about VA 0x1000 for ASID 1 you need to do:
191                echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
192
193What:           /sys/kernel/debug/habanalabs/hl<n>/mmu_error
194Date:           Mar 2021
195KernelVersion:  5.12
196Contact:        fkassabri@habana.ai
197Description:    Check and display page fault or access violation mmu errors for
198                all MMUs specified in mmu_cap_mask.
199                e.g. to display error info for MMU hw cap bit 9, you need to do:
200                echo "0x200" > /sys/kernel/debug/habanalabs/hl0/mmu_error
201                cat /sys/kernel/debug/habanalabs/hl0/mmu_error
202
203What:           /sys/kernel/debug/habanalabs/hl<n>/set_power_state
204Date:           Jan 2019
205KernelVersion:  5.1
206Contact:        ogabbay@kernel.org
207Description:    Sets the PCI power state. Valid values are "1" for D0 and "2"
208                for D3Hot
209
210What:           /sys/kernel/debug/habanalabs/hl<n>/skip_reset_on_timeout
211Date:           Jun 2021
212KernelVersion:  5.13
213Contact:        ynudelman@habana.ai
214Description:    Sets the skip reset on timeout option for the device. Value of
215                "0" means device will be reset in case some CS has timed out,
216                otherwise it will not be reset.
217
218What:           /sys/kernel/debug/habanalabs/hl<n>/state_dump
219Date:           Oct 2021
220KernelVersion:  5.15
221Contact:        ynudelman@habana.ai
222Description:    Gets the state dump occurring on a CS timeout or failure.
223                State dump is used for debug and is created each time in case of
224                a problem in a CS execution, before reset.
225                Reading from the node returns the newest state dump available.
226                Writing an integer X discards X state dumps, so that the
227                next read would return X+1-st newest state dump.
228
229What:           /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
230Date:           Mar 2020
231KernelVersion:  5.6
232Contact:        ogabbay@kernel.org
233Description:    Sets the stop-on_error option for the device engines. Value of
234                "0" is for disable, otherwise enable.
235
236What:           /sys/kernel/debug/habanalabs/hl<n>/userptr
237Date:           Jan 2019
238KernelVersion:  5.1
239Contact:        ogabbay@kernel.org
240Description:    Displays a list with information about the currently user
241                pointers (user virtual addresses) that are pinned and mapped
242                to DMA addresses
243
244What:           /sys/kernel/debug/habanalabs/hl<n>/userptr_lookup
245Date:           Aug 2021
246KernelVersion:  5.15
247Contact:        ogabbay@kernel.org
248Description:    Allows to search for specific user pointers (user virtual
249                addresses) that are pinned and mapped to DMA addresses, and see
250                their resolution to the specific dma address.
251
252What:           /sys/kernel/debug/habanalabs/hl<n>/vm
253Date:           Jan 2019
254KernelVersion:  5.1
255Contact:        ogabbay@kernel.org
256Description:    Displays a list with information about all the active virtual
257                address mappings per ASID and all user mappings of HW blocks
258