MEMORY OBJECTS CONTROL STATE (MOCS)(9)
π MEMORY OBJECTS CONTROL STATE (MOCS) π
okay bestie, sit down, because we're about to talk about MOCS β that's Memory Objects Control State for the uninitiated β and it's from the Kernel API Manual, section 9, so you know it's gonna be a little nerdy but we're gonna make it cute π
πΈ MOTIVATION πΈ
So back in the day (like, previous Gens), the MOCS settings were just a value that was set by user land as part of the batch. simple. iconic. no drama.
But then Gen9 happened and everything changed, because now it's a single table (per ring) that all the batches reference by index instead of programming the MOCS directly. the way that's such a glow-up honestly β¨
The one wrinkle in this whole situation (and there's always a wrinkle, isn't there π) is that only PART of the MOCS tables are included in the context β specifically the GFX_MOCS_0 - GFX_MOCS_64 and the LNCFCMOCS0 - LNCFCMOCS32 registers. The rest are not included (that's the settings for the other rings, bestie, they're off doing their own thing π).
This table has to be set at system start-up, and that's lowkey non-negotiable, because of the way the table interacts with the contexts and the GmmLib interface. it's giving foundational, fr fr π«Ά
π¦ IMPLEMENTATION π¦
So how does this actually work? The tables β one per supported platform β are defined in intel_mocs.c, and they get programmed in the first batch after the context is loaded (with the hardware workarounds, obviously, we're not savages π
).
After that, the usual context handling just keeps the MOCS in step. that's it. that's the whole vibe. main character energy from start to finish π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/i915/gt/intel_mocs.hβ go read it, iykyk π
and that's the whole page, bestie!! this one's from the Kernel API Manual, section 9, sourced from ./drivers/gpu/drm/i915/gt, dated October 2026 β so if you ever need to cite it, you're welcome, mwah ππ¦β
π¦ 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