lookup_memtype(9)
π lookup_memtype(9) π
okay so welcome to the Kernel API Manual entry for lookup_memtype(9), bestie β this one is short, iconic, and literally about looking up the memory type for a physical address. π
πΈ NAME πΈ
lookup_memtype β looks up the memory type for a physical address. periodt, thatβs the whole name vibe. π
β¨ SYNOPSIS β¨
enum page_cache_mode lookup_memtype (u64 paddr );
π«Ά ARGUMENTS π«Ά
paddrβ the physical address whose memory type needs to be looked up. Thatβs it, thatβs the assignment, bestie. π¦
π DESCRIPTION π
β οΈ Only to be called when PAT is enabled.
Like, only. This is not a βcall it wheneverβ situation, okay? π¨
On the return side, it gives you one of these four constants:
_PAGE_CACHE_MODE_WB_PAGE_CACHE_MODE_WC_PAGE_CACHE_MODE_UC_MINUS_PAGE_CACHE_MODE_WT
Thatβs the return squad, no cap. π
π SEE ALSO π
Go check out the kernel file ./arch/x86/mm/pat/memtype.c and these besties too:
Cute sign-off: this pageβs source/version is ./arch/x86/mm/pat, dated October 2026. Bye bestie, go look up those memory types responsibly πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms