Skip to content

Conversation

@peterlin-sifive
Copy link
Contributor

This is a rework of #7407.

@peterlin-sifive
Copy link
Contributor Author

C.c. @gagachang

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

FYI @maroueneboubakri

@gagachang
Copy link
Contributor

Reviewed-by: Alvin Chang <alvinga@andestech.com>

@maroueneboubakri
Copy link
Contributor

@peterlin-sifive thanks for this patch.
LGTM
Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>

Add debug-only bounds checking in __get_core_pos() to prevent
out-of-bounds array access into per-core data structures.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
The thread_get_hartid_by_hartindex() function is removed as there
is no need to query remote hartids. Additionally, using this API
before secondary hart initialization would return incorrect values.

Replace with the simpler thread_get_hartid() which returns the current
hart's ID reliably.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
@peterlin-sifive
Copy link
Contributor Author

Thanks @gagachang and @maroueneboubakri, RB tags are included.

@jenswi-linaro
Copy link
Contributor

Assuming that the CI tests pass, do you want this merged before the 4.9 release?

@peterlin-sifive
Copy link
Contributor Author

Assuming that the CI tests pass, do you want this merged before the 4.9 release?

Yes, please.

@jenswi-linaro jenswi-linaro merged commit 2ac7784 into OP-TEE:master Jan 8, 2026
57 checks passed
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.

4 participants