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/include/tfm_sst_defs.h b/interface/include/tfm_sst_defs.h
index 83ac62d..1fac2ad 100644
--- a/interface/include/tfm_sst_defs.h
+++ b/interface/include/tfm_sst_defs.h
@@ -15,6 +15,8 @@
#include <inttypes.h>
#include <limits.h>
#include "tfm_api.h"
+#include "tfm_sst_asset_defs.h"
+#include "tfm_sst_asset_macros.h"
/* FIXME: the secure APP ID should not be share with the non-secure code
* as it is revealing information about secure code implementation.
@@ -53,18 +55,6 @@
};
/*!
- * \struct tfm_sst_asset_info_t
- *
- * \brief Structure to store the asset information concerning the content
- * information.
- *
- */
-struct tfm_sst_asset_info_t {
- uint32_t size_current; /*!< The current size of the asset data */
- uint32_t size_max; /*!< The maximum size of the asset data in bytes */
-};
-
-/*!
* \struct tfm_sst_buf_t
*
* \brief Structure to store data information to read/write from/to asset.
@@ -76,8 +66,6 @@
uint32_t offset; /*!< Offset within asset */
};
-#define TFM_SST_ASSET_INFO_SIZE sizeof(struct tfm_sst_asset_info_t)
-
#ifdef __cplusplus
}
#endif