-
Notifications
You must be signed in to change notification settings - Fork 28
Access control to the SPI core #256
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
base: main
Are you sure you want to change the base?
Conversation
15cabf9
to
148a8f0
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Superseeds #243 |
I have now tried to verify the access control. I'm using a custom firmware which has both the spi and flash lib from my earlier test program. I'm then using the app in the repo The output from the call to fw yields: All in all, it seems to work well. What have I missed? |
I have now tested additionally three scenarios:
All seems fine. |
Okay, I have a few questions. I have tested the functionality and it seems sound from the current standpoint, I can access the SPI from FW, and from the trampoline in an app - otherwise I cannot access SPI. This is the description of the current logic
From this, it sounds like you only can reach the SPI core if you use the _SPI_CMD tampoline. Is that right? From other discussions we want to offer a few syscalls, these will not be directly to the SPI core, but instead to some fw function performing some calculations, and then that fw function will call the SPI core. But that fw function might want to use other functions than what is set to the _SPI_CMD trampoline. Would that be possible? All in all, this seems to work - the questions is if it fulfills the needs we have with persistent storage. |
148a8f0
to
f5f57ff
Compare
Access logic looks at instruction execution from a defined trampoline address to enable stateful SPI access. The access is disabled as soon as an instruction is executed from any address in RAM. Signed-off-by: Joachim Strömbergson <joachim@assured.se>
Add testcase that checks that access control is enabled and disabled as expected. Signed-off-by: Joachim Strömbergson <joachim@assured.se>
Signed-off-by: Joachim Strömbergson <joachim@assured.se>
f5f57ff
to
90c94ce
Compare
Description
Access control to only allow the SPI to be operated from fw.
Fixes #234
Type of change
Please tick any that are relevant to this PR and remove any that aren't.
Submission checklist