SpacemiT_K3_DDR

← Previous: ARC Execution Environment Index Next: Validation & Measurements →

Firmware behavioral requirements

Purpose and scope

These normative requirements specify the processor, memory, peripheral, timing, and toolchain rules that any LPDDR5 PMU firmware implementation must satisfy to execute reliably on the SpacemiT K3 DDR PHY microcontroller. They apply to the ARC/PMU firmware image, not to host-side DDR controller programming.

In this document, must denotes a mandatory hardware or ABI requirement verified on the K3 platform. All addresses are in the PMU/ARC address space unless explicitly identified as a host CSR index.

BR-01 — Target architecture, entry point, and reduced register file

BR-02 — Startup memory placement and .bss isolation

BR-03 — Peripheral/DMEM access widths, volatile qualification, and unaligned table strides

BR-04 — Calling convention and stage-enable gating

BR-05 — PHY CSR addressing and hardware handshake sequences

BR-06 — Hardware RTC timer accesses (0x103–0x105)

BR-07 — Hardware multiply/divide instructions and libgcc overrides

BR-08 — Transient scratch isolation (0x8000e000–0x8000e0ff)

BR-09 — Mailbox handshake and 16-bit protocol compliance

BR-10 — Verification invariants before hardware deployment

Before loading or flashing a newly built PMU firmware image, verify:

  1. Disassembly audit: arc-elf32-objdump -d shows zero references to r16–r25 and no unoverridden libgcc division/64-bit multiplication routines.
  2. Entry layout: offset 0x0 branches to startup at 0x1fc.
  3. Section placement: .bss starts at or above 0x80004000 and does not touch 0x80000000–0x80003fff.
  4. Image size: binary size is within the 64 KiB IMEM limit (and <= 0x6800 bytes if targeting quickboot).
  5. Runtime completeness: full training executes all enabled SequenceCtrl stages, emits major 0x07, leaves CsTestFail == 0, populates all 5170 phypara halfwords and 4096 ACSM halfwords, and passes post-activation memory verification.