edac_get_dimm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, a struct mem_ctl_info. this is your main character. πŸ‘‘
  • layer0 β€” layer0 position.
  • layer1 β€” layer1 position. Unused if n_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 if n_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 extra layer1 / layer2 args are just chillin' unused when n_layers is 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