pat_pfn_immune_to_uc_mtrr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ pat_pfn_immune_to_uc_mtrr(9) ✨

okay so this is from the Kernel API Manual bestie, and it's literally one little function that answers one very specific question πŸŽ€


🌸 NAME 🌸

pat_pfn_immune_to_uc_mtrr β€” the vibe check that tells you whether the PAT memory type of @pfn cannot be overridden by the UC MTRR memory type πŸ’…

Like. It's asking "is this page frame immune or not" and honestly same.


πŸ¦‹ SYNOPSIS πŸ¦‹

bool pat_pfn_immune_to_uc_mtrr (unsigned long pfn );

returns a bool, takes an unsigned long pfn, that's the whole thing, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • pfn β€” the page frame number you wanna check πŸ” that's it, that's the argument

πŸ’– DESCRIPTION πŸ’–

🚨 Only to be called when PAT is enabled. 🚨 like for real, don't come at it with PAT disabled, that's not the move πŸ™ˆ

So here's the tea, bestie: it returns true if the PAT memory type of pfn is UC, UC-, or WC πŸ‘‘

And it returns false in other cases. that's it. that's the function. iconic behaviour honestly 🫢


πŸ’… SEE ALSO πŸ’…

Kernel file ./arch/x86/mm/pat/memtype.c and its little friend group:

go read those next, iykyk 🌈


⭐ sign-off ⭐

mwah, that's the whole page πŸ’œ it lives over in ./arch/x86/mm/pat and it's stamped October 2026, so mark your calendars bestie πŸ—“οΈβœ¨

πŸ“¦ where this page comes from