[PATCH 2/3] platform: generic: spacemit: k3: override cold_boot_allowed for hart 0 only
Troy Mitchell
troy.mitchell at linux.spacemit.com
Mon Aug 31 22:45:25 PDT 2026
On Mon, Aug 31, 2026 at 10:07 PM +0200, Valentin Haudiquet wrote:
> Only hart 0 is powered at reset on K3. Without overriding
> cold_boot_allowed, the generic default checks a DTB hart mask which may
> allow non-hart-0 harts to attempt cold boot, breaking the coldboot
> lottery on a platform where only one hart is running.
>
> Add spacemit_k3_cold_boot_allowed() returning true only for hart 0,
> matching K1's pattern.
>
> +static bool spacemit_k3_cold_boot_allowed(u32 hartid)
> +{
> + return !hartid;
> +}
This matches the K3 boot contract and the vendor OpenSBI behavior. Only
hart 0 should participate in the cold-boot lottery; this does not affect
starting secondary harts later through HSM.
As you mentioned in the cover letter that I could take these patches, I
will include this patch in the next revision of my series, retaining your
authorship and Signed-off-by.
- Troy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 248 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/opensbi/attachments/20260901/80b9a406/attachment-0001.sig>
More information about the opensbi
mailing list