^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/kernel/debug/habanalabs/hl<n>/addr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Description: Sets the device address to be used for read or write through
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) PCI bar, or the device VA of a host mapped memory to be read or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) written directly from the host. The latter option is allowed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) only when the IOMMU is disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) The acceptable value is a string that starts with "0x"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) What: /sys/kernel/debug/habanalabs/hl<n>/clk_gate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) Date: May 2020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) KernelVersion: 5.8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) Description: Allow the root user to disable/enable in runtime the clock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) gating mechanism in Gaudi. Due to how Gaudi is built, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) clock gating needs to be disabled in order to access the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) registers of the TPC and MME engines. This is sometimes needed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) during debug by the user and hence the user needs this option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) The user can supply a bitmask value, each bit represents
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) a different engine to disable/enable its clock gating feature.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) The bitmask is composed of 20 bits:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) ======= ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 0 - 7 DMA channels
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 8 - 11 MME engines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 12 - 19 TPC engines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) ======= ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) The bit's location of a specific engine can be determined
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) using (1 << GAUDI_ENGINE_ID_*). GAUDI_ENGINE_ID_* values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) are defined in uapi habanalabs.h file in enum gaudi_engine_id
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) What: /sys/kernel/debug/habanalabs/hl<n>/command_buffers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) Description: Displays a list with information about the currently allocated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) command buffers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) What: /sys/kernel/debug/habanalabs/hl<n>/command_submission
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) Description: Displays a list with information about the currently active
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) command submissions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) What: /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) Description: Displays a list with detailed information about each JOB (CB) of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) each active command submission
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) What: /sys/kernel/debug/habanalabs/hl<n>/data32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) Description: Allows the root user to read or write directly through the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) device's PCI bar. Writing to this file generates a write
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) transaction while reading from the file generates a read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) transaction. This custom interface is needed (instead of using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) the generic Linux user-space PCI mapping) because the DDR bar
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) is very small compared to the DDR memory and only the driver can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) move the bar before and after the transaction.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) If the IOMMU is disabled, it also allows the root user to read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) or write from the host a device VA of a host mapped memory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) What: /sys/kernel/debug/habanalabs/hl<n>/data64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) Date: Jan 2020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) KernelVersion: 5.6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) Description: Allows the root user to read or write 64 bit data directly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) through the device's PCI bar. Writing to this file generates a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) write transaction while reading from the file generates a read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) transaction. This custom interface is needed (instead of using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) the generic Linux user-space PCI mapping) because the DDR bar
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) is very small compared to the DDR memory and only the driver can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) move the bar before and after the transaction.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) If the IOMMU is disabled, it also allows the root user to read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) or write from the host a device VA of a host mapped memory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) What: /sys/kernel/debug/habanalabs/hl<n>/device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) Description: Enables the root user to set the device to specific state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) Valid values are "disable", "enable", "suspend", "resume".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) User can read this property to see the valid values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) What: /sys/kernel/debug/habanalabs/hl<n>/engines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) Date: Jul 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) KernelVersion: 5.3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) Description: Displays the status registers values of the device engines and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) their derived idle status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) What: /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) Description: Sets I2C device address for I2C transaction that is generated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) by the device's CPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) What: /sys/kernel/debug/habanalabs/hl<n>/i2c_bus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) Description: Sets I2C bus address for I2C transaction that is generated by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) the device's CPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) What: /sys/kernel/debug/habanalabs/hl<n>/i2c_data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) Description: Triggers an I2C transaction that is generated by the device's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) CPU. Writing to this file generates a write transaction while
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) reading from the file generates a read transcation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) What: /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) Description: Sets I2C register id for I2C transaction that is generated by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) the device's CPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) What: /sys/kernel/debug/habanalabs/hl<n>/led0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) Description: Sets the state of the first S/W led on the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) What: /sys/kernel/debug/habanalabs/hl<n>/led1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) Description: Sets the state of the second S/W led on the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) What: /sys/kernel/debug/habanalabs/hl<n>/led2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) Description: Sets the state of the third S/W led on the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) What: /sys/kernel/debug/habanalabs/hl<n>/mmu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) Description: Displays the hop values and physical address for a given ASID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) and virtual address. The user should write the ASID and VA into
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) the file and then read the file to get the result.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) e.g. to display info about VA 0x1000 for ASID 1 you need to do:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) What: /sys/kernel/debug/habanalabs/hl<n>/set_power_state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) Description: Sets the PCI power state. Valid values are "1" for D0 and "2"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) for D3Hot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) What: /sys/kernel/debug/habanalabs/hl<n>/userptr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) Description: Displays a list with information about the currently user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) pointers (user virtual addresses) that are pinned and mapped
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) to DMA addresses
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) What: /sys/kernel/debug/habanalabs/hl<n>/vm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) Date: Jan 2019
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) KernelVersion: 5.1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) Description: Displays a list with information about all the active virtual
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) address mappings per ASID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) What: /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) Date: Mar 2020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) KernelVersion: 5.6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) Contact: oded.gabbay@gmail.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) Description: Sets the stop-on_error option for the device engines. Value of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) "0" is for disable, otherwise enable.