to_pos(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ to_pos(9) ✨

okay so bestie, welcome to the to_pos page from the Kernel API Manual β€” it's giving "tiny function, very specific job," and honestly? We respect it. πŸ’…


🌸 NAME 🌸

to_pos β€” extract an interleave position from an HPA offset. That's it, that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

u64 to_pos (u64 hpa_offset , u8 r_eiw , u16 r_eig , u8 hb_ways , u8 math
);

literally the whole signature, no cap. Note the very chic line break before that last ); β€” that's just how it is. πŸ’–


🌈 ARGUMENTS 🌈

okay so the original page is lowkey mysterious about these, and we are not gonna invent lore. Every single one is listed as -- undescribed --:

  • hpa_offset β€” -- undescribed --
  • r_eiw β€” -- undescribed --
  • r_eig β€” -- undescribed --
  • hb_ways β€” -- undescribed --
  • math β€” -- undescribed --

like… the AUDACITY of leaving us on read 😭 but we're keeping it exactly as written. No guessing, no extra tips, periodt.


πŸ’œ DESCRIPTION πŸ’œ

okay so here's where the page actually spills:

  • hpa_offset: host physical address offset
  • r_eiw: region encoded interleave ways
  • r_eig: region encoded interleave granularity
  • hb_ways: host bridge interleave ways
  • math: interleave arithmetic (MODULO_MATH or XOR_MATH)

so yes, those five mystery arguments from above do have meanings β€” they're just all crammed into the description instead of the argument list. iconic formatting choice, honestly. πŸ’€


⭐ RETURN ⭐

devices position in region interleave 🫢

that's the return value, bestie. short, sweet, and serving exactly one job.


πŸ‘‘ SEE ALSO πŸ‘‘

go read those if you wanna complete the lore arc πŸ“šβœ¨


warning-ish reminder: this page gives us zero extra details beyond what's above β€” no hidden defaults, no secret edge cases, no extra behaviour claims. if you need more, the SEE ALSO girlies are right there. πŸ’…

and that's the whole page, bestie β€” go off, translate those addresses, and slay πŸ’–

source/version vibes: ./tools/testing/cxl/test, dated October 2026, and the manual name is to_pos(9) β€” mwah, signed, sealed, delivered. πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from