Skip to content

Update to TF-M v1.4.0 #127

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 11 commits into from
Sep 14, 2021
Merged

Update to TF-M v1.4.0 #127

merged 11 commits into from
Sep 14, 2021

Conversation

rwalton-arm
Copy link
Contributor

@rwalton-arm rwalton-arm commented Sep 2, 2021

Update TF-M to v1.4.0.

Note, this PR depends on ARMmbed/mbed-os#15050, as this PR removes the workaround for the directory change upstream for musca targets.

Some file locations have changed in the latest development version of
TF-M. Update the paths to the files we import.
@rwalton-arm rwalton-arm force-pushed the TF-Mv1.4.0 branch 2 times, most recently from d14cc5c to 906ff39 Compare September 9, 2021 15:39
rwalton-arm and others added 7 commits September 10, 2021 09:14
The latest TF-M has renamed the identifier of each test suite.
The path containing the library tfm_test_suite_fwu_ns has been moved
in tf-m-tests.
Add a new test from the latest TF-M development branch.

Remove deprecated library.
The Crypto suite was disabled due to crashes that made tests unable
to continue. With the latest TF-M and psa-arch-tests, it doesn't
crash anymore so we can re-enable it with updated number of expected
failures.
tfm_ns_interface.c is intended to be overriden by clients to support
different targets. We copy this file from upstream into the mbed-os
platform library. We also have a specific "strong" overriden version for
the NU_M2354 target, which is located in its target library. Previously
the implementations in the platform library were decorated with
__attribute__(weak), and we provided a strong definition for the
NU_M2354 target. This worked fine because of weak linking, the linker
will pick the first "strong" definition and use that, avoiding any ODR
violations. However, upstream have removed __attribute__(weak) from the
function definitions, which caused multiply defined symbol errors when
trying to build the MU_2354 target.

To work around the above issue, we remove the common definition in the
platform library; instead we copy the file to the Musca B1 and Musca S1
target libaries. This means the appropriate tfm_ns_interface.c is only
included in the build when compiling for the specific target which uses
it.
We need to copy tfm_firmware_update_ipc.c for M2354 to fix a build error
when compiling the firmware update test suite for this target.
@rwalton-arm rwalton-arm marked this pull request as ready for review September 13, 2021 10:23
@Patater Patater changed the title [WIP] Update to TF-M v1.4.0 Update to TF-M v1.4.0 Sep 13, 2021
Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

Looks really good, just one suggestion to cover ARMmbed/mbed-os#14762 too.

Previously we omitted region_defs.h and flash_layout.h from the import
script for MUSCA targets, due to an issue with mbed-cli1 not recognising
the BL2 macro defined in targets.json in mbed-os. We kept older patched
versions of the headers in the mbed-os tree. Now we have another
solution for the BL2 issue, which is to define it in the MUSCA target
scatter files. This means we can import the latest headers from
upstream.
@Patater Patater merged commit af374fc into ARMmbed:master Sep 14, 2021
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.

3 participants