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
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2015-2016 SRI International
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms