IMCSMB(4)

πŸ’… imcsmb β€” Intel integrated Memory Controller (iMC) SMBus controller driver πŸ’…

okay bestie, pull up a chair, because today we're talking about imcsmb, a whole entire Kernel Interfaces Manual girlie (yes she's a section 4, she's fancy like that) πŸ’–


✨ NAME ✨

imcsmb β€” Intel integrated Memory Controller (iMC) SMBus controller driver πŸ¦‹


✨ SYNOPSIS ✨

so the vibe here is, you drop these into your kernel config:

device pci
device smbus
device imcsmb

OR, if you're feeling ✨modular✨ and wanna load her as a module at boot time, you put this line into loader.conf(5):

imcsmb_load="YES"

periodt. that's the whole incantation πŸŽ€


✨ DESCRIPTION ✨

okay so imcsmb is the driver that gives you smbus(4) support for the SMBus controller functionality sitting inside the integrated Memory Controllers β€” aka iMCs β€” baked into these Intel CPUs:

  • Sandybridge-Xeon
  • Ivybridge-Xeon
  • Haswell-Xeon
  • Broadwell-Xeon

each CPU implements one or more iMCs, depending on how many cores it has (more cores = more iMC energy, iykyk πŸ‘‘). and each single iMC implements two SMBus controllers, called iMC-SMBs. iconic. two-for-one.

what are the iMC-SMBs even for? glad you asked 🫢 the iMCs use them to read configuration information from the DIMMs during POST. and they may also get used by the motherboard firmware or a BMC to monitor the temperature of the DIMMs. so they're basically the DIMM whisperers.

⚠️ but here's the thing β€” the iMC-SMBs are NOT general-purpose SMBus controllers. not even close bestie.

by their very nature, they are only ever attached to DIMMs, so they implement only the SMBus operations needed for communicating with DIMMs. specifically, and literally just these four:

  • READB
  • READW
  • WRITEB
  • WRITEW

that's it, that's the list, no more no less πŸ’€

if you want a more detailed discussion of the hardware and driver architecture, it lives at the top of sys/dev/imcsmb/imcsmb_pci.c. go read her, she's thorough ✨


✨ WARNINGS ✨

okay bestie this is the part where I hold your hand and we lock in πŸ™ˆ

as mentioned up above, firmware might use the iMC-SMBs to read DIMM temperatures. and the public iMC documentation does not describe any sort of coordination mechanism to prevent requests from different sources β€” like the motherboard firmware, a BMC, or the operating system β€” from interfering with each other. no locks, no handshake, no vibes check, nothing. they're all just out here stepping on each other 😭

therefore, it is highly recommended that developers contact the motherboard vendor for any board-specific instructions on how to disable and re-enable DIMM temperature monitoring. fr fr, ask the vendor.

DIMM temperature monitoring should be disabled before returning from imcsmb_pci_request_bus(), and re-enabled before returning from imcsmb_pci_release_bus(). the driver literally includes comments to that effect at the appropriate locations, she's not being subtle about it πŸŽ€

the driver has been tested and shown to work, with only that type of modification, on certain motherboards from Intel. (unfortunately, those modifications were based on material covered under a non-disclosure agreement, and therefore are not included in this driver. screaming crying throwing up, we know 😭) the driver has also been tested and shown to work as-is on various motherboards from SuperMicro. slay.

and one more thing bestie: the smb(4) driver will connect to the smbus(4) instances created by imcsmb. HOWEVER β€” since the IMC-SMBs are not general-purpose SMBus controllers, using smbmsg(8) with those smb(4) devices is not supported. do not do it. do not pass go. πŸ’€


✨ SEE ALSO ✨

go read those too, they're the supporting cast and they ate πŸ’…


✨ HISTORY ✨

the imcsmb driver first appeared in FreeBSD 12.0. a legend was born πŸ‘‘


✨ AUTHORS ✨

the imcsmb driver was originally written for Panasas by Joe Kloss. πŸ’–

it was substantially refactored, and this manual page was written, by Ravi Pokala <rpokala@freebsd.org> β€” thank you for your service king 🫢✨


and that's the whole page bestie!! this one came to you from the Debian crew, dated March 2, 2018, under the title IMCSMB(4) β€” so yeah, shoutout to them for keeping the lore alive. now go forth and please, for the love of everything, do not run smbmsg(8) on those devices. mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from