-
Notifications
You must be signed in to change notification settings - Fork 3k
Default psa headers implementation #9661
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
Conversation
#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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not allowed? Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because you are not supposed to use psa/service/h in NSPE builds and non-PSA builds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call it not expected instead of not allowed. There are no rules about what symbols can be used where.
#define __MBED_OS_DEFAULT_PSA_CLIENT_API_H__ | ||
|
||
#if !defined(UINT32_MAX) | ||
#define UINT32_MAX ((uint32_t)-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we duplicating the header file?
Please consider moving spm_client.h and psa_defs.h to this folder instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spm_client.h and psa_defs.h contains more defines and definitions that are not relevant for non-PSA builds (example K64F)
this "default" implementation holds only what the spec requires.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see this default implementation gets removed from the original files. Thus it is a duplication.
Please keep in mind that our divergence from TF-M sources ( spec version) is temporal while single core API compliance is not. Eventually I would not want to duplicate the header files and would prefer adopting TF-M's version.
Please consider moving these files to a common place instead of simbols cherry picking.
@orenc17, thank you for your changes. |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
@orenc17 How to progress here? There are no approvals |
waiting to see if #9708 might fix this |
Integrating this into #9823 |
Description
On single core targets a default
psa/client.h
should be specifiedpsa/service.h
should only be included in secure buildsPull request type
Reviewers
@ARMmbed/mbed-os-psa