SST: Use asset ID instead of handle in all APIs
This patch updates the SST interfaces to:
- use asset ID instead of asset handle as the object is always
close at the end of each request
- change the asset ID type from uint16_t to uint32_t to allow
longer asset IDs which can contain vendor specific ID codes
- remove tfm_sst_get_handle API
- updates all files which depend on these APIs and
their documentation
Change-Id: I4a844e548cc7cdfe2277b007717003a0263e45d1
Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
diff --git a/interface/include/tfm_ns_svc.h b/interface/include/tfm_ns_svc.h
index b283dc6..a88df66 100644
--- a/interface/include/tfm_ns_svc.h
+++ b/interface/include/tfm_ns_svc.h
@@ -41,7 +41,6 @@
*
*/
#define LIST_SVC_DISPATCHERS \
- X(SVC_TFM_SST_GET_HANDLE, tfm_sst_svc_get_handle) \
X(SVC_TFM_SST_CREATE, tfm_sst_svc_create) \
X(SVC_TFM_SST_GET_INFO, tfm_sst_svc_get_info) \
X(SVC_TFM_SST_GET_ATTRIBUTES, tfm_sst_svc_get_attributes) \
diff --git a/interface/include/tfm_sst_api.h b/interface/include/tfm_sst_api.h
index 1ce8261..8447bd4 100644
--- a/interface/include/tfm_sst_api.h
+++ b/interface/include/tfm_sst_api.h
@@ -15,21 +15,7 @@
#include "tfm_sst_defs.h"
/**
- * \brief Gets handler for the given asset UUID. If an asset is deleted, the
- * linked asset handle reference is no longer valid and will give
- * TFM_SST_ERR_ASSET_REF_INVALID if used.
- *
- * \param[in] asset_uuid Asset UUID
- * \param[out] hdl Pointer to store the asset's handler
- *
- * \return Returns TFM_SST_ERR_SUCCESS if asset is found. Otherwise, error code
- * as specified in \ref tfm_sst_err_t
- */
-enum tfm_sst_err_t tfm_sst_get_handle(uint16_t asset_uuid,
- uint32_t* hdl);
-
-/**
- * \brief Allocates space for the asset, referenced by asset handler,
+ * \brief Allocates space for the asset, referenced by asset UUID,
* without setting any data in the asset.
*
* \param[in] asset_uuid Asset UUID
@@ -37,77 +23,77 @@
* \return Returns an TFM_SST_ERR_SUCCESS if asset is created correctly.
* Otherwise, error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_create(uint16_t asset_uuid);
+enum tfm_sst_err_t tfm_sst_create(uint32_t asset_uuid);
/**
- * \brief Gets asset's information referenced by asset handler.
+ * \brief Gets asset's information referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[out] info Pointer to store the asset's information
- * \ref tfm_sst_asset_info_t
+ * \param[in] asset_uuid Asset UUID
+ * \param[out] info Pointer to store the asset's information
+ * \ref tfm_sst_asset_info_t
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_get_info(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_get_info(uint32_t asset_uuid,
struct tfm_sst_asset_info_t *info);
/**
- * \brief Gets asset's attributes referenced by asset handler.
+ * \brief Gets asset's attributes referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[out] attrs Pointer to store the asset's attributes
- * \ref tfm_sst_asset_attrs_t
- *
+ * \param[in] asset_uuid Asset UUID
+ * \param[out] attrs Pointer to store the asset's attributes
+ * \ref tfm_sst_asset_attrs_t
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_get_attributes(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_get_attributes(uint32_t asset_uuid,
struct tfm_sst_asset_attrs_t *attrs);
/**
- * \brief Sets asset's attributes referenced by asset handler.
+ * \brief Sets asset's attributes referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[in] attrs Pointer to new the asset's attributes
- * \ref tfm_sst_asset_attrs_t
+ * \param[in] asset_uuid Asset UUID
+ * \param[in] attrs Pointer to new the asset's attributes
+ * \ref tfm_sst_asset_attrs_t
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_set_attributes(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_set_attributes(
+ uint32_t asset_uuid,
const struct tfm_sst_asset_attrs_t *attrs);
/**
- * \brief Reads asset's data from asset referenced by asset handler.
+ * \brief Reads asset's data from asset referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[out] data Pointer to data vector \ref tfm_sst_buf_t to store
- * data, size and offset
+ * \param[in] asset_uuid Asset UUID
+ * \param[out] data Pointer to data vector \ref tfm_sst_buf_t to store
+ * data, size and offset
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_read(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_read(uint32_t asset_uuid,
struct tfm_sst_buf_t* data);
/**
- * \brief Writes data into an asset referenced by asset handler.
+ * \brief Writes data into an asset referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[in] data Pointer to data vector \ref tfm_sst_buf_t which
- * contains the data to write
+ * \param[in] asset_uuid Asset UUID
+ * \param[in] data Pointer to data vector \ref tfm_sst_buf_t which
+ * contains the data to write
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_write(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_write(uint32_t asset_uuid,
struct tfm_sst_buf_t* data);
/**
- * \brief Deletes the asset referenced by the asset handler.
+ * \brief Deletes the asset referenced by the asset UUID.
*
- * \param[in] asset_handle Asset handler
+ * \param[in] asset_uuid Asset UUID
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_delete(uint32_t asset_handle);
+enum tfm_sst_err_t tfm_sst_delete(uint32_t asset_uuid);
#ifdef __cplusplus
}
diff --git a/interface/include/tfm_sst_defs.h b/interface/include/tfm_sst_defs.h
index 1fac2ad..52e41b3 100644
--- a/interface/include/tfm_sst_defs.h
+++ b/interface/include/tfm_sst_defs.h
@@ -47,7 +47,6 @@
TFM_SST_ERR_ASSET_NOT_PREPARED = TFM_SST_ERR_OFFSET,
TFM_SST_ERR_ASSET_NOT_FOUND,
TFM_SST_ERR_PARAM_ERROR,
- TFM_SST_ERR_INVALID_HANDLE,
TFM_SST_ERR_STORAGE_SYSTEM_FULL,
TFM_SST_ERR_SYSTEM_ERROR,
/* Following entry is only to ensure the error code of int size */
diff --git a/interface/include/tfm_sst_svc_handler.h b/interface/include/tfm_sst_svc_handler.h
index 18e06d3..a43e545 100644
--- a/interface/include/tfm_sst_svc_handler.h
+++ b/interface/include/tfm_sst_svc_handler.h
@@ -15,103 +15,83 @@
#include "tfm_sst_defs.h"
/**
- * \brief SVC funtion to get handler for the given asset UUID. If an asset is
- * deleted, the linked asset handle reference is no longer valid and
- * will give TFM_SST_ERR_ASSET_REF_INVALID if used.
- *
- * \param[in] asset_uuid Asset UUID
- * \param[out] hdl Pointer to store the asset's handler
- *
- * \return Returns TFM_SST_ERR_SUCCESS if asset is found. Otherwise, error code
- * as specified in \ref tfm_sst_err_t
- */
-enum tfm_sst_err_t tfm_sst_svc_get_handle(uint16_t asset_uuid,
- uint32_t* hdl);
-
-/**
* \brief SVC funtion to allocate space for the asset, referenced by asset
- * handler, without setting any data in the asset.
+ * UUID, without setting any data in the asset.
*
* \param[in] asset_uuid Asset UUID
*
* \return Returns an TFM_SST_ERR_SUCCESS if asset is created correctly.
* Otherwise, error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_svc_create(uint16_t asset_uuid);
+enum tfm_sst_err_t tfm_sst_svc_create(uint32_t asset_uuid);
/**
- * \brief SVC funtion to get asset's information referenced by asset handler.
+ * \brief SVC funtion to get asset's information referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[out] info Pointer to store the asset's information
- * \ref tfm_sst_asset_info_t
+ * \param[in] asset_uuid Asset UUID
+ * \param[out] info Pointer to store the asset's information
+ * \ref tfm_sst_asset_info_t
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_svc_get_info(uint32_t asset_handle,
- struct tfm_sst_asset_info_t *info);
-
+enum tfm_sst_err_t tfm_sst_svc_get_info(uint32_t asset_uuid,
+ struct tfm_sst_asset_info_t *info);
/**
- * \brief SVC funtion to get asset's attributes referenced by asset
- * handler.
+ * \brief SVC funtion to get asset's attributes referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[out] attrs Pointer to store the asset's attributes
- * \ref tfm_sst_asset_attrs_t
+ * \param[in] asset_uuid Asset UUID
+ * \param[out] attrs Pointer to store the asset's attributes
+ * \ref tfm_sst_asset_attrs_t
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_svc_get_attributes(
- uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_svc_get_attributes(uint32_t asset_uuid,
struct tfm_sst_asset_attrs_t *attrs);
/**
- * \brief SVC funtion to set asset's attributes referenced by asset
- * handler.
+ * \brief SVC funtion to set asset's attributes referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[in] attrs Pointer to new the asset's attributes
- * \ref tfm_sst_asset_attrs_t
+ * \param[in] asset_uuid Asset UUID
+ * \param[in] attrs Pointer to new the asset's attributes
+ * \ref tfm_sst_asset_attrs_t
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_svc_set_attributes(
- uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_svc_set_attributes(uint32_t asset_uuid,
const struct tfm_sst_asset_attrs_t *attrs);
/**
- * \brief SVC funtion to read asset's data from asset referenced by asset
- * handler.
+ * \brief SVC funtion to read asset's data from asset referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[out] data Pointer to data vector \ref tfm_sst_buf_t to store
- * data, size and offset
+ * \param[in] asset_uuid Asset UUID
+ * \param[out] data Pointer to data vector \ref tfm_sst_buf_t to store
+ * data, size and offset
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_svc_read(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_svc_read(uint32_t asset_uuid,
struct tfm_sst_buf_t* data);
/**
- * \brief SVC funtion to write data into an asset referenced by asset handler.
+ * \brief SVC funtion to write data into an asset referenced by asset UUID.
*
- * \param[in] asset_handle Asset handler
- * \param[in] data Pointer to data vector \ref tfm_sst_buf_t which
- * contains the data to write
+ * \param[in] asset_uuid Asset UUID
+ * \param[in] data Pointer to data vector \ref tfm_sst_buf_t which
+ * contains the data to write
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_svc_write(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_svc_write(uint32_t asset_uuid,
struct tfm_sst_buf_t* data);
/**
- * \brief SVC funtion to delete the asset referenced by the asset handler.
+ * \brief SVC funtion to delete the asset referenced by the asset UUID.
*
- * \param[in] asset_handle Asset handler
+ * \param[in] asset_uuid Asset UUID
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_svc_delete(uint32_t asset_handle);
+enum tfm_sst_err_t tfm_sst_svc_delete(uint32_t asset_uuid);
#ifdef __cplusplus
}
diff --git a/interface/include/tfm_sst_veneers.h b/interface/include/tfm_sst_veneers.h
index 108ea97..033f1cb 100644
--- a/interface/include/tfm_sst_veneers.h
+++ b/interface/include/tfm_sst_veneers.h
@@ -15,118 +15,101 @@
#include "tfm_sst_defs.h"
/**
- * \brief Gets handler for the given asset uuid. If an asset is deleted, the
- * linked asset handle reference is no longer valid and will give
- * TFM_SST_ERR_ASSET_REF_INVALID if used.
- *
- * \param[in] app_id Application ID
- * \param[in] asset_uuid Asset UUID
- * \param[out] hdl Handle to be returned
- *
- * \return Returns asset handle. If asset is not found, it returns
- * TFM_SST_ERR_ASSET_NOT_FOUND. If SST area is not prepared, it returns
- * TFM_SST_ERR_ASSET_NOT_PREPARED.
- */
-enum tfm_sst_err_t tfm_sst_veneer_get_handle(uint32_t app_id,
- uint16_t asset_uuid,
- uint32_t *hdl);
-/**
- * \brief Allocates space for the asset, referenced by asset handler,
+ * \brief Allocates space for the asset, referenced by asset UUID,
* without setting any data in the asset.
*
* \param[in] app_id Application ID
* \param[in] asset_uuid Asset UUID
*
- * \return Returns an asset handle. If SST area is not prepared, it returns
+ * \return Returns TFM_SST_ERR_SUCCESS if the asset has been created correctly.
+ * If SST area is not prepared, it returns
* TFM_SST_ERR_ASSET_NOT_PREPARED. If SST area is full, it returns
* TFM_SST_ERR_STORAGE_SYSTEM_FULL. If application id doesn't have the
* write rights, it returns TFM_SST_ERR_PERMS_NOT_ALLOWED.
*/
-enum tfm_sst_err_t tfm_sst_veneer_create(uint32_t app_id, uint16_t asset_uuid);
+enum tfm_sst_err_t tfm_sst_veneer_create(uint32_t app_id, uint32_t asset_uuid);
/**
- * \brief Gets asset's information referenced by asset handler.
+ * \brief Gets asset's information referenced by asset UUID.
*
- * \param[in] app_id Application ID
- * \param[in] asset_handle Asset handler
- * \param[out] info Pointer to store the asset's information
- * \ref tfm_sst_asset_info_t
+ * \param[in] app_id Application ID
+ * \param[in] asset_uuid Asset UUID
+ * \param[out] info Pointer to store the asset's information
+ * \ref tfm_sst_asset_info_t
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_veneer_get_info(uint32_t app_id,
- uint32_t asset_handle,
- struct tfm_sst_asset_info_t *info);
+enum tfm_sst_err_t tfm_sst_veneer_get_info(uint32_t app_id, uint32_t asset_uuid,
+ struct tfm_sst_asset_info_t *info);
/**
- * \brief Gets asset's attributes referenced by asset handler.
+ * \brief Gets asset's attributes referenced by asset UUID.
*
- * \param[in] app_id Application ID
- * \param[in] asset_handle Asset handler
- * \param[out] attrs Pointer to store the asset's attributes
+ * \param[in] app_id Application ID
+ * \param[in] asset_uuid Asset UUID
+ * \param[out] attrs Pointer to store the asset's attributes
+ * \ref tfm_sst_asset_attrs_t
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_veneer_get_attributes(
- uint32_t app_id,
- uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_veneer_get_attributes(uint32_t app_id,
+ uint32_t asset_uuid,
struct tfm_sst_asset_attrs_t *attrs);
/**
- * \brief Sets asset's attributes referenced by asset handler.
+ * \brief Sets asset's attributes referenced by asset UUID.
*
- * \param[in] app_id Application ID
- * \param[in] asset_handle Asset handler
- * \param[in] attrs Pointer to new the asset's attributes
- * \ref tfm_sst_asset_attrs_t
+ * \param[in] app_id Application ID
+ * \param[in] asset_uuid Asset UUID
+ * \param[in] attrs Pointer to new the asset's attributes
+ * \ref tfm_sst_asset_attrs_t
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_veneer_set_attributes(
- uint32_t app_id,
- uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_veneer_set_attributes(uint32_t app_id,
+ uint32_t asset_uuid,
const struct tfm_sst_asset_attrs_t *attrs);
/**
- * \brief Reads asset's data from asset referenced by asset handler.
+ * \brief Reads asset's data from asset referenced by asset UUID.
*
- * \param[in] app_id Application ID
- * \param[in] asset_handle Asset handler
- * \param[in/out] data Pointer to data vector \ref tfm_sst_buf_t to
- * store data, size and offset
+ * \param[in] app_id Application ID
+ * \param[in] asset_uuid Asset UUID
+ * \param[in/out] data Pointer to data vector \ref tfm_sst_buf_t to
+ * store data, size and offset
*
* \return Returns the number of bytes written or a castable \ref tfm_sst_err_t
* value
*/
enum tfm_sst_err_t tfm_sst_veneer_read(uint32_t app_id,
- uint32_t asset_handle,
+ uint32_t asset_uuid,
struct tfm_sst_buf_t *data);
/**
- * \brief Writes data into an asset referenced by asset handler.
+ * \brief Writes data into an asset referenced by asset UUID.
*
- * \param[in] app_id Application ID
- * \param[in] asset_handle Asset handler
- * \param[in] data Pointer to data vector \ref tfm_sst_buf_t which
- * contains the data to write
+ * \param[in] app_id Application ID
+ * \param[in] asset_uuid Asset UUID
+ * \param[in] data Pointer to data vector \ref tfm_sst_buf_t which
+ * contains the data to write
*
* \return Returns the number of bytes written or a castable \ref tfm_sst_err_t
* value
*/
enum tfm_sst_err_t tfm_sst_veneer_write(uint32_t app_id,
- uint32_t asset_handle,
+ uint32_t asset_uuid,
struct tfm_sst_buf_t *data);
/**
- * \brief Deletes the asset referenced by the asset handler.
+ * \brief Deletes the asset referenced by the asset UUID.
*
- * \param[in] app_id Application ID
- * \param[in] asset_handle Asset handler
+ * \param[in] app_id Application ID
+ * \param[in] asset_uuid Asset UUID
*
* \return Returns TFM_SST_ERR_PERMS_NOT_ALLOWED if the asset can't be deleted
* to by this app ID. Returns TFM_SST_ERR_ASSET_REF_INVALID, if asset
* no longer exists. Otherwise, TFM_SST_ERR_SUCCESS.
*/
-enum tfm_sst_err_t tfm_sst_veneer_delete(uint32_t app_id,
- uint32_t asset_handle);
+enum tfm_sst_err_t tfm_sst_veneer_delete(uint32_t app_id, uint32_t asset_uuid);
+
#ifdef __cplusplus
}
#endif
diff --git a/interface/src/tfm_sst_api.c b/interface/src/tfm_sst_api.c
index 1b9a8f2..d363c0a 100644
--- a/interface/src/tfm_sst_api.c
+++ b/interface/src/tfm_sst_api.c
@@ -8,77 +8,69 @@
#include "tfm_sst_defs.h"
#include "tfm_ns_lock.h"
-enum tfm_sst_err_t tfm_sst_get_handle(uint16_t asset_uuid, uint32_t* hdl)
-{
- return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_GET_HANDLE,
- (uint32_t)asset_uuid,
- (uint32_t)hdl,
- 0,
- 0);
-}
-
-enum tfm_sst_err_t tfm_sst_create(uint16_t asset_uuid)
+enum tfm_sst_err_t tfm_sst_create(uint32_t asset_uuid)
{
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_CREATE,
- (uint32_t) asset_uuid,
+ asset_uuid,
0,
0,
0);
}
-enum tfm_sst_err_t tfm_sst_get_info(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_get_info(uint32_t asset_uuid,
struct tfm_sst_asset_info_t *info)
{
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_GET_INFO,
- asset_handle,
+ asset_uuid,
(uint32_t)info,
0,
0);
}
-enum tfm_sst_err_t tfm_sst_get_attributes(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_get_attributes(uint32_t asset_uuid,
struct tfm_sst_asset_attrs_t *attrs)
{
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_GET_ATTRIBUTES,
- asset_handle,
+ asset_uuid,
(uint32_t)attrs,
0,
0);
}
-enum tfm_sst_err_t tfm_sst_set_attributes(
- uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_set_attributes(uint32_t asset_uuid,
const struct tfm_sst_asset_attrs_t *attrs)
{
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_SET_ATTRIBUTES,
- asset_handle,
+ asset_uuid,
(uint32_t)attrs,
0,
0);
}
-enum tfm_sst_err_t tfm_sst_read(uint32_t asset_handle, struct tfm_sst_buf_t* data)
+enum tfm_sst_err_t tfm_sst_read(uint32_t asset_uuid,
+ struct tfm_sst_buf_t* data)
{
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_READ,
- (uint32_t)asset_handle,
+ asset_uuid,
(uint32_t)data,
0,
0);
}
-enum tfm_sst_err_t tfm_sst_write(uint32_t asset_handle, struct tfm_sst_buf_t* data)
+enum tfm_sst_err_t tfm_sst_write(uint32_t asset_uuid,
+ struct tfm_sst_buf_t* data)
{
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_WRITE,
- (uint32_t)asset_handle,
+ asset_uuid,
(uint32_t)data,
0,
0);
}
-enum tfm_sst_err_t tfm_sst_delete(uint32_t asset_handle)
+enum tfm_sst_err_t tfm_sst_delete(uint32_t asset_uuid)
{
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_DELETE,
- (uint32_t)asset_handle,
+ asset_uuid,
0,
0,
0);
diff --git a/interface/src/tfm_sst_svc_handler.c b/interface/src/tfm_sst_svc_handler.c
index 76c5c96..beab20d 100644
--- a/interface/src/tfm_sst_svc_handler.c
+++ b/interface/src/tfm_sst_svc_handler.c
@@ -11,17 +11,7 @@
#include "tfm_id_mngr.h"
/* SVC function implementations */
-enum tfm_sst_err_t tfm_sst_svc_get_handle(uint16_t asset_uuid,
- uint32_t* hdl)
-{
- uint32_t app_id;
-
- app_id = tfm_sst_get_cur_id();
-
- return tfm_sst_veneer_get_handle(app_id, asset_uuid, hdl);
-}
-
-enum tfm_sst_err_t tfm_sst_svc_create(uint16_t asset_uuid)
+enum tfm_sst_err_t tfm_sst_svc_create(uint32_t asset_uuid)
{
uint32_t app_id;
@@ -30,63 +20,61 @@
return tfm_sst_veneer_create(app_id, asset_uuid);
}
-enum tfm_sst_err_t tfm_sst_svc_get_info(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_svc_get_info(uint32_t asset_uuid,
struct tfm_sst_asset_info_t *info)
{
uint32_t app_id;
app_id = tfm_sst_get_cur_id();
- return tfm_sst_veneer_get_info(app_id, asset_handle, info);
+ return tfm_sst_veneer_get_info(app_id, asset_uuid, info);
}
-enum tfm_sst_err_t tfm_sst_svc_get_attributes(
- uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_svc_get_attributes(uint32_t asset_uuid,
struct tfm_sst_asset_attrs_t *attrs)
{
uint32_t app_id;
app_id = tfm_sst_get_cur_id();
- return tfm_sst_veneer_get_attributes(app_id, asset_handle, attrs);
+ return tfm_sst_veneer_get_attributes(app_id, asset_uuid, attrs);
}
-enum tfm_sst_err_t tfm_sst_svc_set_attributes(
- uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_svc_set_attributes(uint32_t asset_uuid,
const struct tfm_sst_asset_attrs_t *attrs)
{
uint32_t app_id;
app_id = tfm_sst_get_cur_id();
- return tfm_sst_veneer_set_attributes(app_id, asset_handle, attrs);
+ return tfm_sst_veneer_set_attributes(app_id, asset_uuid, attrs);
}
-enum tfm_sst_err_t tfm_sst_svc_read(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_svc_read(uint32_t asset_uuid,
struct tfm_sst_buf_t* data)
{
uint32_t app_id;
app_id = tfm_sst_get_cur_id();
- return tfm_sst_veneer_read(app_id, asset_handle, data);
+ return tfm_sst_veneer_read(app_id, asset_uuid, data);
}
-enum tfm_sst_err_t tfm_sst_svc_write(uint32_t asset_handle,
+enum tfm_sst_err_t tfm_sst_svc_write(uint32_t asset_uuid,
struct tfm_sst_buf_t* data)
{
uint32_t app_id;
app_id = tfm_sst_get_cur_id();
- return tfm_sst_veneer_write(app_id, asset_handle, data);
+ return tfm_sst_veneer_write(app_id, asset_uuid, data);
}
-enum tfm_sst_err_t tfm_sst_svc_delete(uint32_t asset_handle)
+enum tfm_sst_err_t tfm_sst_svc_delete(uint32_t asset_uuid)
{
uint32_t app_id;
app_id = tfm_sst_get_cur_id();
- return tfm_sst_veneer_delete(app_id, asset_handle);
+ return tfm_sst_veneer_delete(app_id, asset_uuid);
}