[PATCH v6 6/6] platform: generic: spacemit: k3: override cold_boot_allowed for hart 0 only
Anup Patel
anup at brainfault.org
Wed Oct 28 23:14:34 PDT 2026
On Wed, Oct 28, 2026 at 7:27 PM Troy Mitchell
<troy.mitchell at linux.spacemit.com> wrote:
>
> From: Valentin Haudiquet <valentin.haudiquet at canonical.com>
>
> Only hart 0 is powered at reset on K3; secondary harts are started later
> through HSM. Restrict cold-boot eligibility to hart 0 instead of using
> the generic DT-configured hart mask, matching K1.
>
> Signed-off-by: Valentin Haudiquet <valentin.haudiquet at canonical.com>
> Reviewed-by: E Shattow <e at freeshell.de>
> Signed-off-by: Troy Mitchell <troy.mitchell at linux.spacemit.com>
LGTM.
Reviewed-by: Anup Patel <anup at brainfault.org>
Applied this patch to the riscv/opensbi repo.
Thanks,
Anup
> ---
> platform/generic/spacemit/k3.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/platform/generic/spacemit/k3.c b/platform/generic/spacemit/k3.c
> index 967d09bf..7922ab11 100644
> --- a/platform/generic/spacemit/k3.c
> +++ b/platform/generic/spacemit/k3.c
> @@ -102,11 +102,17 @@ static int spacemit_k3_early_init(bool cold_boot)
> return generic_early_init(cold_boot);
> }
>
> +static bool spacemit_k3_cold_boot_allowed(u32 hartid)
> +{
> + return !hartid;
> +}
> +
> static int spacemit_k3_platform_init(const void *fdt, int nodeoff,
> const struct fdt_match *match)
> {
> spacemit_k3_hart_init(current_hartid());
> generic_platform_ops.early_init = spacemit_k3_early_init;
> + generic_platform_ops.cold_boot_allowed = spacemit_k3_cold_boot_allowed;
>
> return 0;
> }
>
> --
> 2.55.0
>
More information about the opensbi
mailing list