Skip to content

loader: handle non-PSCI ARM platforms better#457

Merged
Ivan-Velickovic merged 1 commit intomainfrom
psci_unavailable
Mar 30, 2026
Merged

loader: handle non-PSCI ARM platforms better#457
Ivan-Velickovic merged 1 commit intomainfrom
psci_unavailable

Conversation

@Ivan-Velickovic
Copy link
Copy Markdown
Collaborator

This makes things slightly better, main thing is that we make sure we don't try boot secondary CPUs via PSCI if it's unavailable.

This makes things slightly better, main thing is that we make sure
we don't try boot secondary CPUs via PSCI if it's unavailable.

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>

return ret;
#else
LDR_PRINT("ERROR", 0, "unknown CPU start method for this platform");
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.

This might as well be a compile error?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Resolved offline, cpus.c is always compiled so would need to split it out for exceptions where SMP is just unsupported (e.g Kria26). Just leave as run-time error for now...

arm_spin_table_cpu_start(logical_cpu, (uint64_t)sp);
return 0;
#else
#elif !defined(ARM_PSCI_UNAVAILABLE)
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.

I think it makes more sense to have it as like, SMP_BOOT_METHOD == ARM_PSCI or SMP_BOOT_METHOD == SPIN_TABLE or w/e (not if-def'd)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Talked in-person with @midnightveil , SMP_BOOT_METHOD doesn't really work well when you still need to skip PSCI version checking.

@Ivan-Velickovic Ivan-Velickovic merged commit 7b8b036 into main Mar 30, 2026
11 checks passed
@Ivan-Velickovic Ivan-Velickovic deleted the psci_unavailable branch March 30, 2026 01:57
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.

Fix loader on ARM platforms without SMC available/starting at EL3

2 participants