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.
- 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/bitfield.hlinux/bitops.hlinux/ras.hasm/amd/nb.hasm/amd/node.hreg_fields.h
Detected Declarations
struct df4p5_denorm_ctxstruct df_flagsstruct df_configstruct dram_addr_mapstruct addr_ctx_inputsstruct addr_ctxenum df_revisionsenum intlv_modesfunction prm_umc_norm_to_sys_addrfunction expand_bitsfunction remove_bitsfunction atl_debug_on_bad_df_revfunction atl_debug_on_bad_intlv_mode
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
- Immediate include surface: `linux/bitfield.h`, `linux/bitops.h`, `linux/ras.h`, `asm/amd/nb.h`, `asm/amd/node.h`, `reg_fields.h`.
- Detected declarations: `struct df4p5_denorm_ctx`, `struct df_flags`, `struct df_config`, `struct dram_addr_map`, `struct addr_ctx_inputs`, `struct addr_ctx`, `enum df_revisions`, `enum intlv_modes`, `function prm_umc_norm_to_sys_addr`, `function expand_bits`.
- Atlas domain: Driver Families / drivers/ras.
- 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.