-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NXP] Fix key storage issues and add NVS wear stats support (#35511)
* [nxp][platform][common] Simplify factory reset procedure when KeyStorage is used Instead of resetting the KetStorage which, in turn, removes the key files one by one, just shut it down to trigger a FileCache flush and then simply format the file system partition. Signed-off-by: Marian Chereji <marian.chereji@nxp.com> (cherry picked from commit 9a2624656feff58849d89272e73559da19078849) * [nxp][platform][common] Update "NXPConfig.h" to allow building multiple key storage solutions The "NXPConfig.h" header was developed to support 2 key storage solutions so far, which were mostly selected using the CHIP_PLAT_NVM_SUPPORT build symbol. In order to be able to support additional key storage solutions (such as Zephyr NVS), which are no longer selected via the above mentioned build symbol, the header Signed-off-by: Marian Chereji <marian.chereji@nxp.com> (cherry picked from commit 7bace6914508ac98124836a1be3973818993dd58) * [nxp][common] Fix KeyStorage use of illegal buffer size when checking the existence of a key The "NXPConfig::ConfigValueExists" member function is using a non-zero buffer capacity combined with a NULL buffer pointer when calling the KeyStorage KS_GetKeyInt() function. This combination is illegal. When using a NULL buffer pointer, a capacity of zero is required to be provided. Signed-off-by: Marian Chereji <marian.chereji@nxp.com> (cherry picked from commit f8f03ef0041bc8b7729fe7959cf2244b6d65133e) * [nxp][platform][common] Add check for read_bytes_size read_bytes_size can be nullptr according to the KVS API. Add a nullptr check to account for use cases where the parameter is not used (implicitly set to nullptr). Signed-off-by: marius-alex-tache <marius.tache@nxp.com> * [nxp][platform][common] Add support for NVS key storage wear statistics Added the support to initialize and update key storage wear statistics. Signed-off-by: Marian Chereji <marian.chereji@nxp.com> Reviewed-by: Doru-Cristian Gucea <doru-cristian.gucea@nxp.com> Reviewed-by: Martin Girardot <martin.girardot@nxp.com> (cherry picked from commit d05884ddf8baac0da0a4d9d2a693280d2bdae86a) * [nxp][platform][common] Update platform names for w0/w1 Signed-off-by: marius-alex-tache <marius.tache@nxp.com> --------- Signed-off-by: marius-alex-tache <marius.tache@nxp.com> Co-authored-by: Marian Chereji <marian.chereji@nxp.com>
- Loading branch information
Showing
6 changed files
with
83 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters