SpacemiT K1 free DDR init firmware

Contents

  • Hardware
    • Architecture
      • Blocks and bases
      • Frequency points
      • Reference hardware
      • Conventions
    • Addressing and address map
      • MMIO windows
      • CPU address map
      • Size and geometry from MR8
    • Clocks and PMU
      • PLLs and the data rate
      • Clock-select, lock and SW-FC
      • MC reset
      • Frequency-change kicks
    • Memory controller
      • Command ports
      • STATUS
      • Timing banks
    • Device_Init
      • Phases
      • Verification
      • Byte mode (x8)
    • PHY
      • Per-byte structure
      • Analog COMMON blocks
      • Training status and harvest
    • Mode registers
      • Read and write
      • Registers the boot uses
      • Read quirks
    • Self-refresh
      • Enter and exit
      • STATUS and the parked state
    • DFC engine
      • The table window
      • The kick
      • 16 GiB variant
    • Training engine
      • The PI engine
      • The stages
      • Vref selection (max-min)
      • Acceptance ranges
    • Test platform
      • FDL loop
      • Reference boards
      • Reference measurements
  • U-Boot SPL
    • Role of the SPL
      • Memory configuration from the EEPROM
      • The puts argument
    • The boot interface
      • The ABI
      • What the ABI does not carry
      • Execution environment
      • Output contract
    • Integration into the build
      • Build time
      • Run time
      • Signing and flashing
    • Validation vehicle
      • Components
      • build-vehicle.sh
      • The U-Boot validation patch
      • fdl_run.py
      • Log prefixes
      • Result on the reference boards
  • Firmware
    • Architecture
      • Files and public API
      • Call flow of a cold boot
      • Data types
      • Error model
      • Design principles
    • Build and image
      • Toolchains
      • Makefile targets
      • Compiler flags of the image
      • Linker script (blob/blob.ld)
      • Image layout
      • Size
      • Stack budget
      • Using the image with mainline U-Boot
    • Entry points and runtime glue
      • start.S — entry table
      • k1_blob_ddr_init — the mainline entry
      • k1_blob_retrain — re-train entry (validation)
      • fmt.c — freestanding runtime
      • Fixed addresses in the image
    • Boot sequence
      • Steps
      • The report
      • Logging
      • Error-injection hooks
    • Controller bring-up
      • Hardware context
      • Timing constants
      • k1_ddr_pll_init() — PLLs, SW-FC to fp0, MC clock
      • k1_ddr_device_init() — Device_Init
      • k1_ddr_mc_reset()
      • k1_ddr_mr_write()
      • Address map
      • Error-injection hooks in this file
    • DFC table and hardware freq. change
      • Writing one table entry
      • Rank adaptation — k1_tbl_data()
      • k1_ddr_dfc_table_load()
      • k1_ddr_dfc()
      • How the boot uses it
      • Error-injection hook
    • The training pass
      • Shared primitives
      • Internal state
      • Flow
      • The PI wrapper — k1_pi_op()
      • Stages
      • Result collection — k1_collect()
      • Mode registers
      • Logging
      • What the tests pin down
      • Independent data-eye training (lib/k1_ddr_eye.c)
    • Data tables
      • Types (lib/k1_ddr_tables.h)
      • Tables
      • Two copies of the banked-register list
      • Inspecting the tables
      • Changing a table
    • MC timing: accepted ranges and optima
      • What the vehicle did
      • Latency optima (isolated)
      • Must-keep (accepted = programmed only)
      • Accepted windows with no latency (margin)
      • Not swept
    • Acceptance and logging
      • Range checks (lib/k1_ddr_accept.c)
      • Where the checks run
      • Log output
    • Testing
      • How the code is connected to the model
      • The model (model.c, model.h)
      • Test harness (check.h, test_main.c)
      • Error-injection builds (test_exp.c, make host-test-exp)
      • Mutation testing (mutate.py)
      • Table check (dump_tables.c, check_tables.py)
    • Notes, limitations and open points
      • Behaviour worth knowing
      • Limitations
      • Open points
      • Source references to the specification
SpacemiT K1 free DDR init firmware
  • Search


© Copyright 2026, Thalles Campagnani.

Built with Sphinx using a theme provided by Read the Docs.