edac_get_dimm(9)
π edac_get_dimm(9) π
okay bestie, welcome to edac_get_dimm(9) β straight out of the Kernel API Manual, no cap. this little icon does exactly one thing and does it slay: it gets you DIMM info from a memory controller, and you point at the DIMM you want using a [layer0,layer1,layer2] position. that's the whole vibe. π
β¨ NAME β¨
edac_get_dimm β Get DIMM info from a memory controller given by [layer0,layer1,layer2] position π«Ά
πΈ SYNOPSIS πΈ
struct dimm_info * edac_get_dimm (struct mem_ctl_info *mci , int layer0
, int layer1 , int layer2 );
like, look at that signature. it's giving "three coordinates, one DIMM". π
π¦ ARGUMENTS π¦
mciβ the MC descriptor, astruct mem_ctl_info. this is your main character. πlayer0β layer0 position.layer1β layer1 position. Unused ifn_layers < 2β so don't stress about it when you're running a one-layer setup, it literally doesn't get read. πlayer2β layer2 position. Unused ifn_layers < 3β same deal, only 3-layer configs care. π
π DESCRIPTION π
the way this function works is honestly so clean, it's basically array indexing with extra steps (affectionate). here's the tea per layer count: π
- For 1 layer, this function returns
"dimms[layer0]"; - For 2 layers, this function is similar to allocating a two-dimensional array and returning
"dimms[layer0][layer1]"; - For 3 layers, this function is similar to allocating a tri-dimensional array and returning
"dimms[layer0][layer1][layer2]";
so likeβ¦ one layer? one index. two layers? two indices. three layers? three indices. it's consistent, it's predictable, it's iconic. β
highkey remember: the extralayer1/layer2args are just chillin' unused whenn_layersis smaller than 2 or 3 respectively β no error, no drama, they just vibe. π
π₯ SEE ALSO π₯
Kernel file ./include/linux/edac.h plus the whole friend group: enum dev_type(9), enum hw_event_mc_err_type(9), enum mem_type(9), enum edac_type(9), enum scrub_type(9), enum edac_mc_layer_type(9), struct edac_mc_layer(9), struct rank_info(9), struct edac_raw_error_desc(9), struct edac_scrub_ops(9), struct edac_ecs_ops(9), struct edac_mem_repair_ops(9). go say hi, they're all so nice. π§
aaaand that's the page! π this one lives in ./include/linux and it's dated October 2026 β so yes, it's future-proof and fabulous. mwah, go read your DIMMs bestie πβ¨
π¦ 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