1 What: /sys/kernel/debug/habanalabs/hl<n>/addr
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"
11 What: /sys/kernel/debug/habanalabs/hl<n>/clk_gate
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:
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
34 What: /sys/kernel/debug/habanalabs/hl<n>/command_buffers
37 Contact: ogabbay@kernel.org
38 Description: Displays a list with information about the currently allocated
41 What: /sys/kernel/debug/habanalabs/hl<n>/command_submission
44 Contact: ogabbay@kernel.org
45 Description: Displays a list with information about the currently active
48 What: /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs
51 Contact: ogabbay@kernel.org
52 Description: Displays a list with detailed information about each JOB (CB) of
53 each active command submission
55 What: /sys/kernel/debug/habanalabs/hl<n>/data32
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.
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
70 What: /sys/kernel/debug/habanalabs/hl<n>/data64
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.
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
85 What: /sys/kernel/debug/habanalabs/hl<n>/data_dma
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
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
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
101 Only supported on GAUDI at this stage.
103 What: /sys/kernel/debug/habanalabs/hl<n>/device
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
111 What: /sys/kernel/debug/habanalabs/hl<n>/dma_size
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"
121 What: /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations
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
129 What: /sys/kernel/debug/habanalabs/hl<n>/engines
132 Contact: ogabbay@kernel.org
133 Description: Displays the status registers values of the device engines and
134 their derived idle status
136 What: /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
139 Contact: ogabbay@kernel.org
140 Description: Sets I2C device address for I2C transaction that is generated
143 What: /sys/kernel/debug/habanalabs/hl<n>/i2c_bus
146 Contact: ogabbay@kernel.org
147 Description: Sets I2C bus address for I2C transaction that is generated by
150 What: /sys/kernel/debug/habanalabs/hl<n>/i2c_data
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
158 What: /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
161 Contact: ogabbay@kernel.org
162 Description: Sets I2C register id for I2C transaction that is generated by
165 What: /sys/kernel/debug/habanalabs/hl<n>/led0
168 Contact: ogabbay@kernel.org
169 Description: Sets the state of the first S/W led on the device
171 What: /sys/kernel/debug/habanalabs/hl<n>/led1
174 Contact: ogabbay@kernel.org
175 Description: Sets the state of the second S/W led on the device
177 What: /sys/kernel/debug/habanalabs/hl<n>/led2
180 Contact: ogabbay@kernel.org
181 Description: Sets the state of the third S/W led on the device
183 What: /sys/kernel/debug/habanalabs/hl<n>/mmu
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
193 What: /sys/kernel/debug/habanalabs/hl<n>/mmu_error
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
203 What: /sys/kernel/debug/habanalabs/hl<n>/set_power_state
206 Contact: ogabbay@kernel.org
207 Description: Sets the PCI power state. Valid values are "1" for D0 and "2"
210 What: /sys/kernel/debug/habanalabs/hl<n>/skip_reset_on_timeout
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.
218 What: /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
221 Contact: ogabbay@kernel.org
222 Description: Sets the stop-on_error option for the device engines. Value of
223 "0" is for disable, otherwise enable.
225 What: /sys/kernel/debug/habanalabs/hl<n>/userptr
228 Contact: ogabbay@kernel.org
229 Description: Displays a list with information about the currently user
230 pointers (user virtual addresses) that are pinned and mapped
233 What: /sys/kernel/debug/habanalabs/hl<n>/vm
236 Contact: ogabbay@kernel.org
237 Description: Displays a list with information about all the active virtual
238 address mappings per ASID and all user mappings of HW blocks