How jimx-/softssd works
Project Type and Purpose
• This is an embedded, multi-core firmware project targeting an SoC with three processing elements:
• Cortex-A53 (A53)
• Arm Cortex-R5_0 (R5_0)
• Arm Cortex-R5_1 (R5_1)
• Each core runs its own bare-metal application:
• A53 runs the main controller code under src/
• R5_0 runs a polling engine under r5poll/
• R5_1 runs an ECC offload engine under eccengine/
• All cores share on-chip peripherals (PCIe/NVMe host interface, flash controller, timers, interrupts) and common libraries in include/.
File Structure Analysis
• Top-level directories:
• src/ – A53 firmware source (FTL, hostif, coroutine scheduler, flash abstraction)
• r5poll/ – R5_0 polling application (flash interface, NFC, timers)
• eccengine/ – R5_1 ECC engine (BCH encode/decode)
• include/ – Shared headers (data structures, threading, config)
• Key modules under src/:
• hostif/ – PCIe and NVMe command handling
• ftl/ – Flash translation layer components
• coro/ – Lightweight coroutine scheduler, mutexes, queues
• hdrhistogram/ – Latency tracking utility
• Interrupts, timers, worker threads, slab allocator, I/O iterators
• Build scripts & config:
• create_projects.tcl – Auto-generates cross-compile projects for each core
• Linker scripts (*.ld) in each source tree
• Shared include path (include/)
Insights from README
• Three separate linker/build targets map directly to three cores.
• A53 uses src/, R5_0 uses r5poll/, R5_1 uses eccengine/.
• All three include the headers under include/.
a. Main Components
• Processing Elements:
• Core-A53 (main FTL & host interface)
• Core-R5_0 (polling engine for flash / NFC)
• Core-R5_1 (ECC encode/decode engine)
• Shared Peripherals:
• PCIe Root Complex / NVMe host controller
• Flash channels & NFC controllers
• On-chip timers & interrupt controller
• Common Software Libraries:
• Coroutine scheduler, threading primitives
• Data structures (AVL, bitmap, ring queue)
• Flash abstraction layer, I/O iterator
b. Relationships & Interactions
• Core-A53 issues NVMe commands via PCIe host interface → interacts with hostif/nvme.*.
• FTL logic on A53 submits read/write to flash controller → may trigger interrupts.
• R5_0 polls flash controller status and handles raw page reads (r5poll/fil/).
• When R5_1 ECC engine is needed, A53 or R5_0 streams data via shared memory / IPC → R5_1 performs BCH encode/decode.
• Synchronization via interrupts, shared memory queues (ringq), IPI (inter-processor interrupt) lines.
c. Architectural Patterns
• Multi-core separation of concerns:
• Control plane on A53, data plane (polling) on R5_0, offload (ECC) on R5_1
• Producer-consumer queues between cores (implement via ringq, ipi)
• Lightweight cooperative multitasking on A53 (coroutines)
d. Relevant Technologies & Frameworks
• Bare-metal C code, custom coroutine library (src/coro/)
• Host interface modules (pcie.c, nvme.c)
• Flash translation (ftl/) and ECC (bch* in eccengine/)