drivers/ras/amd/atl/internal.h

Source file repositories/reference/linux-study-clean/drivers/ras/amd/atl/internal.h

File Facts

System
Linux kernel
Corpus path
drivers/ras/amd/atl/internal.h
Extension
.h
Size
9123 bytes
Lines
373
Domain
Driver Families
Bucket
drivers/ras
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 df4p5_denorm_ctx {
	/* Indicates the number of "lost" bits. This will be 1, 2, or 3. */
	u8 perm_shift;

	/* A mask indicating the bits that need to be rehashed. */
	u16 rehash_vector;

	/*
	 * Represents the value that the high bits of the normalized address
	 * are divided by during normalization. This value will be 3 for
	 * interleave modes with a number of channels divisible by 3 or the
	 * value will be 5 for interleave modes with a number of channels
	 * divisible by 5. Power-of-two interleave modes are handled
	 * separately.
	 */
	u8 mod_value;

	/*
	 * Represents the bits that can be directly pulled from the normalized
	 * address. In each case, pass through bits [7:0] of the normalized
	 * address. The other bits depend on the interleave bit position which
	 * will be bit 10 for 1K interleave stripe cases and bit 11 for 2K
	 * interleave stripe cases.
	 */
	u64 base_denorm_addr;

	/*
	 * Represents the high bits of the physical address that have been
	 * divided by the mod_value.
	 */
	u64 div_addr;

	u64 current_spa;
	u64 resolved_spa;

	u16 coh_st_fabric_id;
};

struct df_flags {
	__u8	legacy_ficaa		: 1,
		socket_id_shift_quirk	: 1,
		heterogeneous		: 1,
		prm_only		: 1,
		__reserved_0		: 4;
};

struct df_config {
	enum df_revisions rev;

	/*
	 * These masks operate on the 16-bit Coherent Station IDs,
	 * e.g. Instance, Fabric, Destination, etc.
	 */
	u16 component_id_mask;
	u16 die_id_mask;
	u16 node_id_mask;
	u16 socket_id_mask;

	/*
	 * Least-significant bit of Node ID portion of the
	 * system-wide Coherent Station Fabric ID.
	 */
	u8 node_id_shift;

	/*
	 * Least-significant bit of Die portion of the Node ID.
	 * Adjusted to include the Node ID shift in order to apply
	 * to the Coherent Station Fabric ID.
	 */
	u8 die_id_shift;

	/*
	 * Least-significant bit of Socket portion of the Node ID.
	 * Adjusted to include the Node ID shift in order to apply
	 * to the Coherent Station Fabric ID.
	 */
	u8 socket_id_shift;

	/* Number of DRAM Address maps visible in a Coherent Station. */
	u8 num_coh_st_maps;

	u32 dram_hole_base;

	/* Global flags to handle special cases. */
	struct df_flags flags;
};

extern struct df_config df_cfg;

struct dram_addr_map {

Annotation

Implementation Notes