Skip to content

kv_config: create an internal TDB to store DeviceKey Root of Trust #13986

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion storage/kvstore/kv_config/source/kv_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,14 @@ int _storage_config_TDB_EXTERNAL_NO_RBP()
#endif

#ifdef MBED_CONF_STORAGE_TDB_EXTERNAL_NO_RBP_EXTERNAL_BASE_ADDRESS
// Internal TDB of default/minimum size, for DeviceKey Root of Trust
int ret = _create_internal_tdb(&kvstore_config.internal_bd, &kvstore_config.internal_store,
0 /* use default size */, 0 /* use default start address */);
if (MBED_SUCCESS != ret) {
tr_error("KV Config: Fail to create internal TDBStore");
return ret;
}

bd_size_t size = MBED_CONF_STORAGE_TDB_EXTERNAL_NO_RBP_EXTERNAL_SIZE;
bd_addr_t address = MBED_CONF_STORAGE_TDB_EXTERNAL_NO_RBP_EXTERNAL_BASE_ADDRESS;

Expand Down Expand Up @@ -914,6 +922,14 @@ int _storage_config_FILESYSTEM_NO_RBP()
#endif

#ifdef MBED_CONF_STORAGE_FILESYSTEM_NO_RBP_EXTERNAL_BASE_ADDRESS
// Internal TDB of default/minimum size, for DeviceKey Root of Trust
int ret = _create_internal_tdb(&kvstore_config.internal_bd, &kvstore_config.internal_store,
0 /* use default size */, 0 /* use default start address */);
if (MBED_SUCCESS != ret) {
tr_error("KV Config: Fail to create internal TDBStore");
return ret;
}

filesystemstore_folder_path = STR(MBED_CONF_STORAGE_FILESYSTEM_NO_RBP_FOLDER_PATH);

bd_size_t size = MBED_CONF_STORAGE_FILESYSTEM_NO_RBP_EXTERNAL_SIZE;
Expand All @@ -927,7 +943,7 @@ int _storage_config_FILESYSTEM_NO_RBP()
return MBED_ERROR_FAILED_OPERATION ;
}

int ret = kvstore_config.external_bd->init();
ret = kvstore_config.external_bd->init();
if (MBED_SUCCESS != ret) {
tr_error("KV Config: Fail to init external BlockDevice ");
return MBED_ERROR_FAILED_OPERATION ;
Expand Down