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

mbed-SPM updates #9823

Merged
merged 24 commits into from Mar 3, 2019

Conversation

Projects
None yet
10 participants
@orenc17
Copy link
Contributor

commented Feb 24, 2019

Description

  • psa_wait_any() & psa_wait_interrupt() replaced with psa_wait()
  • psa_identity() is replaced with client_id in psa_msg_t
  • Prepare SPM tests to work with TFM
  • Fix print warnings
  • Update secure binaries for FUTURE_SEQUANA_PSA

needs to come in after #9666
This PR is required for #9908 & #9910

Reviewed internally kfnta#91

Pull request type

[ ] Fix
[X] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@ARMmbed/mbed-os-psa

Release Notes

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Feb 24, 2019

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

@ciarmcom ciarmcom requested review from ARMmbed/mbed-os-maintainers Feb 24, 2019

@mbed-ci

This comment has been minimized.

Copy link

commented Feb 24, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@NirSonnenschein

This comment has been minimized.

Copy link
Contributor

commented Feb 24, 2019

CI statred

@orenc17 orenc17 force-pushed the kfnta:wait_and_identity branch from 25d2324 to 3d83f3e Feb 25, 2019

@mikisch81

This comment has been minimized.

Copy link
Contributor

commented Feb 25, 2019

Last 3 commits were to align the PSA SPM tests to TF-M.

Tested on Musca target.

@mikisch81 mikisch81 referenced this pull request Feb 25, 2019

Merged

Add ARM_MUSCA_A1 target #9221

@alzix

This comment has been minimized.

Copy link
Contributor

commented Feb 25, 2019

Todo list:
[x] psa_get return value must be handled
[ ] PSA header files - single version only. Use TF-M headers.
[x] Generated headers - verify file names and all the macros are actually "standard"
[ ] Error handling. SPM_PANIC macro must not be used from services and replaced by calls to abort()
[ ] Handle abort() calls - make sure to consult with core team

@0xc0170

This comment has been minimized.

Copy link
Member

commented Feb 25, 2019

@alzix Just to make sure, this todo list completion is blocking this PR?

@@ -438,7 +438,9 @@ utest::v1::status_t case_teardown_handler(const Case *const source, const size_t

utest::v1::status_t test_setup(const size_t number_of_cases)
{
#ifndef NO_GREENTEA

This comment has been minimized.

Copy link
@0xc0170

0xc0170 Feb 26, 2019

Member

This is dependency, there's another PR adding this to test framework?

This comment has been minimized.

Copy link
@mikisch81

mikisch81 Feb 27, 2019

Contributor

Then should we drop this commit?

@mikisch81 mikisch81 force-pushed the kfnta:wait_and_identity branch from be80a60 to f5d36d8 Feb 27, 2019

@mikisch81

This comment has been minimized.

Copy link
Contributor

commented Feb 27, 2019

Rebased this PR after all the merge-fest that was done..

usb/mbed_lib.json Outdated
@@ -0,0 +1,3 @@
{
"name": "usb"

This comment has been minimized.

Copy link
@alzix

alzix Feb 27, 2019

Contributor

???

This comment has been minimized.

Copy link
@mikisch81

mikisch81 Feb 27, 2019

Contributor

It is from #9874

Show resolved Hide resolved components/TARGET_PSA/inc/psa/service.h Outdated
#include "TARGET_MBED_SPM/psa_defs.h"
#include "TARGET_MBED_SPM/COMPONENT_SPE/spm_server.h"
#include "TARGET_MBED_SPM/COMPONENT_SPE/spm_panic.h"
#else
#error "Compiling psa service header on non-secure target is not allowed"

This comment has been minimized.

Copy link
@alzix

alzix Feb 27, 2019

Contributor

note that the error is misleading.
TARGET_MBED_SPM is applied to both secure and nonsecure targets

This comment has been minimized.

Copy link
@mikisch81

mikisch81 Feb 27, 2019

Contributor

Maybe #error "Compiling psa service header on a PSA emulated target is not allowed"

This comment has been minimized.

Copy link
@alzix

alzix Feb 27, 2019

Contributor

i would phrase it as "expected"

@0xc0170 0xc0170 added needs: work and removed needs: review labels Feb 27, 2019

@orenc17 orenc17 force-pushed the kfnta:wait_and_identity branch Feb 27, 2019

@mikisch81

This comment has been minimized.

Copy link
Contributor

commented Feb 27, 2019

@alzix @orenc17 Pushed generation of 'psa_manifest/sid.h' from the tfm generate script.
Did not test it yet.

@orenc17 orenc17 force-pushed the kfnta:wait_and_identity branch to 58417b2 Feb 27, 2019

@mikisch81

This comment has been minimized.

Copy link
Contributor

commented Feb 27, 2019

@alzix @orenc17 Now the generation of sid.h is in.

@0xc0170 0xc0170 added risk: R and removed risk: A labels Feb 28, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Feb 28, 2019

@orenc17 What is still to do here?

@mikisch81

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2019

@alzix need to review again

@orenc17 orenc17 force-pushed the kfnta:wait_and_identity branch 2 times, most recently Mar 3, 2019

Fixes
* Add #include <stddef.h> to psa/client.h
* Add Attestation service to TFM
* Update FUTURE_SEQUANA_PSA secure binaries
* Remove MBED_SPM from K64F
* Refactor psa_manifest/sid.h
* Increase stackl size in spm-client tests
* Add handling of errors from psa_get in partitions

@orenc17 orenc17 force-pushed the kfnta:wait_and_identity branch to cfb60ec Mar 3, 2019

@NirSonnenschein

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2019

started CI

@mbed-ci

This comment has been minimized.

Copy link

commented Mar 3, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 3
Build artifacts

@NirSonnenschein

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2019

Note: PR doesn't need to come in after #9312 anymore and CI has passed. @0xc0170 @cmonr any objections to bringing this in?

@0xc0170

0xc0170 approved these changes Mar 3, 2019

Copy link
Member

left a comment

2 notes:

  • commits are very brief , it would be better to provide more details in some. For big PR's like this (101 files in 24 commits, more description needed. These are not small fixes). For instance "Update psa_wait() and client_id" why are we updating it and how? We need to get much better in describing changes. Please spend few minutes to provide details.
  • all new files should have SPDX identifier (should be fixed via new PR)

@0xc0170 0xc0170 merged commit b2fb3d7 into ARMmbed:master Mar 3, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9138 cycles (-481 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Mar 3, 2019

@orenc17

This comment has been minimized.

Copy link
Contributor Author

commented Mar 3, 2019

@0xc0170 all the new files in this PR have SPDX identifier:
tools/psa/tfm/templates/sid.h.tpl
components/TARGET_PSA/inc/psa_manifest/sid.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.