1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2025 Intel Corporation 4 */ 5 6 #ifndef _ABI_GUC_LIC_ABI_H_ 7 #define _ABI_GUC_LIC_ABI_H_ 8 9 #include <linux/types.h> 10 11 /** 12 * enum guc_lic_type - Log Init Config KLV IDs. 13 */ 14 enum guc_lic_type { 15 /** 16 * @GUC_LIC_TYPE_GUC_SW_VERSION: GuC firmware version. Value 17 * is a 32 bit number represented by guc_sw_version. 18 */ 19 GUC_LIC_TYPE_GUC_SW_VERSION = 0x1, 20 /** 21 * @GUC_LIC_TYPE_GUC_DEVICE_ID: GuC device id. Value is a 32 22 * bit. 23 */ 24 GUC_LIC_TYPE_GUC_DEVICE_ID = 0x2, 25 /** 26 * @GUC_LIC_TYPE_TSC_FREQUENCY: GuC timestamp counter 27 * frequency. Value is a 32 bit number representing frequency in 28 * kHz. This timestamp is utilized in log entries, timer and 29 * for engine utilization tracking. 30 */ 31 GUC_LIC_TYPE_TSC_FREQUENCY = 0x3, 32 /** 33 * @GUC_LIC_TYPE_GMD_ID: HW GMD ID. Value is a 32 bit number 34 * representing graphics, media and display HW architecture IDs. 35 */ 36 GUC_LIC_TYPE_GMD_ID = 0x4, 37 /** 38 * @GUC_LIC_TYPE_BUILD_PLATFORM_ID: GuC build platform ID. 39 * Value is 32 bits. 40 */ 41 GUC_LIC_TYPE_BUILD_PLATFORM_ID = 0x5, 42 }; 43 44 /** 45 * struct guc_lic - GuC LIC (Log-Init-Config) structure. 46 * 47 * This is populated by the GUC at log init time and is located in the log 48 * buffer memory allocation. 49 */ 50 struct guc_lic { 51 /** 52 * @magic: A magic number set by GuC to identify that this 53 * structure contains valid information: magic = GUC_LIC_MAGIC. 54 */ 55 u32 magic; 56 #define GUC_LIC_MAGIC 0x8086900D 57 /** 58 * @version: The version of the this structure. 59 * Major and minor version number are represented as bit fields. 60 */ 61 u32 version; 62 #define GUC_LIC_VERSION_MASK_MAJOR GENMASK(31, 16) 63 #define GUC_LIC_VERSION_MASK_MINOR GENMASK(15, 0) 64 65 #define GUC_LIC_VERSION_MAJOR 1u 66 #define GUC_LIC_VERSION_MINOR 0u 67 68 /** @data_count: Number of dwords the `data` array contains. */ 69 u32 data_count; 70 /** 71 * @data: Array of dwords representing a list of LIC KLVs of 72 * type guc_klv_generic with keys represented by guc_lic_type 73 */ 74 u32 data[] __counted_by(data_count); 75 } __packed; 76 77 #endif 78