STRUCT XE_MMIO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct xe_mmio(9) β€” like, the register MMIO structure bestie

okay so this is a page from the Kernel API Manual (section 9, the kernel-API girlies know) and honestly? it's giving "here's how the CPU actually talks to the registers." let's get into it πŸ’–


✨ NAME ✨

struct xe_mmio β€” the register mmio structure. that's it, that's the vibe πŸŽ€


🌸 SYNOPSIS 🌸

struct xe_mmio {
    struct xe_tile *tile;
    void __iomem *regs;
    struct xe_gt *sriov_vf_gt;
    size_t regs_size;
    u32 adj_limit;
    u32 adj_offset;
 };

like, look at her. six fields. absolutely iconic 🫢


πŸ¦‹ Members πŸ¦‹

  • tile β€” backpointer to the tile, and it's literally only there for tracing. lowkey just a "remember where you came from" girly πŸ’«
  • regs β€” the map you use to access registers. that's the whole assignment.
  • sriov_vf_gt β€” backpointer to the GT (the graphics tile, bestie).
ok important caveat: this pointer is only set for GT MMIO regions, and only when running as an SRIOV VF structure. so like, don't count on it being there πŸ™ˆ
  • regs_size β€” the length of the register region within the map. important distinction!!

so the size of the iomap set in *regs is generally larger than the register mmio space, because it includes unused regions and/or non-register regions such as the GGTT PTEs. she's roomy πŸ’…

  • adj_limit β€” adjust the MMIO address if the address is below this value.
  • adj_offset β€” the offset you add to the MMIO address when you're adjusting. the little + that could ✨

πŸ”₯ Description πŸ”₯

so what is this thing? it represents an MMIO region that the CPU may use to access registers. main character energy for real πŸ‘‘

and here's the tea: a region may share its IO map with other regions. for example β€” all GTs within a tile share the same map with their parent tile, but they represent different subregions of the overall IO space. it's giving "same friend group, different subgenres" 🧚 no cap.


🌈 SEE ALSO 🌈

  • Kernel file ./drivers/gpu/drm/xe/xe_mmio_types.h
  • struct xe_mmio_range(9) β€” go read her too, iykyk πŸ’œ

and that's the page, bestie!! this one's from ./drivers/gpu/drm/xe, version date October 2026 β€” so like, technically from the future, which honestly tracks for this girlie. mwah, slay, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from