-
Notifications
You must be signed in to change notification settings - Fork 178
Add PSA-SPM porting guide #811
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
CC @alzix |
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.
@danny4478, please note that linker scripts part will probably change, according to HAL integration review meeting minutes.
mailbox integration part is missing completely
This looks like great content. Could you please add a section about defined and undefined behavior if relevant? |
Also, please add a dependency section that lists any dependencies if relevant. |
CC @amiraloosh |
@alzix, you have mentioned mailbox integration is missing. This is all covered in the HAL which will eventually point to our Doxygen. |
consider yourself an integrator wishing to port mbed-os to your target. |
@alzix, please see what I have suggested. Is this ok by you? |
Adding OOB and HAL reviewers because this seems relevant to them |
b4907f9
to
b1b2157
Compare
@AnotherButler , Regarding your suggestion to add defined and undefined behavior sections, and section that lists any dependencies if relevant: |
ea6b36e
to
a9d4851
Compare
@AnotherButler , should we add somewhere a link or a reference to this Porting Guide? |
@danny4478 We encourage linking to other parts of the documentation over duplicating content, so I say yes. Also, we have this porting guide, which is still in editing but will go live by 5.11. |
@AnotherButler , we could not find the place to add a link/reference to our new Porting Guide. |
What's the status of the content reviews on this? Is it ready for docs review? |
The content is currently under modifications by @alzix
|
done modifying |
Make initial edits to file, mostly for active voice, branding and grammar.
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've left reminders to complete the todos. Otherwise, this looks good 👍
docs/porting/psa/spm.md
Outdated
|
||
#### Secure Processing Environment | ||
|
||
This part of HAL allows you to apply your specific memory protection scheme. You can find a list of [these functions]([TODO: WHEN READY, ADD LINK TO DOXYGEN FILES OF HAL FUNCTIONS]). |
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.
Please add this link.
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 can help find this link, but I'm not sure what you want to link to. Could you please elaborate?
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.
@AnotherButler This Doxygen was not generated yet (at least its final version). We are waiting for some PRs to be merged into mbed-os, then I will send you the information to generate the Doxygen with, and you can generate them and send me the link.
docs/porting/psa/spm.md
Outdated
|
||
**This page gives guidelines for silicon partners wishing to have Secure Partition Manager capabilities** | ||
|
||
### Memory layout |
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.
@alzix:
Since silicon partners have to add a new target to targets.json, I think the section headline should be called targets.json editing (or something lie that).
In this section we will describe the targets.json required modification.
Memory addresses and sizes (the "overrides" part) are a part of this, and memory layout explanation can be a sub-section here.
Except for "overrides" and the "inherits" parts (which you have mentioned) we should mention:
- "extra_labels_add" part
- "components_add" part (mailbox)
- "deliver_to_target"
What do you think?
This PR is waiting on engineering approval, a link to some HAL Doxygen and two code dependencies. |
Depends on ARMmbed/mbed-os#8745 and ARMmbed/mbed-os#8744 |
- New section: New target configuration - Memory layout section moved to be a sub-section under New target configuration
b29c01f
to
3a82ffe
Compare
For PSA support, specific PSA related fields should be defined for this target: | ||
|
||
1. Secure target must inherit from `SPE_Target` meta-target. | ||
2. Nonsecure target must inherit from `NSPE_Target`. |
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.
@AnotherButler what is the right way of writing, nonsecure
or non-secure
?
If it is a single word we probably need to change our configuration symbols.
In PSA FF specs the dash version (non-secure
) is used.
Fixing CR comments
a64d535
to
7b1a526
Compare
@AnotherButler The document is ready for final mbed-docs team review.
TODO: Doxygen link - Currently pending on PSA core team to send the sources fro the Doxygen. |
@danny4478 Great questions. Please see my answers below:
|
Replacing non-secure with nonsecure
@alzix Can you please see if you have any other comments and approve if everything is ok by you? Current status:
|
|
||
Typically, shared memory is located adjacent (before or after) to the nonsecure RAM, for saving MPU regions. The shared memory region is nonsecure memory that both cores use. | ||
|
||
#### Linker script example for GCC_ARM compiler |
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.
You may want to link to the bootstrap page with linker script templates since it contains a lot of this content:
https://github.com/ARMmbed/mbed-os-5-docs/blob/development/docs/porting/target/bootstrap.md
This is concerning. The doc is including references to the target FUTURE_SEQUANA but the target support has been scheduled for 5.11.1 - ARMmbed/mbed-os#8745 |
This is only an example demonstrating how the structure should look like, and which fields have to be there. The target name, and the regions' values do not have to be real, so I am fine with it as it is now. |
Sorry, I'm not fine with this, as it's misleading. |
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 don't think we're ready to merge this until we have a FUTURE_SEQUANA platform available with Mbed OS that works with PSA
What's the result of the above conversation? Are we waiting until a future patch release to include documentation for this feature because an example references a target we don't support? Can we remove the example and move forward with this documentation? |
Depends on ARMmbed/mbed-os#8873 |
Add missing link.
Make final edits, mostly for active voice.
Merging because code has merged. |
The document is currently Work In Progress but its structure and most of its contents is here.
It is loaded as a PR so it can be reviewed by tech-writers.
Current gaps: