SST: Add asset types and attributes
This patch adds asset types and attributes to be used by the asset
manager to complement the asset policy in the future (i.e. if an
asset has expired, do not return the asset content in a read
request). The asset type and attributes can also be used by other
services to use the asset in different ways based on the set of
attributes.
The patch also updates the SST code as follows:
- add macros to check the asset types and attributes
- update object header store the new types and attributes
- add get and set asset attributes APIs in all the SST service layers
- add a simple test to verify new APIs (get and set attributes)
- add tfm_sst_asset_info_t and updates APIs in all the SST service
layers
- increase veneers regions to fit the new get/set assets attributes
APIs in all the reference targets
Change-Id: I5c678834ffdc9e2447ab046ab4131785d341ed26
Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
diff --git a/interface/src/tfm_sst_api.c b/interface/src/tfm_sst_api.c
index 99d9d38..1b9a8f2 100644
--- a/interface/src/tfm_sst_api.c
+++ b/interface/src/tfm_sst_api.c
@@ -36,6 +36,27 @@
0);
}
+enum tfm_sst_err_t tfm_sst_get_attributes(uint32_t asset_handle,
+ struct tfm_sst_asset_attrs_t *attrs)
+{
+ return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_GET_ATTRIBUTES,
+ asset_handle,
+ (uint32_t)attrs,
+ 0,
+ 0);
+}
+
+enum tfm_sst_err_t tfm_sst_set_attributes(
+ uint32_t asset_handle,
+ const struct tfm_sst_asset_attrs_t *attrs)
+{
+ return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_SET_ATTRIBUTES,
+ asset_handle,
+ (uint32_t)attrs,
+ 0,
+ 0);
+}
+
enum tfm_sst_err_t tfm_sst_read(uint32_t asset_handle, struct tfm_sst_buf_t* data)
{
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_READ,