Core: Rename and move __cmse_secure_gateway macro
-- The __cmse_secure_gateway macro is renamed to better
reflect its scope to __tfm_secure_gateway_attributes__
-- The macro is moved to tfm_secure_api.h to allow it
to be visible to all veneer definitions, and it's
removed from the corresponding declarations.
Change-Id: I8e8151d4af6f4f888e353c69ed9a8264794a88c3
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/interface/include/tfm_sst_api.h b/interface/include/tfm_sst_api.h
index 3cdb64e..66865ac 100644
--- a/interface/include/tfm_sst_api.h
+++ b/interface/include/tfm_sst_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Arm Limited. All rights reserved.
+ * Copyright (c) 2017 - 2018, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -12,6 +12,8 @@
extern "C" {
#endif
+#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
diff --git a/interface/include/tfm_sst_veneers.h b/interface/include/tfm_sst_veneers.h
index 791bbb0..db11d4e 100644
--- a/interface/include/tfm_sst_veneers.h
+++ b/interface/include/tfm_sst_veneers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Arm Limited. All rights reserved.
+ * Copyright (c) 2017 - 2018, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -14,9 +14,6 @@
#include "tfm_sst_defs.h"
-#define __cmse_secure_gateway \
- __attribute__((cmse_nonsecure_entry, noinline, section("SFN")))
-
/**
* \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
@@ -32,9 +29,7 @@
*/
enum tfm_sst_err_t tfm_sst_veneer_get_handle(uint32_t app_id,
uint16_t asset_uuid,
- uint32_t *hdl)
-__cmse_secure_gateway;
-
+ uint32_t *hdl);
/**
* \brief Allocates space for the asset, referenced by asset handler,
* without setting any data in the asset.
@@ -47,8 +42,7 @@
* 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)
-__cmse_secure_gateway;
+enum tfm_sst_err_t tfm_sst_veneer_create(uint32_t app_id, uint16_t asset_uuid);
/**
* \brief Gets asset's attributes referenced by asset handler.
@@ -60,12 +54,10 @@
*
* \return Returns error code as specified in \ref tfm_sst_err_t
*/
-extern enum tfm_sst_err_t tfm_sst_veneer_get_attributes(
+enum tfm_sst_err_t tfm_sst_veneer_get_attributes(
uint32_t app_id,
uint32_t asset_handle,
- struct tfm_sst_attribs_t *attrib_struct)
-__cmse_secure_gateway;
-
+ struct tfm_sst_attribs_t *attrib_struct);
/**
* \brief Reads asset's data from asset referenced by asset handler.
*
@@ -79,9 +71,7 @@
*/
enum tfm_sst_err_t tfm_sst_veneer_read(uint32_t app_id,
uint32_t asset_handle,
- struct tfm_sst_buf_t *data)
-__cmse_secure_gateway;
-
+ struct tfm_sst_buf_t *data);
/**
* \brief Writes data into an asset referenced by asset handler.
*
@@ -95,9 +85,7 @@
*/
enum tfm_sst_err_t tfm_sst_veneer_write(uint32_t app_id,
uint32_t asset_handle,
- struct tfm_sst_buf_t *data)
-__cmse_secure_gateway;
-
+ struct tfm_sst_buf_t *data);
/**
* \brief Deletes the asset referenced by the asset handler.
*
@@ -109,9 +97,7 @@
* 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)
-__cmse_secure_gateway;
-
+ uint32_t asset_handle);
#ifdef __cplusplus
}
#endif