mtrr_type_lookup(9)
π mtrr_type_lookup(9) β the kernel API manual, bestie edition π
okay so welcome to the Kernel API Manual entry for mtrr_type_lookup β yes that's the <italic>mtrr_type_lookup(9)</italic> girlies know her π this is lowkey the moment where we go look up a memory type in MTRR, and honestly? iconic.
β¨ NAME β¨
mtrr_type_lookup β look up memory type in MTRR πβ¨
πΈ SYNOPSIS πΈ
u8 mtrr_type_lookup (u64 start , u64 end , u8 *uniform );
that's the whole vibe. three args, one u8 return, no cap π«Ά
π¦ ARGUMENTS π¦
startβ Begin of the physical address range π like where the whole thing kicks offendβ End of the physical address range π the finish line, bestieuniformβ output argument, so she gives you something back π:1: the returned MTRR type is valid for the whole region β the entire range, all of it, periodt0: otherwise π like, not the whole region, so don't get too comfortable- (and yeah, these two bullets are literally nested under
uniformin the original because that's just how she is π )
β DESCRIPTION β
here's the Return Values tea, and it's giving very clear π:
MTRR_TYPE_(type)β the effective MTRR type for the region π₯ that's your answerMTRR_TYPE_INVALIDβ MTRR is disabled π that's your "sorry babe, nothing here" answer
that's it, that's the description. short and stunning, we love a main character energy section that doesn't overstay its welcome π§
π SEE ALSO π
- Kernel file
./arch/x86/kernel/cpu/mtrr/generic.cπ go read the source, iykyk guest_force_mtrr_state(9)set_fixed_range(9)generic_get_free_region(9)set_fixed_ranges(9)set_mtrr_state(9)generic_set_mtrr(9)
like a little friend group of functions, all linked together π«Ά go say hi to all of them fr fr
lowkey reminder: uniform is an output argument, so don't go passing garbage and expecting magic β she writes back to it π
okay that's the page π!! huge thanks to the source dir ./arch/x86/kernel/cpu/mtrr and the October 2026 date stamp for making this little manual moment happen β version and date both said with love, mwah πβ¨ this has been mtrr_type_lookup(9), slay and goodbye ππΈ
π¦ 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