Playing with the STM32MP2 serd.es · 9 points · 1 comments · HN thread TL;DR Serd...

@best

Playing with the STM32MP2 serd.es · 9 points · 1 comments · HN thread

TL;DR Serd.es (Shawn Harvey, writing as serd.es) describes bringing up the STM32MP257 as a bare-metal, MCU-style part with no Linux, U-Boot or DDR, using its PCIe to connect to an FPGA. He reports that a PCIe link issue was caused by the COMBOPHY PLL losing lock on the internal reference clock, and that the PCIe AXI path was zeroing 32-bit write payloads and read data because of a silicon bug in the RISAF5 TrustZone filter, now published as ST errata 2.3.33.

  • Goal: use the STM32MP2's PCIe (on a 5 Gbps COMBOPHY) as a high-bandwidth FPGA link instead of a parallel FMC, with code and data entirely in on-die SRAM (808 kB) and no external DDR, U-Boot or TrustZone.
  • Boot requires FSBL images placed in RETRAM/SYSRAM aliases, VDDIO monitor setup, SRAM enabling, and an A35 wake-up sequence through PWR, EXTI and RCC registers; the A35 image must come from flash because the boot ROM re-runs when the A35 is released.
  • PCIe link flapped because the internal 25 MHz RCC-derived clock gave jittery COMBOPHY PLL behavior; switching to the external 100 MHz reference (COMBOPHYCR1 = 0x33) gave a stable 2.5 GT/s gen1 x1 link.
  • PCIe configuration and BAR writes went out with correct addresses but all-zero payloads, and reads returned zeros to firmware even though the device answered with valid data.
  • The cause was the RISAF5 unit on the PCIe AXI interface: 32-bit reads and writes bypassed its checks, with the fault raised only after the access was dispatched, a potential TrustZone bypass that ST has documented.
  • Measured PIO throughput is about 1.77 Gbps versus roughly 977 Mbps for the FMC; DMA with 256-byte TLPs could theoretically reach about 3.71 Gbps.

Discussion The thread has only one comment, a short question. ranger_danger wonders whether the STM32MP2's locked crypto accelerator documentation is due to export control or government contract requirements, which is a side remark on the author's complaint about security-by-obscurity documentation. No replies or other views appear, so there is no broader discussion or mood to report.

  • Locked crypto docs may stem from export control or government contracts (a few): The only commenter suggests that withholding documentation for the crypto accelerator could be required by export control rules or government contracts rather than being purely a design choice. This is speculation and is not supported by evidence in the thread.

#STM32MP2 #PCIe #TrustZone #siliconbug #embedded #FPGA