Skip to content

platform reset API rename #9997

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 1 commit into from
Mar 11, 2019
Merged

platform reset API rename #9997

merged 1 commit into from
Mar 11, 2019

Conversation

alzix
Copy link
Contributor

@alzix alzix commented Mar 7, 2019

Description

Renamed newly added psa_system_reset() API to mbed_system_reset()
We should not use PSA prefix for APIs not defined in PSA specs.

Must be merged after #9910

Targeting RC2

Pull request type

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

Reviewers

@mikisch81 @orenc17 @mmahadevan108

Release Notes

@ciarmcom
Copy link
Member

ciarmcom commented Mar 7, 2019

@alzix, thank you for your changes.
@mikisch81 @orenc17 @maclobdell @MarceloSalazar @ARMmbed/mbed-os-core @ARMmbed/mbed-os-storage @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-test @ARMmbed/mbed-os-tools please review.

@ghost ghost added the PM_ACCEPTED label Mar 7, 2019
@@ -63,9 +64,11 @@ psa_status_t mbed_psa_reboot_and_request_new_security_state(uint32_t new_state);


/** \brief Resets the system
*
*
* PSA targets do not allow NPS to access system power domain.
Copy link
Contributor

Choose a reason for hiding this comment

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

NPS ->NSPE

*
*
* PSA targets do not allow NPS to access system power domain.
* This API requests system reset to be caried out by SPE once all critical secure tasks are finished.
Copy link
Contributor

Choose a reason for hiding this comment

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

carried

Copy link
Contributor

@orenc17 orenc17 left a comment

Choose a reason for hiding this comment

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

please align with psa/errors.h

@alzix
Copy link
Contributor Author

alzix commented Mar 7, 2019

@orenc17, I agree that service should be revisited and adapted to use psa/errors.h. it was written before psa/errors.h was introduced. But as the errors are all internal (the API returns void or actually do not returns at all) it can be post 5.12

@alzix
Copy link
Contributor Author

alzix commented Mar 8, 2019

@orenc17 @mikisch81 please review latest changes.
updated error.h usage
fixed compilation warnings

@alzix
Copy link
Contributor Author

alzix commented Mar 8, 2019

rebased on top #9910

@alzix
Copy link
Contributor Author

alzix commented Mar 8, 2019

A bit context for this PR: this PR renames an API added couple of days ago. It was not part of any release yet and is not expected to effect any external developer.
This API used to implement NVIC Reset on ARMv8-M targets on nonsrcure side.
It is currently used only by NXP port, thus this PR should come after NXP PR is merged as it tweaks the NXP sources. For this very reason @mmahadevan108 is on the CC list

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 8, 2019

It is currently used only by NXP port, thus this PR should come after NXP PR is merged as it tweaks the NXP sources. For this very reason @mmahadevan108 is on the CC list

This needs rebase now, dependency was merged.

@alzix
Copy link
Contributor Author

alzix commented Mar 9, 2019

rebased and squashed

@alzix
Copy link
Contributor Author

alzix commented Mar 10, 2019

fixed astyle

@NirSonnenschein
Copy link
Contributor

starting CI

@mbed-ci
Copy link

mbed-ci commented Mar 10, 2019

Test run: SUCCESS

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

@alzix
Copy link
Contributor Author

alzix commented Mar 10, 2019

all green - can we merge it?
please note - if this PR merged before #9996, a minor change in #9996 will be required.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 10, 2019

please note - if this PR merged before #9996, a minor change in #9996 will be required.

It's merged, all good here?

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

why mbed_system_reset is not in platform, and accessible to all ? The name leads me to believe this is common API.

@orenc17
Copy link
Contributor

orenc17 commented Mar 10, 2019

@alzix please rebase and edit TESTS/psa/attestation/main.cpp accordingly

@alzix
Copy link
Contributor Author

alzix commented Mar 11, 2019

@0xc0170

why mbed_system_reset is not in platform, and accessible to all ? The name leads me to believe this is common AP

on ARMv8-M architecture system reset can only be performed from TZ. This API provides an entry point to TZ. We cannot move this API to platform as it is a PSA service and better reside with rest of PSA sources, for the sake of not adding further compilation tweaks

@alzix
Copy link
Contributor Author

alzix commented Mar 11, 2019

Rebased and fixed attestation test.

@NirSonnenschein, can we start CI? We need make sure it will be merged before 5.12 official?

@NirSonnenschein
Copy link
Contributor

CI started on latest fixes

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Line 57 - todo in lifecycle needs to be removed

I've checked lifecycle - 3 functions, 3 different prefixes

psa_...
mbed_psa...
mbed_...

does each one has special meaning ? why not all mbed_psa or just psa?

add noreturn attributes
update lifecycle service to use psa/error.h
fix doxygen
@alzix
Copy link
Contributor Author

alzix commented Mar 11, 2019

@0xc0170, solid points on the API names and doxygen

API names - psa_ prefix are for APIs defined in PSA specs. We need these APIs as is for compliance.
mbed_psa APIs are required but are not standardised ant left IMPDEF. We must not use psa_ prefix for these.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 11, 2019

Restarting CI (earlier run will be aborted)

@0xc0170 0xc0170 removed request for a team March 11, 2019 09:59
@mbed-ci
Copy link

mbed-ci commented Mar 11, 2019

Test run: FAILED

Summary: 2 of 13 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test
  • jenkins-ci/mbed-os-ci_exporter

@mbed-ci
Copy link

mbed-ci commented Mar 11, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 removed request for a team March 11, 2019 12:30
@0xc0170 0xc0170 merged commit 525d463 into ARMmbed:master Mar 11, 2019
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