Merge tag 'char-misc-5.15-rc1-lkdtm' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / Documentation / ABI / testing / debugfs-driver-habanalabs
1 What:           /sys/kernel/debug/habanalabs/hl<n>/addr
2 Date:           Jan 2019
3 KernelVersion:  5.1
4 Contact:        ogabbay@kernel.org
5 Description:    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
11 What:           /sys/kernel/debug/habanalabs/hl<n>/clk_gate
12 Date:           May 2020
13 KernelVersion:  5.8
14 Contact:        ogabbay@kernel.org
15 Description:    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
34 What:           /sys/kernel/debug/habanalabs/hl<n>/command_buffers
35 Date:           Jan 2019
36 KernelVersion:  5.1
37 Contact:        ogabbay@kernel.org
38 Description:    Displays a list with information about the currently allocated
39                 command buffers
40
41 What:           /sys/kernel/debug/habanalabs/hl<n>/command_submission
42 Date:           Jan 2019
43 KernelVersion:  5.1
44 Contact:        ogabbay@kernel.org
45 Description:    Displays a list with information about the currently active
46                 command submissions
47
48 What:           /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs
49 Date:           Jan 2019
50 KernelVersion:  5.1
51 Contact:        ogabbay@kernel.org
52 Description:    Displays a list with detailed information about each JOB (CB) of
53                 each active command submission
54
55 What:           /sys/kernel/debug/habanalabs/hl<n>/data32
56 Date:           Jan 2019
57 KernelVersion:  5.1
58 Contact:        ogabbay@kernel.org
59 Description:    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
70 What:           /sys/kernel/debug/habanalabs/hl<n>/data64
71 Date:           Jan 2020
72 KernelVersion:  5.6
73 Contact:        ogabbay@kernel.org
74 Description:    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
85 What:           /sys/kernel/debug/habanalabs/hl<n>/data_dma
86 Date:           Apr 2021
87 KernelVersion:  5.13
88 Contact:        ogabbay@kernel.org
89 Description:    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
103 What:           /sys/kernel/debug/habanalabs/hl<n>/device
104 Date:           Jan 2019
105 KernelVersion:  5.1
106 Contact:        ogabbay@kernel.org
107 Description:    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
111 What:           /sys/kernel/debug/habanalabs/hl<n>/dma_size
112 Date:           Apr 2021
113 KernelVersion:  5.13
114 Contact:        ogabbay@kernel.org
115 Description:    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
121 What:           /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations
122 Date:           Jan 2021
123 KernelVersion:  5.12
124 Contact:        ogabbay@kernel.org
125 Description:    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
129 What:           /sys/kernel/debug/habanalabs/hl<n>/engines
130 Date:           Jul 2019
131 KernelVersion:  5.3
132 Contact:        ogabbay@kernel.org
133 Description:    Displays the status registers values of the device engines and
134                 their derived idle status
135
136 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
137 Date:           Jan 2019
138 KernelVersion:  5.1
139 Contact:        ogabbay@kernel.org
140 Description:    Sets I2C device address for I2C transaction that is generated
141                 by the device's CPU
142
143 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_bus
144 Date:           Jan 2019
145 KernelVersion:  5.1
146 Contact:        ogabbay@kernel.org
147 Description:    Sets I2C bus address for I2C transaction that is generated by
148                 the device's CPU
149
150 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_data
151 Date:           Jan 2019
152 KernelVersion:  5.1
153 Contact:        ogabbay@kernel.org
154 Description:    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
158 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
159 Date:           Jan 2019
160 KernelVersion:  5.1
161 Contact:        ogabbay@kernel.org
162 Description:    Sets I2C register id for I2C transaction that is generated by
163                 the device's CPU
164
165 What:           /sys/kernel/debug/habanalabs/hl<n>/led0
166 Date:           Jan 2019
167 KernelVersion:  5.1
168 Contact:        ogabbay@kernel.org
169 Description:    Sets the state of the first S/W led on the device
170
171 What:           /sys/kernel/debug/habanalabs/hl<n>/led1
172 Date:           Jan 2019
173 KernelVersion:  5.1
174 Contact:        ogabbay@kernel.org
175 Description:    Sets the state of the second S/W led on the device
176
177 What:           /sys/kernel/debug/habanalabs/hl<n>/led2
178 Date:           Jan 2019
179 KernelVersion:  5.1
180 Contact:        ogabbay@kernel.org
181 Description:    Sets the state of the third S/W led on the device
182
183 What:           /sys/kernel/debug/habanalabs/hl<n>/mmu
184 Date:           Jan 2019
185 KernelVersion:  5.1
186 Contact:        ogabbay@kernel.org
187 Description:    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
193 What:           /sys/kernel/debug/habanalabs/hl<n>/mmu_error
194 Date:           Mar 2021
195 KernelVersion:  5.12
196 Contact:        fkassabri@habana.ai
197 Description:    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
203 What:           /sys/kernel/debug/habanalabs/hl<n>/set_power_state
204 Date:           Jan 2019
205 KernelVersion:  5.1
206 Contact:        ogabbay@kernel.org
207 Description:    Sets the PCI power state. Valid values are "1" for D0 and "2"
208                 for D3Hot
209
210 What:           /sys/kernel/debug/habanalabs/hl<n>/skip_reset_on_timeout
211 Date:           Jun 2021
212 KernelVersion:  5.13
213 Contact:        ynudelman@habana.ai
214 Description:    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
218 What:           /sys/kernel/debug/habanalabs/hl<n>/state_dump
219 Date:           Oct 2021
220 KernelVersion:  5.15
221 Contact:        ynudelman@habana.ai
222 Description:    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
229 What:           /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
230 Date:           Mar 2020
231 KernelVersion:  5.6
232 Contact:        ogabbay@kernel.org
233 Description:    Sets the stop-on_error option for the device engines. Value of
234                 "0" is for disable, otherwise enable.
235
236 What:           /sys/kernel/debug/habanalabs/hl<n>/userptr
237 Date:           Jan 2019
238 KernelVersion:  5.1
239 Contact:        ogabbay@kernel.org
240 Description:    Displays a list with information about the currently user
241                 pointers (user virtual addresses) that are pinned and mapped
242                 to DMA addresses
243
244 What:           /sys/kernel/debug/habanalabs/hl<n>/userptr_lookup
245 Date:           Aug 2021
246 KernelVersion:  5.15
247 Contact:        ogabbay@kernel.org
248 Description:    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
252 What:           /sys/kernel/debug/habanalabs/hl<n>/vm
253 Date:           Jan 2019
254 KernelVersion:  5.1
255 Contact:        ogabbay@kernel.org
256 Description:    Displays a list with information about all the active virtual
257                 address mappings per ASID and all user mappings of HW blocks