drivers/misc/mei/hw.h
Source file repositories/reference/linux-study-clean/drivers/misc/mei/hw.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/mei/hw.h- Extension
.h- Size
- 20474 bytes
- Lines
- 837
- Domain
- Driver Families
- Bucket
- drivers/misc
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mei.h
Detected Declarations
struct mei_ext_hdrstruct mei_ext_meta_hdrstruct mei_ext_hdr_vtagstruct mei_gsc_sglstruct mei_ext_hdr_gsc_h2fstruct mei_ext_hdr_gsc_f2hstruct mei_msg_hdrstruct mei_bus_messagestruct mei_hbm_cl_cmdstruct hbm_versionstruct hbm_host_version_requeststruct hbm_host_version_responsestruct hbm_host_stop_requeststruct hbm_host_stop_responsestruct hbm_me_stop_requeststruct hbm_host_enum_requeststruct hbm_host_enum_responsestruct mei_client_propertiesstruct hbm_props_requeststruct hbm_props_responsestruct hbm_add_client_requeststruct hbm_add_client_responsestruct hbm_power_gatestruct hbm_client_connect_requeststruct hbm_client_connect_responsestruct hbm_flow_controlstruct hbm_notification_requeststruct hbm_notification_responsestruct hbm_notificationstruct hbm_dma_mem_dscrstruct hbm_dma_setup_requeststruct hbm_dma_setup_responsestruct hbm_dma_ring_ctrlstruct hbm_capability_requeststruct hbm_capability_responsestruct hbm_client_dma_map_requeststruct hbm_client_dma_unmap_requeststruct hbm_client_dma_responseenum mei_stop_reason_typesenum mei_hbm_statusenum mei_cl_connect_statusenum mei_cl_disconnect_statusenum mei_ext_hdr_typeenum hbm_host_enum_flagsfunction mei_ext_lastfunction mei_ext_hdr_len
Annotated Snippet
struct mei_ext_hdr {
u8 type;
u8 length;
} __packed;
/**
* struct mei_ext_meta_hdr - extend header meta data
* @count: number of headers
* @size: total size of the extended header list excluding meta header
* @reserved: reserved
* @hdrs: extended headers TLV list
*/
struct mei_ext_meta_hdr {
u8 count;
u8 size;
u8 reserved[2];
u8 hdrs[];
} __packed;
/**
* struct mei_ext_hdr_vtag - extend header for vtag
*
* @hdr: standard extend header
* @vtag: virtual tag
* @reserved: reserved
*/
struct mei_ext_hdr_vtag {
struct mei_ext_hdr hdr;
u8 vtag;
u8 reserved;
} __packed;
/*
* Extended header iterator functions
*/
/**
* mei_ext_begin - extended header iterator begin
*
* @meta: meta header of the extended header list
*
* Return: The first extended header
*/
static inline struct mei_ext_hdr *mei_ext_begin(struct mei_ext_meta_hdr *meta)
{
return (struct mei_ext_hdr *)meta->hdrs;
}
/**
* mei_ext_last - check if the ext is the last one in the TLV list
*
* @meta: meta header of the extended header list
* @ext: a meta header on the list
*
* Return: true if ext is the last header on the list
*/
static inline bool mei_ext_last(struct mei_ext_meta_hdr *meta,
struct mei_ext_hdr *ext)
{
return (u8 *)ext >= (u8 *)meta + sizeof(*meta) + (meta->size * 4);
}
struct mei_gsc_sgl {
u32 low;
u32 high;
u32 length;
} __packed;
#define GSC_HECI_MSG_KERNEL 0
#define GSC_HECI_MSG_USER 1
#define GSC_ADDRESS_TYPE_GTT 0
#define GSC_ADDRESS_TYPE_PPGTT 1
#define GSC_ADDRESS_TYPE_PHYSICAL_CONTINUOUS 2 /* max of 64K */
#define GSC_ADDRESS_TYPE_PHYSICAL_SGL 3
/**
* struct mei_ext_hdr_gsc_h2f - extended header: gsc host to firmware interface
*
* @hdr: extended header
* @client_id: GSC_HECI_MSG_KERNEL or GSC_HECI_MSG_USER
* @addr_type: GSC_ADDRESS_TYPE_{GTT, PPGTT, PHYSICAL_CONTINUOUS, PHYSICAL_SGL}
* @fence_id: synchronization marker
* @input_address_count: number of input sgl buffers
* @output_address_count: number of output sgl buffers
* @reserved: reserved
* @sgl: sg list
*/
struct mei_ext_hdr_gsc_h2f {
struct mei_ext_hdr hdr;
u8 client_id;
Annotation
- Immediate include surface: `linux/mei.h`.
- Detected declarations: `struct mei_ext_hdr`, `struct mei_ext_meta_hdr`, `struct mei_ext_hdr_vtag`, `struct mei_gsc_sgl`, `struct mei_ext_hdr_gsc_h2f`, `struct mei_ext_hdr_gsc_f2h`, `struct mei_msg_hdr`, `struct mei_bus_message`, `struct mei_hbm_cl_cmd`, `struct hbm_version`.
- Atlas domain: Driver Families / drivers/misc.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.