drivers/accel/ivpu/vpu_boot_api.h

Source file repositories/reference/linux-study-clean/drivers/accel/ivpu/vpu_boot_api.h

File Facts

System
Linux kernel
Corpus path
drivers/accel/ivpu/vpu_boot_api.h
Extension
.h
Size
14639 bytes
Lines
451
Domain
Driver Families
Bucket
drivers/accel
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct vpu_firmware_header {
	u32 header_version;
	u32 image_format;
	u64 image_load_address;
	u32 image_size;
	u64 entry_point;
	u8 vpu_version[VPU_FW_VERSION_SIZE];
	u32 compression_type;
	u64 firmware_version_load_address;
	u32 firmware_version_size;
	u64 boot_params_load_address;
	u32 api_version[VPU_FW_API_VER_NUM];
	/** Size of memory require for firmware execution */
	u32 runtime_size;
	u32 shave_nn_fw_size;
	/**
	 * Size of primary preemption buffer, assuming a 2-job submission queue.
	 * NOTE: host driver is expected to adapt size accordingly to actual
	 * submission queue size and device capabilities.
	 */
	u32 preemption_buffer_1_size;
	/**
	 * Size of secondary preemption buffer, assuming a 2-job submission queue.
	 * NOTE: host driver is expected to adapt size accordingly to actual
	 * submission queue size and device capabilities.
	 */
	u32 preemption_buffer_2_size;
	/**
	 * Maximum preemption buffer size that the FW can use: no need for the host
	 * driver to allocate more space than that specified by these fields.
	 * A value of 0 means no declared limit.
	 */
	u32 preemption_buffer_1_max_size;
	u32 preemption_buffer_2_max_size;
	/** Space reserved for future preemption-related fields. */
	u32 preemption_reserved[4];
	/** FW image read only section start address, 4KB aligned */
	u64 ro_section_start_address;
	/** FW image read only section size, 4KB aligned */
	u32 ro_section_size;
	u32 reserved;
};

/**
 * Firmware boot parameters format
 */

/** Values for boot_type field */
#define VPU_BOOT_TYPE_COLDBOOT 0
#define VPU_BOOT_TYPE_WARMBOOT 1

/** Value for magic filed */
#define VPU_BOOT_PARAMS_MAGIC 0x10000

/** VPU scheduling mode. By default, OS scheduling is used. */
#define VPU_SCHEDULING_MODE_OS 0
#define VPU_SCHEDULING_MODE_HW 1

enum VPU_BOOT_L2_CACHE_CFG_TYPE {
	VPU_BOOT_L2_CACHE_CFG_UPA = 0,
	VPU_BOOT_L2_CACHE_CFG_NN = 1,
	VPU_BOOT_L2_CACHE_CFG_NUM = 2
};

/** VPU MCA ECC signalling mode. By default, no signalling is used */
enum VPU_BOOT_MCA_ECC_SIGNAL_TYPE {
	VPU_BOOT_MCA_ECC_NONE = 0,
	VPU_BOOT_MCA_ECC_CORR = 1,
	VPU_BOOT_MCA_ECC_FATAL = 2,
	VPU_BOOT_MCA_ECC_BOTH = 3
};

/**
 * Logging destinations.
 *
 * Logging output can be directed to different logging destinations. This enum
 * defines the list of logging destinations supported by the VPU firmware (NOTE:
 * a specific VPU FW binary may support only a subset of such output
 * destinations, depending on the target platform and compile options).
 */
enum vpu_trace_destination {
	VPU_TRACE_DESTINATION_PIPEPRINT = 0x1,
	VPU_TRACE_DESTINATION_VERBOSE_TRACING = 0x2,
	VPU_TRACE_DESTINATION_NORTH_PEAK = 0x4,
};

/*
 * Processor bit shifts (for loggable HW components).
 */
#define VPU_TRACE_PROC_BIT_RESERVED  0

Annotation

Implementation Notes