-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Implementation of COMPONENT_SECUREF with JEDEC TG424_3 for secure flash block device driver #15436
base: master
Are you sure you want to change the base?
Conversation
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.
There's lot of changes, some should be separated (own commit or even separate pull request). Please review
@@ -4,7 +4,7 @@ | |||
"present": 1, | |||
"main-thread-stack-size": { | |||
"help": "The size of the main thread's stack", | |||
"value": 4096 |
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.
This should be separate commit but the main thread should be changed in the application, this would not fit smaller devices.
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.
Got it, I will move to the appropriate place.
PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_CURRENT_SOURCE_DIR}/include | ||
) |
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.
can you add a new line at the end of the file, following our guidelines
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 will make the correction, thanks.
|
||
int32_t spi_nor_read(uint8_t *buffer, uint32_t addr, uint32_t size) | ||
{ | ||
//TODO |
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 there's lot of TODO in this file?
@@ -139,6 +139,27 @@ class BlockDevice { | |||
return 0; | |||
} | |||
|
|||
virtual int secure_read(void *buffer, mbed::bd_addr_t addr, mbed::bd_size_t size, int app_id) |
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.
this should be separate commit (adding new functionality).
Why it is required?
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.
These functions are related to the Read/Program/Erase operations used by Secure Flash. The "app_id" parameter is intended to restrict the related application to only operate within a specific zone in Secure Flash.
Summary of changes
Add Secure Flash block device driver in COMPONENT_SECUREF
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
This driver is tested on STM32 NUCLEO-L4R5ZI-P with Mxcronix ArmorFlash MX78U64A00F
Since COMPONENT_SECUREF does not yet support test_multi_thread, test_program_read_small_data_sizes, and test_unaligned_erase_blocks, so they will be ignored in the following tests.
Reviewers