162306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/addr 262306a36Sopenharmony_ciDate: Jan 2019 362306a36Sopenharmony_ciKernelVersion: 5.1 462306a36Sopenharmony_ciContact: ogabbay@kernel.org 562306a36Sopenharmony_ciDescription: Sets the device address to be used for read or write through 662306a36Sopenharmony_ci PCI bar, or the device VA of a host mapped memory to be read or 762306a36Sopenharmony_ci written directly from the host. The latter option is allowed 862306a36Sopenharmony_ci only when the IOMMU is disabled. 962306a36Sopenharmony_ci The acceptable value is a string that starts with "0x" 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/clk_gate 1262306a36Sopenharmony_ciDate: May 2020 1362306a36Sopenharmony_ciKernelVersion: 5.8 1462306a36Sopenharmony_ciContact: ogabbay@kernel.org 1562306a36Sopenharmony_ciDescription: This setting is now deprecated as clock gating is handled solely by the f/w 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/command_buffers 1862306a36Sopenharmony_ciDate: Jan 2019 1962306a36Sopenharmony_ciKernelVersion: 5.1 2062306a36Sopenharmony_ciContact: ogabbay@kernel.org 2162306a36Sopenharmony_ciDescription: Displays a list with information about the currently allocated 2262306a36Sopenharmony_ci command buffers 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/command_submission 2562306a36Sopenharmony_ciDate: Jan 2019 2662306a36Sopenharmony_ciKernelVersion: 5.1 2762306a36Sopenharmony_ciContact: ogabbay@kernel.org 2862306a36Sopenharmony_ciDescription: Displays a list with information about the currently active 2962306a36Sopenharmony_ci command submissions 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs 3262306a36Sopenharmony_ciDate: Jan 2019 3362306a36Sopenharmony_ciKernelVersion: 5.1 3462306a36Sopenharmony_ciContact: ogabbay@kernel.org 3562306a36Sopenharmony_ciDescription: Displays a list with detailed information about each JOB (CB) of 3662306a36Sopenharmony_ci each active command submission 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/data32 3962306a36Sopenharmony_ciDate: Jan 2019 4062306a36Sopenharmony_ciKernelVersion: 5.1 4162306a36Sopenharmony_ciContact: ogabbay@kernel.org 4262306a36Sopenharmony_ciDescription: Allows the root user to read or write directly through the 4362306a36Sopenharmony_ci device's PCI bar. Writing to this file generates a write 4462306a36Sopenharmony_ci transaction while reading from the file generates a read 4562306a36Sopenharmony_ci transaction. This custom interface is needed (instead of using 4662306a36Sopenharmony_ci the generic Linux user-space PCI mapping) because the DDR bar 4762306a36Sopenharmony_ci is very small compared to the DDR memory and only the driver can 4862306a36Sopenharmony_ci move the bar before and after the transaction. 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci If the IOMMU is disabled, it also allows the root user to read 5162306a36Sopenharmony_ci or write from the host a device VA of a host mapped memory 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/data64 5462306a36Sopenharmony_ciDate: Jan 2020 5562306a36Sopenharmony_ciKernelVersion: 5.6 5662306a36Sopenharmony_ciContact: ogabbay@kernel.org 5762306a36Sopenharmony_ciDescription: Allows the root user to read or write 64 bit data directly 5862306a36Sopenharmony_ci through the device's PCI bar. Writing to this file generates a 5962306a36Sopenharmony_ci write transaction while reading from the file generates a read 6062306a36Sopenharmony_ci transaction. This custom interface is needed (instead of using 6162306a36Sopenharmony_ci the generic Linux user-space PCI mapping) because the DDR bar 6262306a36Sopenharmony_ci is very small compared to the DDR memory and only the driver can 6362306a36Sopenharmony_ci move the bar before and after the transaction. 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci If the IOMMU is disabled, it also allows the root user to read 6662306a36Sopenharmony_ci or write from the host a device VA of a host mapped memory 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/data_dma 6962306a36Sopenharmony_ciDate: Apr 2021 7062306a36Sopenharmony_ciKernelVersion: 5.13 7162306a36Sopenharmony_ciContact: ogabbay@kernel.org 7262306a36Sopenharmony_ciDescription: Allows the root user to read from the device's internal 7362306a36Sopenharmony_ci memory (DRAM/SRAM) through a DMA engine. 7462306a36Sopenharmony_ci This property is a binary blob that contains the result of the 7562306a36Sopenharmony_ci DMA transfer. 7662306a36Sopenharmony_ci This custom interface is needed (instead of using the generic 7762306a36Sopenharmony_ci Linux user-space PCI mapping) because the amount of internal 7862306a36Sopenharmony_ci memory is huge (>32GB) and reading it via the PCI bar will take 7962306a36Sopenharmony_ci a very long time. 8062306a36Sopenharmony_ci This interface doesn't support concurrency in the same device. 8162306a36Sopenharmony_ci In GAUDI and GOYA, this action can cause undefined behavior 8262306a36Sopenharmony_ci in case the it is done while the device is executing user 8362306a36Sopenharmony_ci workloads. 8462306a36Sopenharmony_ci Only supported on GAUDI at this stage. 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/device 8762306a36Sopenharmony_ciDate: Jan 2019 8862306a36Sopenharmony_ciKernelVersion: 5.1 8962306a36Sopenharmony_ciContact: ogabbay@kernel.org 9062306a36Sopenharmony_ciDescription: Enables the root user to set the device to specific state. 9162306a36Sopenharmony_ci Valid values are "disable", "enable", "suspend", "resume". 9262306a36Sopenharmony_ci User can read this property to see the valid values 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/device_release_watchdog_timeout 9562306a36Sopenharmony_ciDate: Oct 2022 9662306a36Sopenharmony_ciKernelVersion: 6.2 9762306a36Sopenharmony_ciContact: ttayar@habana.ai 9862306a36Sopenharmony_ciDescription: The watchdog timeout value in seconds for a device release upon 9962306a36Sopenharmony_ci certain error cases, after which the device is reset. 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/dma_size 10262306a36Sopenharmony_ciDate: Apr 2021 10362306a36Sopenharmony_ciKernelVersion: 5.13 10462306a36Sopenharmony_ciContact: ogabbay@kernel.org 10562306a36Sopenharmony_ciDescription: Specify the size of the DMA transaction when using DMA to read 10662306a36Sopenharmony_ci from the device's internal memory. The value can not be larger 10762306a36Sopenharmony_ci than 128MB. Writing to this value initiates the DMA transfer. 10862306a36Sopenharmony_ci When the write is finished, the user can read the "data_dma" 10962306a36Sopenharmony_ci blob 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/dump_razwi_events 11262306a36Sopenharmony_ciDate: Aug 2022 11362306a36Sopenharmony_ciKernelVersion: 5.20 11462306a36Sopenharmony_ciContact: fkassabri@habana.ai 11562306a36Sopenharmony_ciDescription: Dumps all razwi events to dmesg if exist. 11662306a36Sopenharmony_ci After reading the status register of an existing event 11762306a36Sopenharmony_ci the routine will clear the status register. 11862306a36Sopenharmony_ci Usage: cat dump_razwi_events 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/dump_security_violations 12162306a36Sopenharmony_ciDate: Jan 2021 12262306a36Sopenharmony_ciKernelVersion: 5.12 12362306a36Sopenharmony_ciContact: ogabbay@kernel.org 12462306a36Sopenharmony_ciDescription: Dumps all security violations to dmesg. This will also ack 12562306a36Sopenharmony_ci all security violations meanings those violations will not be 12662306a36Sopenharmony_ci dumped next time user calls this API 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/engines 12962306a36Sopenharmony_ciDate: Jul 2019 13062306a36Sopenharmony_ciKernelVersion: 5.3 13162306a36Sopenharmony_ciContact: ogabbay@kernel.org 13262306a36Sopenharmony_ciDescription: Displays the status registers values of the device engines and 13362306a36Sopenharmony_ci their derived idle status 13462306a36Sopenharmony_ci 13562306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_addr 13662306a36Sopenharmony_ciDate: Jan 2019 13762306a36Sopenharmony_ciKernelVersion: 5.1 13862306a36Sopenharmony_ciContact: ogabbay@kernel.org 13962306a36Sopenharmony_ciDescription: Sets I2C device address for I2C transaction that is generated 14062306a36Sopenharmony_ci by the device's CPU, Not available when device is loaded with secured 14162306a36Sopenharmony_ci firmware 14262306a36Sopenharmony_ci 14362306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_bus 14462306a36Sopenharmony_ciDate: Jan 2019 14562306a36Sopenharmony_ciKernelVersion: 5.1 14662306a36Sopenharmony_ciContact: ogabbay@kernel.org 14762306a36Sopenharmony_ciDescription: Sets I2C bus address for I2C transaction that is generated by 14862306a36Sopenharmony_ci the device's CPU, Not available when device is loaded with secured 14962306a36Sopenharmony_ci firmware 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_data 15262306a36Sopenharmony_ciDate: Jan 2019 15362306a36Sopenharmony_ciKernelVersion: 5.1 15462306a36Sopenharmony_ciContact: ogabbay@kernel.org 15562306a36Sopenharmony_ciDescription: Triggers an I2C transaction that is generated by the device's 15662306a36Sopenharmony_ci CPU. Writing to this file generates a write transaction while 15762306a36Sopenharmony_ci reading from the file generates a read transaction, Not available 15862306a36Sopenharmony_ci when device is loaded with secured firmware 15962306a36Sopenharmony_ci 16062306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_len 16162306a36Sopenharmony_ciDate: Dec 2021 16262306a36Sopenharmony_ciKernelVersion: 5.17 16362306a36Sopenharmony_ciContact: obitton@habana.ai 16462306a36Sopenharmony_ciDescription: Sets I2C length in bytes for I2C transaction that is generated by 16562306a36Sopenharmony_ci the device's CPU, Not available when device is loaded with secured 16662306a36Sopenharmony_ci firmware 16762306a36Sopenharmony_ci 16862306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/i2c_reg 16962306a36Sopenharmony_ciDate: Jan 2019 17062306a36Sopenharmony_ciKernelVersion: 5.1 17162306a36Sopenharmony_ciContact: ogabbay@kernel.org 17262306a36Sopenharmony_ciDescription: Sets I2C register id for I2C transaction that is generated by 17362306a36Sopenharmony_ci the device's CPU, Not available when device is loaded with secured 17462306a36Sopenharmony_ci firmware 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/led0 17762306a36Sopenharmony_ciDate: Jan 2019 17862306a36Sopenharmony_ciKernelVersion: 5.1 17962306a36Sopenharmony_ciContact: ogabbay@kernel.org 18062306a36Sopenharmony_ciDescription: Sets the state of the first S/W led on the device, Not available 18162306a36Sopenharmony_ci when device is loaded with secured firmware 18262306a36Sopenharmony_ci 18362306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/led1 18462306a36Sopenharmony_ciDate: Jan 2019 18562306a36Sopenharmony_ciKernelVersion: 5.1 18662306a36Sopenharmony_ciContact: ogabbay@kernel.org 18762306a36Sopenharmony_ciDescription: Sets the state of the second S/W led on the device, Not available 18862306a36Sopenharmony_ci when device is loaded with secured firmware 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/led2 19162306a36Sopenharmony_ciDate: Jan 2019 19262306a36Sopenharmony_ciKernelVersion: 5.1 19362306a36Sopenharmony_ciContact: ogabbay@kernel.org 19462306a36Sopenharmony_ciDescription: Sets the state of the third S/W led on the device, Not available 19562306a36Sopenharmony_ci when device is loaded with secured firmware 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/memory_scrub 19862306a36Sopenharmony_ciDate: May 2022 19962306a36Sopenharmony_ciKernelVersion: 5.19 20062306a36Sopenharmony_ciContact: dhirschfeld@habana.ai 20162306a36Sopenharmony_ciDescription: Allows the root user to scrub the dram memory. The scrubbing 20262306a36Sopenharmony_ci value can be set using the debugfs file memory_scrub_val. 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/memory_scrub_val 20562306a36Sopenharmony_ciDate: May 2022 20662306a36Sopenharmony_ciKernelVersion: 5.19 20762306a36Sopenharmony_ciContact: dhirschfeld@habana.ai 20862306a36Sopenharmony_ciDescription: The value to which the dram will be set to when the user 20962306a36Sopenharmony_ci scrubs the dram using 'memory_scrub' debugfs file and 21062306a36Sopenharmony_ci the scrubbing value when using module param 'memory_scrub' 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/mmu 21362306a36Sopenharmony_ciDate: Jan 2019 21462306a36Sopenharmony_ciKernelVersion: 5.1 21562306a36Sopenharmony_ciContact: ogabbay@kernel.org 21662306a36Sopenharmony_ciDescription: Displays the hop values and physical address for a given ASID 21762306a36Sopenharmony_ci and virtual address. The user should write the ASID and VA into 21862306a36Sopenharmony_ci the file and then read the file to get the result. 21962306a36Sopenharmony_ci e.g. to display info about VA 0x1000 for ASID 1 you need to do: 22062306a36Sopenharmony_ci echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu 22162306a36Sopenharmony_ci 22262306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/mmu_error 22362306a36Sopenharmony_ciDate: Mar 2021 22462306a36Sopenharmony_ciKernelVersion: 5.12 22562306a36Sopenharmony_ciContact: fkassabri@habana.ai 22662306a36Sopenharmony_ciDescription: Check and display page fault or access violation mmu errors for 22762306a36Sopenharmony_ci all MMUs specified in mmu_cap_mask. 22862306a36Sopenharmony_ci e.g. to display error info for MMU hw cap bit 9, you need to do: 22962306a36Sopenharmony_ci echo "0x200" > /sys/kernel/debug/habanalabs/hl0/mmu_error 23062306a36Sopenharmony_ci cat /sys/kernel/debug/habanalabs/hl0/mmu_error 23162306a36Sopenharmony_ci 23262306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/monitor_dump 23362306a36Sopenharmony_ciDate: Mar 2022 23462306a36Sopenharmony_ciKernelVersion: 5.19 23562306a36Sopenharmony_ciContact: osharabi@habana.ai 23662306a36Sopenharmony_ciDescription: Allows the root user to dump monitors status from the device's 23762306a36Sopenharmony_ci protected config space. 23862306a36Sopenharmony_ci This property is a binary blob that contains the result of the 23962306a36Sopenharmony_ci monitors registers dump. 24062306a36Sopenharmony_ci This custom interface is needed (instead of using the generic 24162306a36Sopenharmony_ci Linux user-space PCI mapping) because this space is protected 24262306a36Sopenharmony_ci and cannot be accessed using PCI read. 24362306a36Sopenharmony_ci This interface doesn't support concurrency in the same device. 24462306a36Sopenharmony_ci Only supported on GAUDI. 24562306a36Sopenharmony_ci 24662306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/monitor_dump_trig 24762306a36Sopenharmony_ciDate: Mar 2022 24862306a36Sopenharmony_ciKernelVersion: 5.19 24962306a36Sopenharmony_ciContact: osharabi@habana.ai 25062306a36Sopenharmony_ciDescription: Triggers dump of monitor data. The value to trigger the operation 25162306a36Sopenharmony_ci must be 1. Triggering the monitor dump operation initiates dump of 25262306a36Sopenharmony_ci current registers values of all monitors. 25362306a36Sopenharmony_ci When the write is finished, the user can read the "monitor_dump" 25462306a36Sopenharmony_ci blob 25562306a36Sopenharmony_ci 25662306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/set_power_state 25762306a36Sopenharmony_ciDate: Jan 2019 25862306a36Sopenharmony_ciKernelVersion: 5.1 25962306a36Sopenharmony_ciContact: ogabbay@kernel.org 26062306a36Sopenharmony_ciDescription: Sets the PCI power state. Valid values are "1" for D0 and "2" 26162306a36Sopenharmony_ci for D3Hot 26262306a36Sopenharmony_ci 26362306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/skip_reset_on_timeout 26462306a36Sopenharmony_ciDate: Jun 2021 26562306a36Sopenharmony_ciKernelVersion: 5.13 26662306a36Sopenharmony_ciContact: ynudelman@habana.ai 26762306a36Sopenharmony_ciDescription: Sets the skip reset on timeout option for the device. Value of 26862306a36Sopenharmony_ci "0" means device will be reset in case some CS has timed out, 26962306a36Sopenharmony_ci otherwise it will not be reset. 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/state_dump 27262306a36Sopenharmony_ciDate: Oct 2021 27362306a36Sopenharmony_ciKernelVersion: 5.15 27462306a36Sopenharmony_ciContact: ynudelman@habana.ai 27562306a36Sopenharmony_ciDescription: Gets the state dump occurring on a CS timeout or failure. 27662306a36Sopenharmony_ci State dump is used for debug and is created each time in case of 27762306a36Sopenharmony_ci a problem in a CS execution, before reset. 27862306a36Sopenharmony_ci Reading from the node returns the newest state dump available. 27962306a36Sopenharmony_ci Writing an integer X discards X state dumps, so that the 28062306a36Sopenharmony_ci next read would return X+1-st newest state dump. 28162306a36Sopenharmony_ci 28262306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/stop_on_err 28362306a36Sopenharmony_ciDate: Mar 2020 28462306a36Sopenharmony_ciKernelVersion: 5.6 28562306a36Sopenharmony_ciContact: ogabbay@kernel.org 28662306a36Sopenharmony_ciDescription: Sets the stop-on_error option for the device engines. Value of 28762306a36Sopenharmony_ci "0" is for disable, otherwise enable. 28862306a36Sopenharmony_ci Relevant only for GOYA and GAUDI. 28962306a36Sopenharmony_ci 29062306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/timeout_locked 29162306a36Sopenharmony_ciDate: Sep 2021 29262306a36Sopenharmony_ciKernelVersion: 5.16 29362306a36Sopenharmony_ciContact: obitton@habana.ai 29462306a36Sopenharmony_ciDescription: Sets the command submission timeout value in seconds. 29562306a36Sopenharmony_ci 29662306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/userptr 29762306a36Sopenharmony_ciDate: Jan 2019 29862306a36Sopenharmony_ciKernelVersion: 5.1 29962306a36Sopenharmony_ciContact: ogabbay@kernel.org 30062306a36Sopenharmony_ciDescription: Displays a list with information about the currently user 30162306a36Sopenharmony_ci pointers (user virtual addresses) that are pinned and mapped 30262306a36Sopenharmony_ci to DMA addresses 30362306a36Sopenharmony_ci 30462306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/userptr_lookup 30562306a36Sopenharmony_ciDate: Oct 2021 30662306a36Sopenharmony_ciKernelVersion: 5.15 30762306a36Sopenharmony_ciContact: ogabbay@kernel.org 30862306a36Sopenharmony_ciDescription: Allows to search for specific user pointers (user virtual 30962306a36Sopenharmony_ci addresses) that are pinned and mapped to DMA addresses, and see 31062306a36Sopenharmony_ci their resolution to the specific dma address. 31162306a36Sopenharmony_ci 31262306a36Sopenharmony_ciWhat: /sys/kernel/debug/habanalabs/hl<n>/vm 31362306a36Sopenharmony_ciDate: Jan 2019 31462306a36Sopenharmony_ciKernelVersion: 5.1 31562306a36Sopenharmony_ciContact: ogabbay@kernel.org 31662306a36Sopenharmony_ciDescription: Displays a list with information about all the active virtual 31762306a36Sopenharmony_ci address mappings per ASID and all user mappings of HW blocks 318