-
Notifications
You must be signed in to change notification settings - Fork 3k
Call mbed_tfm_init before mbed_toolchain_init #13400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@gbrtth, thank you for your changes. |
@urutva I recall this was touched in the recent PRs, can you review this change please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a common code:
- Is this been tested with TF-M Dual V7 targets and non-TF-M targets?
The reason for this changes is that there are platforms (Musca-B1, Musca-S1), which use
certain components (eg. GPIO) through TF-M ioctl services, and if mbed_toolchain_init() tries
to initialize these components through constructors before mbed_tfm_init() finishes, fault will
occur on the platforms.
- Is this issue reproducible on
ARM_MUSCA_B1
with TF-M v1.1?
I cannot test them with TF-M Dual V7 or non-TF-M targets, because I do not have such platforms.
I need to cross-check it again. Let me get back to you once it is done. |
We have managed to reproduce this issue on Musca B1. Please see the attached logs. |
Ok, please you could try - https://github.com/ARMmbed/mbed-os-tf-m-regression-tests/blob/master/README.md#execute-all-tests-for-arm_musca_b1 on the current PR fix applied to the Mbed OS. This is to make sure we are not breaking other tests with this fix. Also please update the description, which test is having the issue, it would have made it clear that there was a test failing. |
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
|
Change-Id: I0f45425058bf5cabbda877463ff1d8f4d713be8f Signed-off-by: Mark Horvath <mark.horvath@arm.com>
e713c65
to
656e046
Compare
Documentation is changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
CI Started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
This commit changes the boot sequence in mbed_start(), calling mbed_tfm_init()
before mbed_toolchain_init().
The reason for this changes is that there are platforms (Musca-B1, Musca-S1), which use
certain components (eg. GPIO) through TF-M ioctl services, and if mbed_toolchain_init() tries
to initialize these components through constructors before mbed_tfm_init() finishes, fault will
occur on the platforms.
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results
Reviewers