blob: 2667cbf940f385b64032b4b32db7c94363948f14 [file] [log] [blame]
Oded Gabbayc2164772019-02-16 00:39:24 +02001What: /sys/kernel/debug/habanalabs/hl<n>/addr
2Date: Jan 2019
3KernelVersion: 5.1
Oded Gabbay2f8db5a2021-01-12 15:13:06 +02004Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +02005Description: Sets the device address to be used for read or write through
Tomer Tayar4a0ce772019-06-16 13:48:29 +00006 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"
Oded Gabbayc2164772019-02-16 00:39:24 +020010
Oded Gabbayca624332020-05-09 12:17:21 +030011What: /sys/kernel/debug/habanalabs/hl<n>/clk_gate
12Date: May 2020
13KernelVersion: 5.8
Oded Gabbay2f8db5a2021-01-12 15:13:06 +020014Contact: ogabbay@kernel.org
Oded Gabbayca624332020-05-09 12:17:21 +030015Description: 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
Oded Gabbaye38bfd32020-07-03 20:46:12 +030019 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:
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010023
Tomer Tayara9ecddb2021-11-14 09:29:48 +020024 ======= ============
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010025 0 - 7 DMA channels
26 8 - 11 MME engines
27 12 - 19 TPC engines
Tomer Tayara9ecddb2021-11-14 09:29:48 +020028 ======= ============
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010029
Oded Gabbaye38bfd32020-07-03 20:46:12 +030030 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
Oded Gabbayca624332020-05-09 12:17:21 +030033
Oded Gabbayc2164772019-02-16 00:39:24 +020034What: /sys/kernel/debug/habanalabs/hl<n>/command_buffers
35Date: Jan 2019
36KernelVersion: 5.1
Oded Gabbay2f8db5a2021-01-12 15:13:06 +020037Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +020038Description: 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
Oded Gabbay2f8db5a2021-01-12 15:13:06 +020044Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +020045Description: 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
Oded Gabbay2f8db5a2021-01-12 15:13:06 +020051Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +020052Description: 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
Oded Gabbay2f8db5a2021-01-12 15:13:06 +020058Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +020059Description: 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
Tomer Tayar4a0ce772019-06-16 13:48:29 +000062 transaction. This custom interface is needed (instead of using
Oded Gabbayc2164772019-02-16 00:39:24 +020063 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
Tomer Tayar4a0ce772019-06-16 13:48:29 +000065 move the bar before and after the transaction.
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010066
Tomer Tayar4a0ce772019-06-16 13:48:29 +000067 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
Oded Gabbayc2164772019-02-16 00:39:24 +020069
Moti Haimovski5cce5142019-11-12 09:40:11 +020070What: /sys/kernel/debug/habanalabs/hl<n>/data64
71Date: Jan 2020
72KernelVersion: 5.6
Oded Gabbay2f8db5a2021-01-12 15:13:06 +020073Contact: ogabbay@kernel.org
Moti Haimovski5cce5142019-11-12 09:40:11 +020074Description: 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.
Mauro Carvalho Chehab54a19b42020-10-30 08:40:50 +010081
Moti Haimovski5cce5142019-11-12 09:40:11 +020082 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
Oded Gabbay639781d2021-04-02 01:43:18 +030085What: /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
Oded Gabbayc2164772019-02-16 00:39:24 +0200103What: /sys/kernel/debug/habanalabs/hl<n>/device
104Date: Jan 2019
105KernelVersion: 5.1
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200106Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200107Description: 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
Oded Gabbay639781d2021-04-02 01:43:18 +0300111What: /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
Tomer Tayar06deb862019-07-01 13:59:45 +0000129What: /sys/kernel/debug/habanalabs/hl<n>/engines
130Date: Jul 2019
131KernelVersion: 5.3
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200132Contact: ogabbay@kernel.org
Tomer Tayar06deb862019-07-01 13:59:45 +0000133Description: Displays the status registers values of the device engines and
134 their derived idle status
135
Oded Gabbayc2164772019-02-16 00:39:24 +0200136What: /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
137Date: Jan 2019
138KernelVersion: 5.1
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200139Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200140Description: 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
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200146Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200147Description: 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
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200153Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200154Description: Triggers an I2C transaction that is generated by the device's
155 CPU. Writing to this file generates a write transaction while
Carlos Bilbao3e42d1d2021-05-13 09:31:10 -0400156 reading from the file generates a read transaction
Oded Gabbayc2164772019-02-16 00:39:24 +0200157
Ofir Bitton3eb77542021-10-12 20:52:46 +0300158What: /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
Oded Gabbayc2164772019-02-16 00:39:24 +0200165What: /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
166Date: Jan 2019
167KernelVersion: 5.1
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200168Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200169Description: 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
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200175Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200176Description: 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
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200181Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200182Description: 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
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200187Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200188Description: 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
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200193Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200194Description: 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
Oded Gabbay639781d2021-04-02 01:43:18 +0300200What: /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
Oded Gabbayc2164772019-02-16 00:39:24 +0200210What: /sys/kernel/debug/habanalabs/hl<n>/set_power_state
211Date: Jan 2019
212KernelVersion: 5.1
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200213Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200214Description: Sets the PCI power state. Valid values are "1" for D0 and "2"
215 for D3Hot
216
Yuri Nudelman4d041212021-06-13 09:22:20 +0300217What: /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
Yuri Nudelman938b7932021-06-06 10:28:51 +0300225What: /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
Oded Gabbay639781d2021-04-02 01:43:18 +0300236What: /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
Tomer Tayara9ecddb2021-11-14 09:29:48 +0200243What: /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
Oded Gabbayc2164772019-02-16 00:39:24 +0200249What: /sys/kernel/debug/habanalabs/hl<n>/userptr
250Date: Jan 2019
251KernelVersion: 5.1
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200252Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200253Description: Displays a list with information about the currently user
254 pointers (user virtual addresses) that are pinned and mapped
255 to DMA addresses
256
Yuri Nudelman89b21362021-07-29 11:44:28 +0300257What: /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
Oded Gabbayc2164772019-02-16 00:39:24 +0200265What: /sys/kernel/debug/habanalabs/hl<n>/vm
266Date: Jan 2019
267KernelVersion: 5.1
Oded Gabbay2f8db5a2021-01-12 15:13:06 +0200268Contact: ogabbay@kernel.org
Oded Gabbayc2164772019-02-16 00:39:24 +0200269Description: Displays a list with information about all the active virtual
Sagiv Ozeria4371c12021-02-23 11:01:08 +0200270 address mappings per ASID and all user mappings of HW blocks