Page MenuHomeFreeBSD

Add workaround for broken PSCI implementation.
Needs ReviewPublic

Authored by mmel on Jan 11 2018, 3:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 25 2024, 3:36 AM
Unknown Object (File)
Dec 23 2023, 3:20 AM
Unknown Object (File)
Jul 10 2023, 9:26 AM
Unknown Object (File)
Jun 25 2023, 6:57 AM
Unknown Object (File)
Jun 16 2023, 3:07 AM
Unknown Object (File)
May 13 2023, 12:36 AM
Unknown Object (File)
May 10 2023, 3:56 PM
Unknown Object (File)
Feb 14 2023, 9:15 AM
Subscribers

Details

Reviewers
andrew
manu
Summary

By specification, the PSCI CPU_ON command should pass context_id argument
in X0 register for newly started core. But it seems that at least U-Boot
based PSCI implementation corrupt it.
Use the cpu_mpidrs table for validation of X0 (context_id) value and if
is not valid, use it for searching of correct context_id.

MFC after: 1 month

Test Plan

r359280 removed the need to access the cpu_mpidr table from the assembler (to determine right secondary stack) . Move the check into mp_machdep.c.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Does this need to live in asm? If we don't trust the value passed we should just stop using it, but this would be easier to follow if it was moved to init_secondary.

I agree but, unfortunately, yes. The context_id is used for selecting right stack. See line 270 in new file.

mmel edited the test plan for this revision. (Show Details)