STRUCT LOCAL_REG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct local_reg(9) ✨

okay bestie, welcome to the Kernel API Manual πŸ’– this one's a little struct that describes one single register the way the local package sees it. that's it, that's the whole vibe. πŸŽ€


🌸 NAME 🌸

struct local_reg β€” a register as described in the local package view. literally just one register, but make it documented. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct local_reg {
    int pkg;
    u64 pbase;
    u32 size;
    u32 offset;
    u8 width;
    void __iomem *vbase;
    u64 val;
 };

no cap, that's the whole struct. now let's meet the members 🫢


πŸŽ€ Members πŸŽ€

okay so every field, one by one, no skipping:

  • pkg β€” (input) the package where the register is located. which package? that one. πŸ“¦
  • pbase β€” (input) the IP MMIO base physical address, in the local package view. physical, bestie, don't forget it. πŸ”₯
  • size β€” (input) the IP MMIO size.
  • offset β€” (input) the register offset from the IP MMIO base pbase. so like, you start at pbase and walk offset forward. πŸšΆβ€β™€οΈ
  • width β€” (input) the register width in byte. yes, "byte", singular, that's what it says, i'm not touching it. πŸ’€
  • vbase β€” (internal) the IP MMIO base virtual address. internal only, so don't go poking at it from outside, iykyk. πŸ™ˆ
  • val β€” (output) the register value. this is the one you actually came here for. πŸ’œ
quick vibe check: input means you fill it in, internal means hands off, output means it hands you something back. 🧚

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/edac/imh_base.c β€” go read it, it's giving main character energy. ⭐

and that's the page!! 🌸 source/version: ./drivers/edac, dated October 2026 β€” slay, iconic, periodt. πŸ’…πŸ‘‘

πŸ“¦ where this page comes from