drivers/gpu/drm/xe/abi/uc_fw_abi.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/abi/uc_fw_abi.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/abi/uc_fw_abi.h- Extension
.h- Size
- 15098 bytes
- Lines
- 406
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/build_bug.hlinux/types.h
Detected Declarations
struct uc_css_rsa_infostruct uc_css_guc_infostruct uc_css_headerstruct gsc_versionstruct gsc_partitionstruct gsc_layout_pointersstruct gsc_bpdt_headerstruct gsc_bpdt_entrystruct gsc_cpd_header_v2struct gsc_cpd_entrystruct gsc_manifest_headerstruct csc_fpt_headerstruct csc_fpt_entry
Annotated Snippet
struct uc_css_rsa_info {
u32 key_size_dw;
u32 modulus_size_dw;
u32 exponent_size_dw;
} __packed;
struct uc_css_guc_info {
u32 time;
#define CSS_TIME_HOUR (0xFF << 0)
#define CSS_TIME_MIN (0xFF << 8)
#define CSS_TIME_SEC (0xFFFF << 16)
u32 reserved0[5];
u32 sw_version;
#define CSS_SW_VERSION_UC_MAJOR (0xFF << 16)
#define CSS_SW_VERSION_UC_MINOR (0xFF << 8)
#define CSS_SW_VERSION_UC_PATCH (0xFF << 0)
u32 submission_version;
u32 reserved1[11];
u32 header_info;
#define CSS_HEADER_INFO_SVN (0xFF)
#define CSS_HEADER_INFO_COPY_VALID (0x1 << 31)
u32 private_data_size;
u32 ukernel_info;
#define CSS_UKERNEL_INFO_DEVICEID (0xFFFF << 16)
#define CSS_UKERNEL_INFO_PRODKEY (0xFF << 8)
#define CSS_UKERNEL_INFO_BUILDTYPE (0x3 << 2)
#define CSS_UKERNEL_INFO_BUILDTYPE_PROD 0
#define CSS_UKERNEL_INFO_BUILDTYPE_PREPROD 1
#define CSS_UKERNEL_INFO_BUILDTYPE_DEBUG 2
#define CSS_UKERNEL_INFO_ENCSTATUS (0x1 << 1)
#define CSS_UKERNEL_INFO_COPY_VALID (0x1 << 0)
} __packed;
struct uc_css_header {
u32 module_type;
/*
* header_size includes all non-uCode bits, including css_header, rsa
* key, modulus key and exponent data.
*/
u32 header_size_dw;
u32 header_version;
u32 reserved0;
u32 module_vendor;
u32 date;
#define CSS_DATE_DAY (0xFF << 0)
#define CSS_DATE_MONTH (0xFF << 8)
#define CSS_DATE_YEAR (0xFFFF << 16)
u32 size_dw; /* uCode plus header_size_dw */
union {
u32 reserved1[3];
struct uc_css_rsa_info rsa_info;
};
union {
u32 reserved2[22];
struct uc_css_guc_info guc_info;
};
} __packed;
static_assert(sizeof(struct uc_css_header) == 128);
/**
* DOC: GSC-based Firmware Layout
*
* The GSC-based firmware structure is used for GSC releases on all platforms
* and for HuC releases starting from DG2/MTL. Older HuC releases use the
* CSS-based layout instead. Differently from the CSS headers, the GSC headers
* uses a directory + entries structure (i.e., there is array of addresses
* pointing to specific header extensions identified by a name). Although the
* header structures are the same, some of the entries are specific to GSC while
* others are specific to HuC. The manifest header entry, which includes basic
* information about the binary (like the version) is always present, but it is
* named differently based on the binary type.
*
* The HuC binary starts with a Code Partition Directory (CPD) header. The
* entries we're interested in for use in the driver are:
*
* 1. "HUCP.man": points to the manifest header for the HuC.
* 2. "huc_fw": points to the FW code. On platforms that support load via DMA
* and 2-step HuC authentication (i.e. MTL+) this is a full CSS-based binary,
* while if the GSC is the one doing the load (which only happens on DG2)
* this section only contains the uCode.
*
* The GSC-based HuC firmware layout looks like this::
*
* +================================================+
* | CPD Header |
* +================================================+
* | CPD entries[] |
* | entry1 |
* | ... |
* | entryX |
Annotation
- Immediate include surface: `linux/build_bug.h`, `linux/types.h`.
- Detected declarations: `struct uc_css_rsa_info`, `struct uc_css_guc_info`, `struct uc_css_header`, `struct gsc_version`, `struct gsc_partition`, `struct gsc_layout_pointers`, `struct gsc_bpdt_header`, `struct gsc_bpdt_entry`, `struct gsc_cpd_header_v2`, `struct gsc_cpd_entry`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.