CFI(4)

πŸ’Ύ CFI β€” okay bestie, let's talk flash memory πŸ’Ύ

So this is a section 4 page from the Kernel Interfaces Manual, and it's all about cfi and cfid β€” the driver duo for Common Flash Interface (CFI) NOR flash. Grab a snack, we're getting into it. πŸ“


✨ NAME ✨

cfi, cfid β€” the driver for Common Flash Interface (CFI) NOR flash. That's it, that's the vibe. πŸ¦‹


✨ SYNOPSIS ✨

Like, here's how you summon them:

device cfi
device cfid
options CFI_SUPPORT_STRATAFLASH
options CFI_ARMEDANDDANGEROUS

And if you're doing the hints thing, in /boot/device.hints:

hint.cfi.0.at="nexus0"
hint.cfi.0.maddr=0x74000000
hint.cfi.0.msize=0x4000000

Orrr if you're a DTS file girlie, in the DTS file:

flash@74000000 {
  compatible = "cfi-flash";
  reg = <0x74000000 0x4000000>;
};

✨ DESCRIPTION ✨

okay so the cfi device driver hands you a management interface to NOR flash devices that support the Common Flash Interface (CFI) specification. That's its whole thing. πŸ’…

Its companion device, cfid, is the one that gives you a geom(4) disk interface to the device. They're a package deal, fr fr. 🫢

Special support for the features of the Intel StrataFlash line? That's available with the CFI_SUPPORT_STRATAFLASH kernel option. Slay. ✨

And then there's additional support β€” for write-once bits to switch part of Intel StrataFlash devices to read-only β€” which you can enable with the CFI_ARMEDANDDANGEROUS kernel option.

Okay so the name is NOT a joke, bestie. CFI_ARMEDANDDANGEROUS is literally armed and dangerous β€” it touches write-once bits and flips part of your StrataFlash to read-only. Once it's done, it's done. πŸ‘‘πŸ’€ Read the name, respect the name.

✨ SEE ALSO ✨

  • led(4) β€” go look at the lights, queen 🌈

✨ HISTORY ✨

The cfi device driver first appeared in FreeBSD 8.0. Throwback. πŸŽ€


✨ AUTHORS ✨

The cfi driver was written by Juniper Networks, with StrataFlash support by Sam Leffler. This manual page was written by SRI International and the University of Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) (β€œCTSRD”), as part of the DARPA CRASH research programme. Academic icon behavior, honestly. πŸŽ“πŸ’œ


And that's the whole page, bestie! This one came from the Debian build of the page, dated January 20, 2016, and it's the CFI(4) page you just read top to bottom. Go forth and flash responsibly. πŸ’–πŸŒΈβœ¨

πŸ“¦ where this page comes from