debugfs-driver-habanalabs 14 KB

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