1c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/addr 2c2164773SOded GabbayDate: Jan 2019 3c2164773SOded GabbayKernelVersion: 5.1 4*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 5c2164773SOded GabbayDescription: Sets the device address to be used for read or write through 64a0ce776STomer Tayar PCI bar, or the device VA of a host mapped memory to be read or 74a0ce776STomer Tayar written directly from the host. The latter option is allowed 84a0ce776STomer Tayar only when the IOMMU is disabled. 94a0ce776STomer Tayar The acceptable value is a string that starts with "0x" 10c2164773SOded Gabbay 11ca62433fSOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/clk_gate 12ca62433fSOded GabbayDate: May 2020 13ca62433fSOded GabbayKernelVersion: 5.8 14*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 15ca62433fSOded GabbayDescription: Allow the root user to disable/enable in runtime the clock 16ca62433fSOded Gabbay gating mechanism in Gaudi. Due to how Gaudi is built, the 17ca62433fSOded Gabbay clock gating needs to be disabled in order to access the 18ca62433fSOded Gabbay registers of the TPC and MME engines. This is sometimes needed 19e38bfd30SOded Gabbay during debug by the user and hence the user needs this option. 20e38bfd30SOded Gabbay The user can supply a bitmask value, each bit represents 21e38bfd30SOded Gabbay a different engine to disable/enable its clock gating feature. 22e38bfd30SOded Gabbay The bitmask is composed of 20 bits: 2354a19b4dSMauro Carvalho Chehab 2454a19b4dSMauro Carvalho Chehab ======= ============ 2554a19b4dSMauro Carvalho Chehab 0 - 7 DMA channels 2654a19b4dSMauro Carvalho Chehab 8 - 11 MME engines 2754a19b4dSMauro Carvalho Chehab 12 - 19 TPC engines 2854a19b4dSMauro Carvalho Chehab ======= ============ 2954a19b4dSMauro Carvalho Chehab 30e38bfd30SOded Gabbay The bit's location of a specific engine can be determined 31e38bfd30SOded Gabbay using (1 << GAUDI_ENGINE_ID_*). GAUDI_ENGINE_ID_* values 32e38bfd30SOded Gabbay are defined in uapi habanalabs.h file in enum gaudi_engine_id 33ca62433fSOded Gabbay 34c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/command_buffers 35c2164773SOded GabbayDate: Jan 2019 36c2164773SOded GabbayKernelVersion: 5.1 37*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 38c2164773SOded GabbayDescription: Displays a list with information about the currently allocated 39c2164773SOded Gabbay command buffers 40c2164773SOded Gabbay 41c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/command_submission 42c2164773SOded GabbayDate: Jan 2019 43c2164773SOded GabbayKernelVersion: 5.1 44*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 45c2164773SOded GabbayDescription: Displays a list with information about the currently active 46c2164773SOded Gabbay command submissions 47c2164773SOded Gabbay 48c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs 49c2164773SOded GabbayDate: Jan 2019 50c2164773SOded GabbayKernelVersion: 5.1 51*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 52c2164773SOded GabbayDescription: Displays a list with detailed information about each JOB (CB) of 53c2164773SOded Gabbay each active command submission 54c2164773SOded Gabbay 55c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/data32 56c2164773SOded GabbayDate: Jan 2019 57c2164773SOded GabbayKernelVersion: 5.1 58*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 59c2164773SOded GabbayDescription: Allows the root user to read or write directly through the 60c2164773SOded Gabbay device's PCI bar. Writing to this file generates a write 61c2164773SOded Gabbay transaction while reading from the file generates a read 624a0ce776STomer Tayar transaction. This custom interface is needed (instead of using 63c2164773SOded Gabbay the generic Linux user-space PCI mapping) because the DDR bar 64c2164773SOded Gabbay is very small compared to the DDR memory and only the driver can 654a0ce776STomer Tayar move the bar before and after the transaction. 6654a19b4dSMauro Carvalho Chehab 674a0ce776STomer Tayar If the IOMMU is disabled, it also allows the root user to read 684a0ce776STomer Tayar or write from the host a device VA of a host mapped memory 69c2164773SOded Gabbay 705cce5146SMoti HaimovskiWhat: /sys/kernel/debug/habanalabs/hl<n>/data64 715cce5146SMoti HaimovskiDate: Jan 2020 725cce5146SMoti HaimovskiKernelVersion: 5.6 73*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 745cce5146SMoti HaimovskiDescription: Allows the root user to read or write 64 bit data directly 755cce5146SMoti Haimovski through the device's PCI bar. Writing to this file generates a 765cce5146SMoti Haimovski write transaction while reading from the file generates a read 775cce5146SMoti Haimovski transaction. This custom interface is needed (instead of using 785cce5146SMoti Haimovski the generic Linux user-space PCI mapping) because the DDR bar 795cce5146SMoti Haimovski is very small compared to the DDR memory and only the driver can 805cce5146SMoti Haimovski move the bar before and after the transaction. 8154a19b4dSMauro Carvalho Chehab 825cce5146SMoti Haimovski If the IOMMU is disabled, it also allows the root user to read 835cce5146SMoti Haimovski or write from the host a device VA of a host mapped memory 845cce5146SMoti Haimovski 85c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/device 86c2164773SOded GabbayDate: Jan 2019 87c2164773SOded GabbayKernelVersion: 5.1 88*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 89c2164773SOded GabbayDescription: Enables the root user to set the device to specific state. 90c2164773SOded Gabbay Valid values are "disable", "enable", "suspend", "resume". 91c2164773SOded Gabbay User can read this property to see the valid values 92c2164773SOded Gabbay 9306deb86aSTomer TayarWhat: /sys/kernel/debug/habanalabs/hl<n>/engines 9406deb86aSTomer TayarDate: Jul 2019 9506deb86aSTomer TayarKernelVersion: 5.3 96*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 9706deb86aSTomer TayarDescription: Displays the status registers values of the device engines and 9806deb86aSTomer Tayar their derived idle status 9906deb86aSTomer Tayar 100c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_addr 101c2164773SOded GabbayDate: Jan 2019 102c2164773SOded GabbayKernelVersion: 5.1 103*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 104c2164773SOded GabbayDescription: Sets I2C device address for I2C transaction that is generated 105c2164773SOded Gabbay by the device's CPU 106c2164773SOded Gabbay 107c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_bus 108c2164773SOded GabbayDate: Jan 2019 109c2164773SOded GabbayKernelVersion: 5.1 110*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 111c2164773SOded GabbayDescription: Sets I2C bus address for I2C transaction that is generated by 112c2164773SOded Gabbay the device's CPU 113c2164773SOded Gabbay 114c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_data 115c2164773SOded GabbayDate: Jan 2019 116c2164773SOded GabbayKernelVersion: 5.1 117*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 118c2164773SOded GabbayDescription: Triggers an I2C transaction that is generated by the device's 119c2164773SOded Gabbay CPU. Writing to this file generates a write transaction while 120c2164773SOded Gabbay reading from the file generates a read transcation 121c2164773SOded Gabbay 122c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_reg 123c2164773SOded GabbayDate: Jan 2019 124c2164773SOded GabbayKernelVersion: 5.1 125*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 126c2164773SOded GabbayDescription: Sets I2C register id for I2C transaction that is generated by 127c2164773SOded Gabbay the device's CPU 128c2164773SOded Gabbay 129c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/led0 130c2164773SOded GabbayDate: Jan 2019 131c2164773SOded GabbayKernelVersion: 5.1 132*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 133c2164773SOded GabbayDescription: Sets the state of the first S/W led on the device 134c2164773SOded Gabbay 135c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/led1 136c2164773SOded GabbayDate: Jan 2019 137c2164773SOded GabbayKernelVersion: 5.1 138*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 139c2164773SOded GabbayDescription: Sets the state of the second S/W led on the device 140c2164773SOded Gabbay 141c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/led2 142c2164773SOded GabbayDate: Jan 2019 143c2164773SOded GabbayKernelVersion: 5.1 144*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 145c2164773SOded GabbayDescription: Sets the state of the third S/W led on the device 146c2164773SOded Gabbay 147c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/mmu 148c2164773SOded GabbayDate: Jan 2019 149c2164773SOded GabbayKernelVersion: 5.1 150*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 151c2164773SOded GabbayDescription: Displays the hop values and physical address for a given ASID 152c2164773SOded Gabbay and virtual address. The user should write the ASID and VA into 153c2164773SOded Gabbay the file and then read the file to get the result. 154c2164773SOded Gabbay e.g. to display info about VA 0x1000 for ASID 1 you need to do: 155c2164773SOded Gabbay echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu 156c2164773SOded Gabbay 157c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/set_power_state 158c2164773SOded GabbayDate: Jan 2019 159c2164773SOded GabbayKernelVersion: 5.1 160*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 161c2164773SOded GabbayDescription: Sets the PCI power state. Valid values are "1" for D0 and "2" 162c2164773SOded Gabbay for D3Hot 163c2164773SOded Gabbay 164c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/userptr 165c2164773SOded GabbayDate: Jan 2019 166c2164773SOded GabbayKernelVersion: 5.1 167*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 168c2164773SOded GabbayDescription: Displays a list with information about the currently user 169c2164773SOded Gabbay pointers (user virtual addresses) that are pinned and mapped 170c2164773SOded Gabbay to DMA addresses 171c2164773SOded Gabbay 172c2164773SOded GabbayWhat: /sys/kernel/debug/habanalabs/hl<n>/vm 173c2164773SOded GabbayDate: Jan 2019 174c2164773SOded GabbayKernelVersion: 5.1 175*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 176c2164773SOded GabbayDescription: Displays a list with information about all the active virtual 177c2164773SOded Gabbay address mappings per ASID 17876cedc73SOmer Shpigelman 17976cedc73SOmer ShpigelmanWhat: /sys/kernel/debug/habanalabs/hl<n>/stop_on_err 18076cedc73SOmer ShpigelmanDate: Mar 2020 18176cedc73SOmer ShpigelmanKernelVersion: 5.6 182*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 18376cedc73SOmer ShpigelmanDescription: Sets the stop-on_error option for the device engines. Value of 18476cedc73SOmer Shpigelman "0" is for disable, otherwise enable. 185d2b980f3SOfir Bitton 186d2b980f3SOfir BittonWhat: /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations 187d2b980f3SOfir BittonDate: Jan 2021 188d2b980f3SOfir BittonKernelVersion: 5.12 189*2f8db5a1SOded GabbayContact: ogabbay@kernel.org 190d2b980f3SOfir BittonDescription: Dumps all security violations to dmesg. This will also ack 191d2b980f3SOfir Bitton all security violations meanings those violations will not be 192d2b980f3SOfir Bitton dumped next time user calls this API 193