drivers/gpu/drm/amd/ras/rascore/ras_aca.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/ras/rascore/ras_aca.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/ras/rascore/ras_aca.h
Extension
.h
Size
4367 bytes
Lines
165
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct aca_bank_reg {
	u32 ecc_type;
	u64 seq_no;
	u64 regs[ACA_REG_MAX_COUNT];
};

enum aca_ecc_hwip {
	ACA_ECC_HWIP__UNKNOWN = -1,
	ACA_ECC_HWIP__PSP = 0,
	ACA_ECC_HWIP__UMC,
	ACA_ECC_HWIP__SMU,
	ACA_ECC_HWIP__PCS_XGMI,
	ACA_ECC_HWIP_COUNT,
};

struct aca_ecc_info {
	int die_id;
	int socket_id;
	int xcd_id;
	int hwid;
	int mcatype;
	uint64_t status;
	uint64_t ipid;
	uint64_t addr;
};

struct aca_bank_ecc {
	struct aca_ecc_info bank_info;
	u32 ce_count;
	u32 ue_count;
	u32 de_count;
};

struct aca_ecc_count {
	u32 new_ce_count;
	u32 total_ce_count;
	u32 new_ue_count;
	u32 total_ue_count;
	u32 new_de_count;
	u32 total_de_count;
};

struct aca_xcd_ecc {
	struct aca_ecc_count ecc_err;
};

struct aca_aid_ecc {
	union {
		struct aca_xcd {
			struct aca_xcd_ecc xcd[MAX_XCD_NUM_PER_AID];
			u32 xcd_num;
		} xcd;
		struct aca_ecc_count ecc_err;
	};
};

struct aca_socket_ecc {
	struct aca_aid_ecc aid[MAX_AID_NUM_PER_SOCKET];
	u32 aid_num;
};

struct aca_block_ecc {
	struct aca_socket_ecc socket[MAX_SOCKET_NUM_PER_HIVE];
	u32 socket_num_per_hive;
};

struct aca_bank_hw_ops {
	bool (*bank_match)(struct aca_block *ras_blk, void *data);
	int (*bank_parse)(struct ras_core_context *ras_core,
			struct aca_block *aca_blk, void *data, void *buf);
};

struct aca_block_info {
	char name[32];
	u32 ras_block_id;
	enum aca_ecc_hwip hwip;
	struct aca_bank_hw_ops bank_ops;
	u32 mask;
};

struct aca_block {
	const struct aca_block_info  *blk_info;
	struct aca_block_ecc ecc;
};

struct ras_aca_ip_func {
	uint32_t block_num;
	const struct aca_block_info **block_info;
};

Annotation

Implementation Notes