Hi Jamie,

On Thu, Jul 23, 2026 at 8:52 AM Jamie Gibbons
<[email protected]> wrote:
>
> Hi all,
>
> This series adds support for the hardware random number generator (RNG) on
> the Microchip PolarFire SoC (MPFS) and fixes several related issues
> uncovered during integration and testing.
>
> The MPFS hardware RNG is accessed indirectly via the MPFS system
> controller using the mailbox interface. Unlike typical memory-mapped RNGs,
> the system controller mailbox is shared and non‑reentrant, which
> introduces integration challenges in U‑Boot’s synchronous, polled
> execution model during early boot.
> While integrating the RNG support, testing revealed that mailbox requests
> issued during autoboot could fail spuriously due to transient mailbox
> BUSY states. Investigation showed that the MPFS mailbox BUSY indication
> reflects multiple phases of the underlying IHC handshake, allowing
> U-Boot’s polled model to observe intermediate states that Linux’s
> interrupt-driven model normally hides.
>
> This series addresses those challenges in various ways.
> 1. Adds missing infrastructure in the MPFS system controller driver to
> explicitly receive mailbox responses.
> 2. Binds the MPFS RNG as a sub‑device of the system controller, mirroring
> Linux behaviour and avoiding the need for a device tree node.
> 3. Introduces a new MPFS RNG driver implementing UCLASS_RNG.
> 4. Enables RNG support in the Microchip PolarFire SoC generic defconfig.
> 5. Replaces unbounded polling loops with regmap_read_poll_timeout().
> 6. Replaces an immediate -EBUSY return with a bounded wait for BUSY to
> clear, before issuing requests, avoiding spurious early-boot mailbox
> failures and allowing KASLR seed generation to complete successfully
> during autoboot.
>
> The resulting behaviour matches Linux semantics where practical while
> remaining appropriate for U-Boot’s single-threaded execution model.
> Interactive RNG usage and boot-time KASLR seed generation both work
> reliably after the mailbox sequencing fixes.
>
> All changes have been tested on the PolarFire SoC Icicle Kit ES.
>
> Regards,
> Jamie.

Applied to u-boot-riscv/main, thanks,

Best regards,
Leo

Reply via email to