Lines Matching +full:exported +full:- +full:sram

1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
3 * Copyright 2016-2023 HabanaLabs, Ltd.
14 * Defines that are asic-specific but constitutes as ABI between kernel driver
195 * stream id is a running number from 0 up to (N-1), where N is the number
656 * enum hl_goya_dma_direction - Direction of DMA operation inside a LIN_DMA packet that is
661 * @HL_DMA_HOST_TO_SRAM: DMA operation from Host memory to GOYA's SRAM.
662 * @HL_DMA_DRAM_TO_SRAM: DMA operation from GOYA's DDR to GOYA's SRAM.
663 * @HL_DMA_SRAM_TO_DRAM: DMA operation from GOYA's SRAM to GOYA's DDR.
664 * @HL_DMA_SRAM_TO_HOST: DMA operation from GOYA's SRAM to Host memory.
667 * @HL_DMA_SRAM_TO_SRAM: DMA operation from GOYA's SRAM to GOYA's SRAM.
683 * enum hl_device_status - Device status information.
715 * Notifier event values - for the notification mechanism and the HL_INFO_GET_EVENTS command
717 * HL_NOTIFIER_EVENT_TPC_ASSERT - Indicates TPC assert event
718 * HL_NOTIFIER_EVENT_UNDEFINED_OPCODE - Indicates undefined operation code
719 * HL_NOTIFIER_EVENT_DEVICE_RESET - Indicates device requires a reset
720 * HL_NOTIFIER_EVENT_CS_TIMEOUT - Indicates CS timeout error
721 * HL_NOTIFIER_EVENT_DEVICE_UNAVAILABLE - Indicates device is unavailable
722 * HL_NOTIFIER_EVENT_USER_ENGINE_ERR - Indicates device engine in error state
723 * HL_NOTIFIER_EVENT_GENERAL_HW_ERR - Indicates device HW error
724 * HL_NOTIFIER_EVENT_RAZWI - Indicates razwi happened
725 * HL_NOTIFIER_EVENT_PAGE_FAULT - Indicates page fault happened
726 * HL_NOTIFIER_EVENT_CRITICAL_HW_ERR - Indicates a HW error that requires SW abort and
728 * HL_NOTIFIER_EVENT_CRITICAL_FW_ERR - Indicates a FW error that requires SW abort and
745 * HW_IP_INFO - Receive information about different IP blocks in the
747 * HL_INFO_HW_EVENTS - Receive an array describing how many times each event
749 * HL_INFO_DRAM_USAGE - Retrieve the dram usage inside the device and of the
752 * HL_INFO_HW_IDLE - Retrieve information about the idle status of each
754 * HL_INFO_DEVICE_STATUS - Retrieve the device's status. This opcode doesn't
756 * HL_INFO_DEVICE_UTILIZATION - Retrieve the total utilization of the device
761 * HL_INFO_HW_EVENTS_AGGREGATE - Receive an array describing how many times each
763 * HL_INFO_CLK_RATE - Retrieve the current and maximum clock rate
766 * HL_INFO_RESET_COUNT - Retrieve the counts of the soft and hard reset
769 * HL_INFO_TIME_SYNC - Retrieve the device's time alongside the host's time
771 * HL_INFO_CS_COUNTERS - Retrieve command submission counters
772 * HL_INFO_PCI_COUNTERS - Retrieve PCI counters
773 * HL_INFO_CLK_THROTTLE_REASON - Retrieve clock throttling reason
774 * HL_INFO_SYNC_MANAGER - Retrieve sync manager info per dcore
775 * HL_INFO_TOTAL_ENERGY - Retrieve total energy consumption
776 * HL_INFO_PLL_FREQUENCY - Retrieve PLL frequency
777 * HL_INFO_POWER - Retrieve power information
778 * HL_INFO_OPEN_STATS - Retrieve info regarding recent device open calls
779 * HL_INFO_DRAM_REPLACED_ROWS - Retrieve DRAM replaced rows info
780 * HL_INFO_DRAM_PENDING_ROWS - Retrieve DRAM pending rows num
781 * HL_INFO_LAST_ERR_OPEN_DEV_TIME - Retrieve timestamp of the last time the device was opened
783 * HL_INFO_CS_TIMEOUT_EVENT - Retrieve CS timeout timestamp and its related CS sequence number.
784 * HL_INFO_RAZWI_EVENT - Retrieve parameters of razwi:
791 * HL_INFO_DEV_MEM_ALLOC_PAGE_SIZES - Retrieve valid page sizes for device memory allocation
792 * HL_INFO_SECURED_ATTESTATION - Retrieve attestation report of the boot.
793 * HL_INFO_REGISTER_EVENTFD - Register eventfd for event notifications.
794 * HL_INFO_UNREGISTER_EVENTFD - Unregister eventfd
795 * HL_INFO_GET_EVENTS - Retrieve the last occurred events
796 * HL_INFO_UNDEFINED_OPCODE_EVENT - Retrieve last undefined opcode error information.
799 * HL_INFO_ENGINE_STATUS - Retrieve the status of all the h/w engines in the asic.
800 * HL_INFO_PAGE_FAULT_EVENT - Retrieve parameters of captured page fault.
803 * HL_INFO_USER_MAPPINGS - Retrieve user mappings, captured after page fault event.
804 * HL_INFO_FW_GENERIC_REQ - Send generic request to FW.
805 * HL_INFO_HW_ERR_EVENT - Retrieve information on the reported HW error.
808 * HL_INFO_FW_ERR_EVENT - Retrieve information on the reported FW error.
811 * HL_INFO_USER_ENGINE_ERR_EVENT - Retrieve the last engine id that reported an error.
858 * struct hl_info_hw_ip_info - hardware information on various IPs in the ASIC
859 * @sram_base_address: The first SRAM physical base address that is free to be
864 * @sram_size: The SRAM size that is available to the user.
872 * @decoder_enabled_mask: Bit-mask that represents which decoders are enabled.
884 * @tpc_enabled_mask: Bit-mask that represents which TPCs are enabled. Relevant
892 * @tpc_enabled_mask_ext: Bit-mask that represents which TPCs are enabled.
895 * @edma_enabled_mask: Bit-mask that represents which EDMAs are enabled.
902 * @rotator_enabled_mask: Bit-mask that represents which rotators are enabled.
999 * struct hl_info_pci_counters - pci counters
1021 * struct hl_info_clk_throttle - clock throttling reason
1023 * @clk_throttling_timestamp_us: represents CPU timestamp in microseconds of the start-event
1034 * struct hl_info_energy - device energy information
1048 * struct hl_open_stats_info - device open statistics information
1063 * struct hl_power_info - power information
1071 * struct hl_info_sync_manager - sync manager information
1084 * struct hl_info_cs_counters - command submission counters
1093 * @total_max_cs_in_flight_drop_cnt: total dropped due to maximum CS in-flight
1094 * @ctx_max_cs_in_flight_drop_cnt: context dropped due to maximum CS in-flight
1114 * struct hl_info_last_err_open_dev_time - last error boot information.
1122 * struct hl_info_cs_timeout_event - last CS timeout information.
1141 * struct hl_info_razwi_event - razwi information.
1153 * @flags: bitmask for additional data: HL_RAZWI_READ - razwi caused by read operation
1154 * HL_RAZWI_WRITE - razwi caused by write operation
1155 * HL_RAZWI_LBW - razwi caused by lbw fabric transaction
1156 * HL_RAZWI_HBW - razwi caused by hbw fabric transaction
1157 * HL_RAZWI_RR - razwi caused by range register
1158 * HL_RAZWI_ADDR_DEC - razwi caused by address decode error
1174 * struct hl_info_undefined_opcode_event - info about last undefined opcode error
1178 * filled with values, it means the execution was in Lower-CP.
1181 * @cb_addr_streams_len: num of streams - actual len of cb_addr_streams array.
1183 * in Upper-CP (specific stream) and equal to 4 incase
1184 * of undefined opcode in Lower-CP.
1185 * @engine_id: engine-id that the error occurred on
1187 * MAX_QMAN_STREAMS_INFO it means the error occurred on a Lower-CP.
1200 * struct hl_info_hw_err_event - info about HW error
1218 * struct hl_info_fw_err_event - info about FW error
1219 * @timestamp: time-stamp of error occurrence
1233 * struct hl_info_engine_err_event - engine error info
1234 * @timestamp: time-stamp of error occurrence
1247 * struct hl_info_dev_memalloc_page_sizes - valid page sizes in device mem alloc information.
1256 #define SEC_PCR_QUOTE_BUF_SZ 510 /* (512 - 2) 2 bytes used for size */
1257 #define SEC_SIGNATURE_BUF_SZ 255 /* (256 - 1) 1 byte used for size */
1258 #define SEC_PUB_DATA_BUF_SZ 510 /* (512 - 2) 2 bytes used for size */
1259 #define SEC_CERTIFICATE_BUF_SZ 2046 /* (2048 - 2) 2 bytes used for size */
1263 * struct hl_info_sec_attest - attestation report of the boot
1296 * struct hl_info_signed - device information signed by a secured device.
1322 * struct hl_page_fault_info - page fault information.
1335 * struct hl_user_mapping - user mapping information.
1352 * struct hl_info_args - Main structure to retrieve device related information.
1361 * @period_ms: Period value, in milliseconds, for utilization rate in range 100ms - 1000ms in 100 ms
1403 #define HL_MAX_CB_SIZE (0x200000 - 32)
1422 /* Context ID - Currently not in use */
1458 * CB, the user invokes - “memory ioctl” to map the user memory into a
1462 * increases the PCI-DMA queues throughput. This CB allocation method
1463 * also reduces the use of Linux DMA-able memory pool. Which are limited
1464 * and used by other Linux sub-systems.
1469 * This structure size must always be fixed to 64-bytes for backward
1477 * For internal queue in Goya, this represents an SRAM or
1483 * Host, or an SRAM, a DRAM, or a mapped host address of the CB.
1570 * CS type, note that this might fail if out-of-sync happened to the SOB
1572 * reserve-unreserve calls.
1609 * enum hl_engine_command - engine command
1700 /* timeout in seconds - valid only if HL_CS_FLAGS_CUSTOM_TIMEOUT
1708 /* Context ID - Currently not in use */
1802 /* Context ID - Currently not in use */
1819 /* Multi CS API info- valid entries in multi-CS array */
1898 /* Opcode to create DMA-BUF object for an existing device memory allocation
1899 * and to export an FD of that DMA-BUF back to the caller
1919 * structure hl_mem_in - structure that handle input args for memory IOCTL
1923 * For the HL_MEM_OP_EXPORT_DMABUF_FD opcode, this field holds the DMA-BUF file/FD flags.
1924 * @ctx_id: context ID - currently not in use.
1941 * structure for free-ing device memory (used with the HL_MEM_OP_FREE op)
2013 * address of that the exported dma-buf object describes.
2060 * DMA-BUF object that was created to describe a memory
2190 /* Context ID - Currently not in use */
2203 * - H/W IP information
2204 * - Current dram usage
2207 * information. The user should supply a pointer to a user-allocated memory
2219 * - Request a Command Buffer
2220 * - Destroy a Command Buffer
2222 * The command buffers are memory blocks that reside in DMA-able address
2226 * When creating a new CB, the IOCTL returns a handle of it, and the user-space
2248 * The JOBS on the "restore" phase are enqueued only after context-switch
2253 * There are two types of queues - external and internal. External queues
2266 * on either the device SRAM/DRAM or the host, and give the device address of
2277 * non-internal JOBS have been completed. Note that if the CS has internal JOBS
2284 * with sequence number N-1 also finished. The user can make this assumption if
2285 * and only if CS N and CS N-1 are exactly the same (same CBs for the same
2295 * inside the kernel until the CS has finished or until the user-requested
2304 * EINTR - Kernel waiting has been interrupted, e.g. due to OS signal
2306 * ETIMEDOUT - The CS has caused a timeout on the device
2307 * EIO - The CS was aborted (usually because the device was reset)
2308 * ENODEV - The device wants to do hard-reset (so user need to close FD)
2313 * HL_WAIT_CS_STATUS_COMPLETED - The CS has been completed successfully (0)
2314 * HL_WAIT_CS_STATUS_BUSY - The CS is still executing (0)
2315 * HL_WAIT_CS_STATUS_TIMEDOUT - The CS has caused a timeout on the device
2317 * HL_WAIT_CS_STATUS_ABORTED - The CS was aborted, usually because the
2324 * - Map host memory to device MMU
2325 * - Unmap host memory from device MMU
2330 * to allocate the memory in user-space (malloc/new). The driver pins the
2341 * - Enable/disable the ETR/ETF/FUNNEL/STM/BMON/SPMU debug traces
2358 * set the device into non-debug mode, i.e. disable debug mode.