STRUCT CXL_REGISTER_MAP(9)
β¨ struct cxl_register_map(9) β¨
okay so bestie, welcome to the Kernel API Manual (section 9, yes we're fancy) β this is where CXL keeps its receipt for the register block it just scavenged. π
π NAME π
struct cxl_register_map β the "DVSEC harvested register block mapping parameters" situation. basically whenever the kernel goes digging through DVSEC and pulls out a register block, THIS is the little bundle of mapping params it keeps about it. no cap. π¦
πΈ SYNOPSIS πΈ
struct cxl_register_map {
struct device *host;
void __iomem *base;
resource_size_t resource;
resource_size_t max_size;
u8 reg_type;
union {
struct cxl_component_reg_map component_map;
struct cxl_device_reg_map device_map;
struct cxl_pmu_reg_map pmu_map;
};
};
ikyk what this is giving β a big struct with a lil anonymous union inside. main character energy fr. π
π Members π
hostβ thedevicethat handles devm operations and logging. it's the responsible adult of the struct, basically. π«Άbaseβ the virtual base of the register-block-BAR +block_offset. yes, that plus MATTERS, don't skip it bestie. πresourceβ the physical resource base of the register block. the realest of the addresses. πmax_sizeβ the maximum mapping size to perform the register search in. it's the "how far are we allowed to go looking" limit. βreg_typeβ seeenum cxl_regloc_typefor what's going on here. π₯{unnamed_union}β anonymous. no name, all vibes. it just IS. πcomponent_mapβ thecxl_reg_mapfor component registers β¨device_mapβ thecxl_reg_mapsfor device registers πpmu_mapβ thecxl_reg_mapsfor CXL Performance Monitoring Units π
tiny heads up so u don't get clowned on:component_mapsayscxl_reg_map(singular) whiledevice_mapandpmu_mapboth saycxl_reg_maps(plural). that's just how it is, don't come for me, I'm reading it straight off the page. π
π¦ SEE ALSO π¦
the kernel file ./include/cxl/cxl.h, and then this whole lil friend group:
enum cxl_devtype(9)struct cxl_dpa_perf(9)struct cxl_dpa_partition(9)struct cxl_dev_state(9)
go read them, they're literally iconic. periodt. π
that's the whole page bestie, you ate that π β sourced from ./include/cxl, dated October 2026, and that's the Kernel API Manual signing off. mwah π§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms