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