STRUCT CXL_REGISTER_MAP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” the device that 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 β€” see enum cxl_regloc_type for what's going on here. πŸ”₯
  • {unnamed_union} β€” anonymous. no name, all vibes. it just IS. πŸ’€
    • component_map β€” the cxl_reg_map for component registers ✨
    • device_map β€” the cxl_reg_maps for device registers 🌈
    • pmu_map β€” the cxl_reg_maps for CXL Performance Monitoring Units πŸ“
tiny heads up so u don't get clowned on: component_map says cxl_reg_map (singular) while device_map and pmu_map both say cxl_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