drivers/dma/idxd/registers.h

Source file repositories/reference/linux-study-clean/drivers/dma/idxd/registers.h

File Facts

System
Linux kernel
Corpus path
drivers/dma/idxd/registers.h
Extension
.h
Size
12632 bytes
Lines
668
Domain
Driver Families
Bucket
drivers/dma
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 opcap {
	u64 bits[4];
};

#define IDXD_MAX_OPCAP_BITS		256U

#define IDXD_OPCAP_OFFSET		0x40

#define IDXD_TABLE_OFFSET		0x60
union offsets_reg {
	struct {
		u64 grpcfg:16;
		u64 wqcfg:16;
		u64 msix_perm:16;
		u64 ims:16;
		u64 perfmon:16;
		u64 rsvd:48;
	};
	u64 bits[2];
};

#define IDXD_TABLE_MULT			0x100

#define IDXD_GENCFG_OFFSET		0x80
union gencfg_reg {
	struct {
		u32 rdbuf_limit:8;
		u32 rsvd:4;
		u32 user_int_en:1;
		u32 evl_en:1;
		u32 rsvd2:18;
	};
	u32 bits;
};

#define IDXD_GENCTRL_OFFSET		0x88
union genctrl_reg {
	struct {
		u32 softerr_int_en:1;
		u32 halt_int_en:1;
		u32 evl_int_en:1;
		u32 rsvd:29;
	};
	u32 bits;
};

#define IDXD_GENSTATS_OFFSET		0x90
union gensts_reg {
	struct {
		u32 state:2;
		u32 reset_type:2;
		u32 rsvd:28;
	};
	u32 bits;
};

enum idxd_device_status_state {
	IDXD_DEVICE_STATE_DISABLED = 0,
	IDXD_DEVICE_STATE_ENABLED,
	IDXD_DEVICE_STATE_DRAIN,
	IDXD_DEVICE_STATE_HALT,
};

enum idxd_device_reset_type {
	IDXD_DEVICE_RESET_SOFTWARE = 0,
	IDXD_DEVICE_RESET_FLR,
	IDXD_DEVICE_RESET_WARM,
	IDXD_DEVICE_RESET_COLD,
};

#define IDXD_INTCAUSE_OFFSET		0x98
#define IDXD_INTC_ERR			0x01
#define IDXD_INTC_CMD			0x02
#define IDXD_INTC_OCCUPY			0x04
#define IDXD_INTC_PERFMON_OVFL		0x08
#define IDXD_INTC_HALT_STATE		0x10
#define IDXD_INTC_EVL			0x20
#define IDXD_INTC_INT_HANDLE_REVOKED	0x80000000

#define IDXD_CMD_OFFSET			0xa0
union idxd_command_reg {
	struct {
		u32 operand:20;
		u32 cmd:5;
		u32 rsvd:6;
		u32 int_req:1;
	};
	u32 bits;
};

Annotation

Implementation Notes