Skip to content

Add PolarFire SoC Icicle Kit support to the M-mode LPDDR4 boot - #976

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:mpfs250_icicle
Open

dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:mpfs250_icicle

Conversation

@dgarske

@dgarske dgarske commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Description

Brings the M-mode HSS-replacement boot up on the MPFS-ICICLE-KIT (MPFS250T, a non-secure die without the Athena co-processor), alongside the MPFS250TS Video Kit it was developed on.

  • config/examples/polarfire_mpfs250_icicle_m.config: M-mode + LPDDR4 + SD for the Icicle Kit. The signed FIT is read from a file on the card's FAT32 partition, so the stock HSS/U-Boot card layout stays usable.
  • MPFS_SC_PROBE: a read-only System Controller service probe (device serial, TRNG nonce, PUF emulation) that reports status and stability but never a value. On by default in M-mode builds; polarfire_mpfs250_icicle.config is a probe-only build without DDR or an image source for surveying an unfamiliar board.
  • MPFS_DDR_BCLK_PHASE, MPFS_SD_EMMC_DEMUX_ADDR, MPFS_PHY_RPC156_VAL: the three per-board values the driver had as Video Kit constants, now make variables. The Icicle's SD/eMMC demux is a fabric register rather than the Video Kit's IOMUX override.
  • hal/mpfs250_ddr.c: the LPDDR4 mode registers are written masked from the controller's configuration instead of as literals. The literal MR13 disabled the DRAM data mask the controller relied on, which corrupted neighbouring bytes under SMP load. The DFI init handshake is no longer re-pulsed after a successful TIP training, and the HSS load_dq prelude runs before the first write calibration; without either, write calibration timed out on the Icicle.
  • DEBUG_DDR gains a register dump that diffs against an HSS tinyCLI hexdump; MPFS_DDR_MEMTEST=1 adds a CPU pattern test over the DDR windows the design's SEG registers map.
  • Docs and CI builds for both new configs. The Libero design config must be an Icicle (ICICLE_MSS) export; the docs explain why an HSS build directory left from another board must not be reused.

Testing

Icicle Kit: LPDDR4 training completes on every cold boot tested, the pattern test over all three mapped windows is clean, and Linux 6.12 from the Yocto fitImage reaches login on 4 CPUs and runs a multi-process memory stress clean. Video Kit (QSPI + DDR configuration): DDR trains and the signed QSPI test application verifies and is handed off, so the shared driver changes hold there. The System Controller probe answers on both dies (serial, TRNG, PUF). All PolarFire example configs build; the sNVM/PUF/WDT host unit tests pass. Not covered: the runtime sNVM provisioner on the Icicle (its factory bitstream has no writable sNVM page) and eMMC boot on the Icicle.

@dgarske dgarske self-assigned this Nov 6, 2026
Copilot AI balanced review requested due to automatic review settings November 6, 2026 17:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The DDR diagnostic unconditionally accesses a potentially unmapped 64-bit window, risking a fault or stall before either 32-bit window can be tested.

3 open issues
What changed in this PR

Adds Icicle Kit support to wolfBoot’s standalone PolarFire M-mode boot path, including LPDDR4 initialization and signed FIT loading from the existing FAT32 SD-card layout.

Changes:

  • Adds Icicle boot and System Controller probe configurations, with CI builds for both.
  • Introduces board-specific DDR tuning and SD/eMMC selection, and adjusts shared DDR training.
  • Adds DDR diagnostics and documents Icicle setup and troubleshooting.
File Description
options.mk Adds the M-mode-only System Controller probe option.
hal/​mpfs250.h Defines fabric clock and reset bits.
hal/​mpfs250.c Adds service probing and fabric-based SD/eMMC selection.
hal/​mpfs250_ddr.c Updates DDR training, board tuning, and diagnostics.
docs/​Targets.md Lists Icicle support and new DDR options.
docs/​PolarFire.md Documents Icicle setup, board differences, and troubleshooting.
config/​examples/​polarfire_mpfs250_icicle.config Adds a no-DDR System Controller survey template.
config/​examples/​polarfire_mpfs250_icicle_m.config Configures Icicle LPDDR4 boot from a signed FIT on FAT32.
.github/​workflows/​test-configs.yml Adds build coverage for both Icicle configurations.

Review effort: Balanced

Comment thread hal/mpfs250_ddr.c Resolved
Comment thread docs/Targets.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The DDR HAL fails to compile with memory testing enabled and UART logging disabled under default warning flags, and make config discards the new MPFS settings because they are missing from CONFIG_VARS.

2 open issues
3 resolved since last review

Review effort: Balanced

Comment thread hal/mpfs250_ddr.c Resolved
Comment thread options.mk Resolved

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #976

Scan targets checked: wolfboot-src, wolfboot-bugs
Not reviewed (no scan target covers them): .github/workflows/test-configs.yml, config/examples/polarfire_mpfs250_icicle.config, config/examples/polarfire_mpfs250_icicle_m.config, docs/PolarFire.md, docs/Targets.md, hal/mpfs250.h, options.mk
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants