Skip to content
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

Remove PSA implementation for v8-M and dual CPU targets #12737

Merged
merged 6 commits into from
Apr 30, 2020

Conversation

Patater
Copy link
Contributor

@Patater Patater commented Mar 31, 2020

Summary of changes

With Mbed 6, TrustedFirmware-M (TF-M) is the source of Mbed's implementation of PSA. This means Mbed 6 doesn't need to contain any code or tooling to build the v8-M or dual CPU secure binaries.

This patch set removes tooling, code, and targets that would have been used to make PSA secure binaries for v8-M or dual CPU platforms.

Impact of changes

  • NXP LPC55S69 and Numaker M2351 support is temporarily dropped as compared to Mbed 5, as those targets are not supported in TF-M upstream.
  • Exporters for v8-M and dual CPU PSA targets are not supported, due to TF-M limitations.
  • It is no longer possible to use Mbed to build v8-M or dual CPU secure binaries.
  • The following targets are removed compared to Mbed 5:
    • ARM_MUSCA_A1_S
    • ARM_MUSCA_B1_S
    • LPC55S69_NS
    • LPC55S69_S
    • HANI_IOT
    • NU_PFM_M2351_NS
    • NU_PFM_M2351_S

Migration actions required

Use Mbed 5.15 if you require PSA targets with exporter support, or one of the removed targets. LPC55S69 and Numaker M2351 will be supported in Mbed 6 at a later date, after the targets are supported by TF-M.

Documentation

New porting guide for PSA targets will be provided in a separate Mbed OS PR.


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[X] 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

@Devran01 @jainvikas8


@ciarmcom
Copy link
Member

@Patater, thank you for your changes.
@ashok-rao @maclobdell @jainvikas8 @Devran01 @ARMmbed/mbed-os-crypto @ARMmbed/mbed-os-tools @ARMmbed/mbed-os-hal @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-core @ARMmbed/mbed-os-test please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 1, 2020

Please review tools failures in Travis:

0.55s$ coverage run -a tools/project.py -S | sed -n '/^Total/p'
Traceback (most recent call last):
  File "tools/project.py", line 412, in <module>
    main()
  File "tools/project.py", line 356, in main
    print_large_string(mcu_ide_matrix())
  File "/home/travis/build/ARMmbed/mbed-os/tools/export/__init__.py", line 102, in mcu_ide_matrix
    if EXPORTERS[ide].is_target_supported(target):
  File "/home/travis/build/ARMmbed/mbed-os/tools/export/cces/__init__.py", line 56, in is_target_supported
    if not target.is_TFM_target:
  File "/home/travis/build/ARMmbed/mbed-os/tools/targets/__init__.py", line 354, in __getattr__
    result = self.__getattr_helper(attrname)
  File "/home/travis/build/ARMmbed/mbed-os/tools/targets/__init__.py", line 347, in __getattr_helper
    % (attrname, self.name))
AttributeError: Attribute 'is_TFM_target' not found in target 'ARCH_BLE'

@Patater
Copy link
Contributor Author

Patater commented Apr 1, 2020

  • Removed is_PSA_secure_target in commit "psa: Remove PSA secure binary building tools"
  • Added is_TFM_target in commit "psa: Remove exporters for TF-M targets"

@MarceloSalazar
Copy link

@Patater note we need to keep the NS targets as they're still valid and expect to be supported in Mbed 6. Possibly rename the targets assuming they don't break with mbed-ls and greentea tools

  • ARM_MUSCA_A1
  • ARM_MUSCA_B1
  • LPC55S69
  • HANI_IOT
  • NU_PFM_M2351

@@ -0,0 +1,16 @@
#! /usr/bin/env python
# Copyright (c) 2019 ARM Limited
Copy link
Contributor

Choose a reason for hiding this comment

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

The copyright year should be 2020.

0xc0170
0xc0170 previously approved these changes Apr 6, 2020
@mergify mergify bot added the needs: CI label Apr 6, 2020
@Patater
Copy link
Contributor Author

Patater commented Apr 27, 2020

First rebased on latest master, with no other changes.

Then, rebased again to edit the "psa: Remove v8-M S targets" commit to fix a path issue in cmsis_nvic.h where the relative path of region_defs.h changed, but incorrectly wasn't updated. The relative path is used as the cmsis_nvic.h is used by linker scripts, and the Mbed OS build tools don't do the same globbing with linker script include paths as it does with C source include paths.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 27, 2020

CI started

@mergify mergify bot added needs: work and removed needs: CI labels Apr 27, 2020
@mbed-ci
Copy link

mbed-ci commented Apr 27, 2020

Test run: FAILED

Summary: 2 of 3 test jobs failed
Build number : 4
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 28, 2020

Does this need CI update? It tries to build LPC55S69_NS and gets LPC55S69_NS is not a supported MCU an error.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 29, 2020

CI started with updated CI config

@mbed-ci
Copy link

mbed-ci commented Apr 29, 2020

Test run: FAILED

Summary: 2 of 3 test jobs failed
Build number : 5
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 29, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Apr 29, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 6
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 29, 2020

@Patater note we need to keep the NS targets as they're still valid and expect to be supported in Mbed 6. Possibly rename the targets assuming they don't break with mbed-ls and greentea tools

ARM_MUSCA_A1
ARM_MUSCA_B1
LPC55S69
HANI_IOT
NU_PFM_M2351

Has this been addressed ? We are removing these completely (_S and _NS), not keeping anything in the tree?

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 30, 2020

Got +1 from @andypowers, this is ready for integration

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.

None yet

6 participants