write_maar_pair(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… write_maar_pair(9) β€” like, the MAAR-pair-writing girlies' moment

okay so bestie, welcome to the Kernel API Manual page for write_maar_pair β€” it's a kernel function, it's giving low-level MIPS energy, and we're gonna get you through it together 🫢


✨ NAME ✨

write_maar_pair β€” literally just: write to a pair of MAARs πŸ’–

🌸 SYNOPSIS 🌸

void write_maar_pair (unsigned idx , phys_addr_t lower , phys_addr_t
upper , unsigned attrs );

ik, the line break in the middle of phys_addr_t upper is a whole vibe of its own, but that's the signature, no cap. Keep it exactly like that πŸ‘‘

πŸŽ€ ARGUMENTS πŸŽ€

  • idx β€” the index of the pair, fr. Think of it as "use MAARs idx*2 & (idx*2)+1" β€” that's the exact arithmetic, iykyk. So idx` is the pair number, not the raw register number, and it fans out into two registers. Slay πŸ’…
  • lower β€” the lowest address that the MAAR pair will affect. Must be aligned to a 2^16 byte boundary. Not optional, not negotiable, not a suggestion β€” aligned or nothing, bestie 😭
  • upper β€” the highest address that the MAAR pair will affect. Must be aligned to one byte before a 2^16 byte boundary. Yes, one byte before β€” that's the rule, don't come for me, I didn't write it 🌈
  • attrs β€” the accessibility attributes to program, eg. MIPS_MAAR_S. And listen: the MIPS_MAAR_VL/MIPS_MAAR_VH attributes will automatically be set for you. You don't have to lift a finger, the kernel handles it πŸ’–βœ¨

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does it actually do? It programs the pair of MAAR registers specified by idx so they apply the attributes specified by attrs to the range of addresses from lower to higher. That's the whole job, and honestly? She ate. πŸ‘‘

Basically: you hand her a pair index, a lower bound, an upper bound and some attrs, and she wires that range up with those attributes. Main character energy for real πŸ”₯

🧚 SEE ALSO 🧚

like, go read those too, they're the friend group πŸ’œ


πŸ’€ real talk though: those alignment requirements on lower and upper are hard requirements β€” respect the boundaries, bestie, or nothing good happens.

okay that's the whole page, mwah πŸ’‹ this one ships from ./arch/mips/include/asm and it's dated October 2026 β€” periodt, stan, see you in the next manpage πŸŽ€πŸŒŸ

πŸ“¦ where this page comes from