SST: Unpack tfm_sst_buf_t for read and write APIs
This patch updates the read and write SST APIs to use
the data, offset and size attributes instead of
tfm_sst_buf_t structure.
Change-Id: Ie3d872c3b1d17b49a54f419d8d6ec164c66b544c
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 ab47fd8..6af6320 100644
--- a/interface/src/tfm_sst_api.c
+++ b/interface/src/tfm_sst_api.c
@@ -81,36 +81,52 @@
enum tfm_sst_err_t tfm_sst_read(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size,
- struct tfm_sst_buf_t* data)
+ uint32_t size,
+ uint32_t offset,
+ uint8_t *data)
{
struct tfm_sst_token_t s_token;
+ struct tfm_sst_buf_t s_data;
/* Pack the token information in the token structure */
s_token.token = token;
s_token.token_size = token_size;
+ /* Pack buffer information in the buffer structure */
+ s_data.size = size;
+ s_data.offset = offset;
+ s_data.data = data;
+
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_READ,
asset_uuid,
(uint32_t)&s_token,
- (uint32_t)data,
+ (uint32_t)&s_data,
0);
}
enum tfm_sst_err_t tfm_sst_write(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size,
- struct tfm_sst_buf_t* data)
+ uint32_t size,
+ uint32_t offset,
+ const uint8_t *data)
{
struct tfm_sst_token_t s_token;
+ struct tfm_sst_buf_t s_data;
/* Pack the token information in the token structure */
s_token.token = token;
s_token.token_size = token_size;
+ /* Pack buffer information in the buffer structure */
+ s_data.size = size;
+ s_data.offset = offset;
+ s_data.data = (uint8_t *)data;
+
return tfm_ns_lock_svc_dispatch(SVC_TFM_SST_WRITE,
asset_uuid,
(uint32_t)&s_token,
- (uint32_t)data,
+ (uint32_t)&s_data,
0);
}