18c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/addr 28c2ecf20Sopenharmony_ciDate: Jan 2019 38c2ecf20Sopenharmony_ciKernelVersion: 5.1 48c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 58c2ecf20Sopenharmony_ciDescription: Sets the device address to be used for read or write through 68c2ecf20Sopenharmony_ci PCI bar, or the device VA of a host mapped memory to be read or 78c2ecf20Sopenharmony_ci written directly from the host. The latter option is allowed 88c2ecf20Sopenharmony_ci only when the IOMMU is disabled. 98c2ecf20Sopenharmony_ci The acceptable value is a string that starts with "0x" 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/clk_gate 128c2ecf20Sopenharmony_ciDate: May 2020 138c2ecf20Sopenharmony_ciKernelVersion: 5.8 148c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 158c2ecf20Sopenharmony_ciDescription: Allow the root user to disable/enable in runtime the clock 168c2ecf20Sopenharmony_ci gating mechanism in Gaudi. Due to how Gaudi is built, the 178c2ecf20Sopenharmony_ci clock gating needs to be disabled in order to access the 188c2ecf20Sopenharmony_ci registers of the TPC and MME engines. This is sometimes needed 198c2ecf20Sopenharmony_ci during debug by the user and hence the user needs this option. 208c2ecf20Sopenharmony_ci The user can supply a bitmask value, each bit represents 218c2ecf20Sopenharmony_ci a different engine to disable/enable its clock gating feature. 228c2ecf20Sopenharmony_ci The bitmask is composed of 20 bits: 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci ======= ============ 258c2ecf20Sopenharmony_ci 0 - 7 DMA channels 268c2ecf20Sopenharmony_ci 8 - 11 MME engines 278c2ecf20Sopenharmony_ci 12 - 19 TPC engines 288c2ecf20Sopenharmony_ci ======= ============ 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci The bit's location of a specific engine can be determined 318c2ecf20Sopenharmony_ci using (1 << GAUDI_ENGINE_ID_*). GAUDI_ENGINE_ID_* values 328c2ecf20Sopenharmony_ci are defined in uapi habanalabs.h file in enum gaudi_engine_id 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/command_buffers 358c2ecf20Sopenharmony_ciDate: Jan 2019 368c2ecf20Sopenharmony_ciKernelVersion: 5.1 378c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 388c2ecf20Sopenharmony_ciDescription: Displays a list with information about the currently allocated 398c2ecf20Sopenharmony_ci command buffers 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/command_submission 428c2ecf20Sopenharmony_ciDate: Jan 2019 438c2ecf20Sopenharmony_ciKernelVersion: 5.1 448c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 458c2ecf20Sopenharmony_ciDescription: Displays a list with information about the currently active 468c2ecf20Sopenharmony_ci command submissions 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs 498c2ecf20Sopenharmony_ciDate: Jan 2019 508c2ecf20Sopenharmony_ciKernelVersion: 5.1 518c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 528c2ecf20Sopenharmony_ciDescription: Displays a list with detailed information about each JOB (CB) of 538c2ecf20Sopenharmony_ci each active command submission 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/data32 568c2ecf20Sopenharmony_ciDate: Jan 2019 578c2ecf20Sopenharmony_ciKernelVersion: 5.1 588c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 598c2ecf20Sopenharmony_ciDescription: Allows the root user to read or write directly through the 608c2ecf20Sopenharmony_ci device's PCI bar. Writing to this file generates a write 618c2ecf20Sopenharmony_ci transaction while reading from the file generates a read 628c2ecf20Sopenharmony_ci transaction. This custom interface is needed (instead of using 638c2ecf20Sopenharmony_ci the generic Linux user-space PCI mapping) because the DDR bar 648c2ecf20Sopenharmony_ci is very small compared to the DDR memory and only the driver can 658c2ecf20Sopenharmony_ci move the bar before and after the transaction. 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci If the IOMMU is disabled, it also allows the root user to read 688c2ecf20Sopenharmony_ci or write from the host a device VA of a host mapped memory 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/data64 718c2ecf20Sopenharmony_ciDate: Jan 2020 728c2ecf20Sopenharmony_ciKernelVersion: 5.6 738c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 748c2ecf20Sopenharmony_ciDescription: Allows the root user to read or write 64 bit data directly 758c2ecf20Sopenharmony_ci through the device's PCI bar. Writing to this file generates a 768c2ecf20Sopenharmony_ci write transaction while reading from the file generates a read 778c2ecf20Sopenharmony_ci transaction. This custom interface is needed (instead of using 788c2ecf20Sopenharmony_ci the generic Linux user-space PCI mapping) because the DDR bar 798c2ecf20Sopenharmony_ci is very small compared to the DDR memory and only the driver can 808c2ecf20Sopenharmony_ci move the bar before and after the transaction. 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci If the IOMMU is disabled, it also allows the root user to read 838c2ecf20Sopenharmony_ci or write from the host a device VA of a host mapped memory 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/device 868c2ecf20Sopenharmony_ciDate: Jan 2019 878c2ecf20Sopenharmony_ciKernelVersion: 5.1 888c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 898c2ecf20Sopenharmony_ciDescription: Enables the root user to set the device to specific state. 908c2ecf20Sopenharmony_ci Valid values are "disable", "enable", "suspend", "resume". 918c2ecf20Sopenharmony_ci User can read this property to see the valid values 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/engines 948c2ecf20Sopenharmony_ciDate: Jul 2019 958c2ecf20Sopenharmony_ciKernelVersion: 5.3 968c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 978c2ecf20Sopenharmony_ciDescription: Displays the status registers values of the device engines and 988c2ecf20Sopenharmony_ci their derived idle status 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_addr 1018c2ecf20Sopenharmony_ciDate: Jan 2019 1028c2ecf20Sopenharmony_ciKernelVersion: 5.1 1038c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1048c2ecf20Sopenharmony_ciDescription: Sets I2C device address for I2C transaction that is generated 1058c2ecf20Sopenharmony_ci by the device's CPU 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_bus 1088c2ecf20Sopenharmony_ciDate: Jan 2019 1098c2ecf20Sopenharmony_ciKernelVersion: 5.1 1108c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1118c2ecf20Sopenharmony_ciDescription: Sets I2C bus address for I2C transaction that is generated by 1128c2ecf20Sopenharmony_ci the device's CPU 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_data 1158c2ecf20Sopenharmony_ciDate: Jan 2019 1168c2ecf20Sopenharmony_ciKernelVersion: 5.1 1178c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1188c2ecf20Sopenharmony_ciDescription: Triggers an I2C transaction that is generated by the device's 1198c2ecf20Sopenharmony_ci CPU. Writing to this file generates a write transaction while 1208c2ecf20Sopenharmony_ci reading from the file generates a read transcation 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_reg 1238c2ecf20Sopenharmony_ciDate: Jan 2019 1248c2ecf20Sopenharmony_ciKernelVersion: 5.1 1258c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1268c2ecf20Sopenharmony_ciDescription: Sets I2C register id for I2C transaction that is generated by 1278c2ecf20Sopenharmony_ci the device's CPU 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/led0 1308c2ecf20Sopenharmony_ciDate: Jan 2019 1318c2ecf20Sopenharmony_ciKernelVersion: 5.1 1328c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1338c2ecf20Sopenharmony_ciDescription: Sets the state of the first S/W led on the device 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/led1 1368c2ecf20Sopenharmony_ciDate: Jan 2019 1378c2ecf20Sopenharmony_ciKernelVersion: 5.1 1388c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1398c2ecf20Sopenharmony_ciDescription: Sets the state of the second S/W led on the device 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/led2 1428c2ecf20Sopenharmony_ciDate: Jan 2019 1438c2ecf20Sopenharmony_ciKernelVersion: 5.1 1448c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1458c2ecf20Sopenharmony_ciDescription: Sets the state of the third S/W led on the device 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/mmu 1488c2ecf20Sopenharmony_ciDate: Jan 2019 1498c2ecf20Sopenharmony_ciKernelVersion: 5.1 1508c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1518c2ecf20Sopenharmony_ciDescription: Displays the hop values and physical address for a given ASID 1528c2ecf20Sopenharmony_ci and virtual address. The user should write the ASID and VA into 1538c2ecf20Sopenharmony_ci the file and then read the file to get the result. 1548c2ecf20Sopenharmony_ci e.g. to display info about VA 0x1000 for ASID 1 you need to do: 1558c2ecf20Sopenharmony_ci echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu 1568c2ecf20Sopenharmony_ci 1578c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/set_power_state 1588c2ecf20Sopenharmony_ciDate: Jan 2019 1598c2ecf20Sopenharmony_ciKernelVersion: 5.1 1608c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1618c2ecf20Sopenharmony_ciDescription: Sets the PCI power state. Valid values are "1" for D0 and "2" 1628c2ecf20Sopenharmony_ci for D3Hot 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/userptr 1658c2ecf20Sopenharmony_ciDate: Jan 2019 1668c2ecf20Sopenharmony_ciKernelVersion: 5.1 1678c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1688c2ecf20Sopenharmony_ciDescription: Displays a list with information about the currently user 1698c2ecf20Sopenharmony_ci pointers (user virtual addresses) that are pinned and mapped 1708c2ecf20Sopenharmony_ci to DMA addresses 1718c2ecf20Sopenharmony_ci 1728c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/vm 1738c2ecf20Sopenharmony_ciDate: Jan 2019 1748c2ecf20Sopenharmony_ciKernelVersion: 5.1 1758c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1768c2ecf20Sopenharmony_ciDescription: Displays a list with information about all the active virtual 1778c2ecf20Sopenharmony_ci address mappings per ASID 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/stop_on_err 1808c2ecf20Sopenharmony_ciDate: Mar 2020 1818c2ecf20Sopenharmony_ciKernelVersion: 5.6 1828c2ecf20Sopenharmony_ciContact: oded.gabbay@gmail.com 1838c2ecf20Sopenharmony_ciDescription: Sets the stop-on_error option for the device engines. Value of 1848c2ecf20Sopenharmony_ci "0" is for disable, otherwise enable. 185