Firmware and FTL
Read and change the C implementation of command policy, command lifetime, logical-to-physical mapping, partial-page read-modify-write, foreground GC and recovery.
Open-source · Linux · Portable C firmware
SSD firmware development and simulation, from the NVMe command to the NAND page.
Study and modify a flash translation layer (FTL), garbage collection, NAND controller behavior and persistent recovery without a dedicated SSD development board. The repository is ssd-firmware-lab.
Pre-alpha developer preview: v0.1.0-spine-preview.1 has one 1-MiB namespace, file-backed simulated NAND and finite runtime budgets. It is not production firmware, a capacity/performance benchmark or an image to flash onto a commercial SSD.
Development source beyond the tag: scalable FTL, physical NAND v2/PAGE2, and an explicit 64-MiB native profile with up to 1-MiB I/O, two I/O queues and three MSI-X vectors. MQ2 shares one global I/O frame: it is not parallel FTL. A separate earlier ARM64 64-GiB headless functional campaign does not qualify current native capacity. Read the current construction matrix and scoped performance data.
Linux NVMe driver / alternate QEMU guest → synthetic PCI/HIF → NVMe policy + shared command lifecycle → FTL / GC / mapping journal / recovery → NAND flash controller model → persistent NAND pages + OOB + health/WAL → completion intent → CQE / IRQ
BAR and controller state use volatile memory. The nand.bin image holds simulated physical NAND state; namespace I/O does not bypass the FTL and NAND controller to access that file by logical LBA.
Read and change the C implementation of command policy, command lifetime, logical-to-physical mapping, partial-page read-modify-write, foreground GC and recovery.
Explore modeled read/program/erase operations, ECC/retry, page and out-of-band (OOB) metadata, write-ahead logging and restart behavior.
A dedicated Linux VM can expose the experimental software PCI/NVMe function to its native driver or, sequentially, a QEMU guest through upstream VFIO/IOMMUFD. Both use the same firmware/storage implementation.
Read the published case coverage, exact source identities and remaining risks. Software checks do not establish real hardware timing, physical DMA-master isolation or real NAND power-loss behavior.
Use an ordinary Linux user with Git, GNU Make and a C11 compiler with Linux/POSIX development headers. No FPGA, root, KVM or raw disk is needed for this check.
git clone --branch v0.1.0-spine-preview.1 https://github.com/Evanshenf/ssd-firmware-lab.git
cd ssd-firmware-lab
make -C frontends/linux-m4 check-runtime
This runs existing integration checks through the real firmware, FTL, NFC and temporary file-NAND. Require a successful exit, including the storage/recovery checks. The marker native_hif=not_connected is expected: this entry point does not create a system NVMe device.
See dependencies and output explained. Creating a native namespace is a separate, privileged disposable-VM experiment with a pinned kernel and reserved BAR memory, not a production-host installation.
The tagged release supports a fixed 1-MiB namespace, 512-byte LBAs, an 8-KiB maximum transfer and one depth-32 I/O queue pair. Development profiles are listed separately above. Larger native capacity, advanced wear-leveling, raw-block backing, RTOS ports and physical NAND/FPGA/SoC adapters are future work, not delivered features.
Physical NAND erase-generation recovery remains a hardware-porting contract gap. A concurrent FLR/publication-window risk is recorded as unconfirmed. The versioned results are the authority for what was tested.
Development is AI-assisted; that is not a substitute for review or execution. To help, report a reproduction or ask a firmware question, including the exact version and redacted output.
NVMe FWLab(SSD Firmware Lab)是一个运行于 Linux 的 SSD 固件开发实验室,公开 C 固件源码,覆盖 FTL 闪存地址转换、GC 垃圾回收、NFC NAND 控制器模型、页与 OOB 元数据,以及持久化日志和重启恢复。
当前已打通软件 NVMe → 固件 → FTL → NFC → NAND 介质的纵向路径,并完成指定的原生 Linux 和 QEMU 所有权切换实验。初步软件检查不需要专用开发板;原生设备实验需要另行配置专用虚拟机。
项目仍是 pre-alpha,旧标签固定 1 MiB;开发构建已加入 64 MiB 原生 namespace、最大 1 MiB I/O 与双队列/三个向量。双队列仍串行执行 FTL。早期 ARM64 的 64 GiB headless 功能验证不等于当前原生大容量或 SSD 性能。128 GB、512 GB、1 TB、RTOS 及实体 NAND 适配均不能作为已完成能力。它不是商用 SSD 刷机固件,也不适合保存真实业务数据。