Skip to content

TF-M: Switch to vanilla TF-M's OS wrapper #14396

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

Merged
merged 3 commits into from
Mar 22, 2021

Conversation

LDong-Arm
Copy link
Contributor

@LDong-Arm LDong-Arm commented Mar 8, 2021

Summary of changes

The following PRs are related, we should coordinate to get them in roughly at the same time:
ARMmbed/trusted-firmware-m#16
ARMmbed/tf-m-tests#3
ARMmbed/mbed-os-tf-m-regression-tests#93
#14396

Previous, we patched TF-M to replace its OS wrapper with CMSIS RTOS to resolve manage management issue when integrated with Mbed OS. But as of TF-M v1.2, the OS wrapper has been reworked in the vanilla TF-M, and now it makes identical calls to its underlying CMSIS RTOS as our patches do. So, we remove our patches and use vanilla TF-M's OS wrapper instead to avoid extra maintenance overhead.

Note: The OS wrapper files were imported by ARMmbed/mbed-os-tf-m-regression-tests#93, using ARMmbed/trusted-firmware-m#16 and ARMmbed/tf-m-tests#3.

Impact of changes

This is a kind of refactoring - it has no impact on applications or other parts of Mbed OS.

Migration actions required

None.

Documentation

None.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Mar 8, 2021
@ciarmcom ciarmcom requested a review from a team March 8, 2021 18:30
@ciarmcom
Copy link
Member

ciarmcom commented Mar 8, 2021

@LDong-Arm, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

evedon
evedon previously approved these changes Mar 10, 2021
Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

Looks good

@mergify mergify bot added needs: CI and removed needs: review labels Mar 10, 2021
@LDong-Arm LDong-Arm changed the title [DRAFT] TF-M: Switch to vanilla TF-M's OS wrapper TF-M: Switch to vanilla TF-M's OS wrapper Mar 10, 2021
@LDong-Arm LDong-Arm marked this pull request as ready for review March 10, 2021 12:01
@adbridge
Copy link
Contributor

CI started

@mergify mergify bot added needs: work and removed needs: CI labels Mar 10, 2021
@LDong-Arm LDong-Arm changed the title TF-M: Switch to vanilla TF-M's OS wrapper [DO NOT MERGE] TF-M: Switch to vanilla TF-M's OS wrapper Mar 10, 2021
@LDong-Arm LDong-Arm changed the title [DO NOT MERGE] TF-M: Switch to vanilla TF-M's OS wrapper TF-M: Switch to vanilla TF-M's OS wrapper Mar 10, 2021
@mbed-ci
Copy link

mbed-ci commented Mar 10, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM
jenkins-ci/mbed-os-ci_unittests
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-example-ARM
jenkins-ci/mbed-os-ci_build-greentea-ARM
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM
jenkins-ci/mbed-os-ci_build-example-GCC_ARM

@mbed-ci
Copy link

mbed-ci commented Mar 10, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️

@adbridge
Copy link
Contributor

@LDong-Arm looks like we may have some genuine failures...

@LDong-Arm
Copy link
Contributor Author

See my comment in another PR: #14362 (comment)
We need to check that our CI is fetching the right version/branch of each example - also mbed-tools (Mbed CLI 2) should be the latest version.

@mbed-ci
Copy link

mbed-ci commented Mar 10, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_tfm-integration ✔️

0xc0170
0xc0170 previously approved these changes Mar 11, 2021
@LDong-Arm LDong-Arm changed the title TF-M: Switch to vanilla TF-M's OS wrapper [DO NOT MERGE] TF-M: Switch to vanilla TF-M's OS wrapper Mar 11, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 11, 2021

ARMmbed/trusted-firmware-m#16
ARMmbed/tf-m-tests#3
ARMmbed/mbed-os-tf-m-regression-tests#93

needs: preceding PR set for now. Let us know once it's ready

Previous, we patched TF-M to replace its OS wrapper with CMSIS RTOS
to resolve manage management issue when integrated with Mbed OS. But
as of TF-M v1.2, the OS wrapper has been reworked in the vanilla TF-M,
and now it makes identical calls to its underlying CMSIS RTOS as our
patches do. So, we remove our patches and use vanilla TF-M's OS
wrapper instead to avoid extra maintenance overhead.

This commit re-imports TF-M files associated with the OS wrapper.
The Arm Compiler is case sensitive and unable to distinguish
between `Thread.h` from Mbed OS RTOS and `thread.h` from TF-M's
OS wrapper, for example. This resolves compilation failures due to
wrong includes.

To resolve this, use the fully-qualified include paths for the
RTOS API.
@LDong-Arm LDong-Arm changed the title [DO NOT MERGE] TF-M: Switch to vanilla TF-M's OS wrapper TF-M: Switch to vanilla TF-M's OS wrapper Mar 22, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 22, 2021

CI started

@mbed-ci
Copy link

mbed-ci commented Mar 22, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 4 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_tfm-integration ✔️

@0xc0170 0xc0170 merged commit 96e19af into ARMmbed:master Mar 22, 2021
@mergify mergify bot removed the ready for merge label Mar 22, 2021
@mbedmain mbedmain removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants