SST: Replace SST APIs with PSA PS APIs

Refactors the SST non-secure interfaces, secure API, veneers and
manifest to implement the PSA Protected Storage specification. Adds a
stub implementation for the new SST APIs; another patch will add the
final implementation.

Change-Id: Id62eb82c9d33afd2114962ab1994d567cd81e4f7
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
diff --git a/secure_fw/CMakeLists.txt b/secure_fw/CMakeLists.txt
index 4698911..16ec640 100644
--- a/secure_fw/CMakeLists.txt
+++ b/secure_fw/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2017-2018, Arm Limited. All rights reserved.
+# Copyright (c) 2017-2019, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -142,16 +142,16 @@
 	embedded_set_target_compile_defines(TARGET ${PROJECT_OBJ_LIB} LANGUAGE C DEFINES __thumb2__ __ARM_FEATURE_CMSE=3 TFM_LVL=${TFM_LVL} DAUTH_CHIP_DEFAULT APPEND)
 
 	if (REGRESSION OR CORE_TEST)
-		if (DEFINED TFM_PARTITION_TEST_SST AND TFM_PARTITION_TEST_SST)
+		if (DEFINED TFM_PARTITION_TEST_SECURE_SERVICES AND TFM_PARTITION_TEST_SECURE_SERVICES)
 			#The test service veneers in the tfm_secure_tests library may not be
 			#referenced in the secure binary so the veneer objects are explicitly loaded
 			#from the secure tests library. However by generating the veneer files from
 			#the manifests, all the iovec interfaced veneers are in a single file in the
 			#secure_fw directory. The core test partitions use the veneers with the
-			#iovec API, so we only need the explicit load in case the SST test partition
-			#is present.
-			#FIXME Remove the explicit load and the above comment once the SST test
-			#partition uses the generated veneers.
+			#iovec API, so we only need the explicit load in case the secure client test
+			#partition is present.
+			#FIXME Remove the explicit load and the above comment once the secure client
+			#test partition uses the generated veneers.
 			if(${COMPILER} STREQUAL "ARMCLANG")
 				target_link_libraries(${EXE_NAME} tfm_crypto tfm_storage tfm_audit tfm_platform tfm_attest $<TARGET_LINKER_FILE:tfm_secure_tests>\(*veneers.o\) tfm_secure_tests)
 			elseif(${COMPILER} STREQUAL "GNUARM")
diff --git a/secure_fw/ns_callable/tfm_sst_veneers.c b/secure_fw/ns_callable/tfm_sst_veneers.c
index 9c63e14..5348d5d 100644
--- a/secure_fw/ns_callable/tfm_sst_veneers.c
+++ b/secure_fw/ns_callable/tfm_sst_veneers.c
@@ -1,74 +1,54 @@
 /*
- * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
  */
 
 #include "tfm_sst_veneers.h"
-#include "secure_fw/services/secure_storage/sst_asset_management.h"
-#include "tfm_secure_api.h"
-#include "tfm_api.h"
+
+#include "secure_fw/core/tfm_secure_api.h"
+#include "secure_fw/services/secure_storage/tfm_protected_storage.h"
 #include "secure_fw/spm/spm_partition_defs.h"
 
 __tfm_secure_gateway_attributes__
-enum psa_sst_err_t tfm_sst_veneer_create(uint32_t asset_uuid,
-                                         const struct tfm_sst_token_t *s_token)
+enum tfm_sst_err_t tfm_sst_veneer_set(const psa_ps_uid_t *uid,
+                                      uint32_t data_length,
+                                      const void *p_data,
+                                      psa_ps_create_flags_t create_flags)
 {
-    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, sst_am_create,
-                         asset_uuid, s_token, 0, 0);
+    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, tfm_sst_set,
+                         uid, data_length, p_data, create_flags);
 }
 
 __tfm_secure_gateway_attributes__
-enum psa_sst_err_t tfm_sst_veneer_get_info(uint32_t asset_uuid,
-                                          const struct tfm_sst_token_t *s_token,
-                                          struct psa_sst_asset_info_t *info)
+enum tfm_sst_err_t tfm_sst_veneer_get(const psa_ps_uid_t *uid,
+                                      uint32_t data_offset,
+                                      uint32_t data_length,
+                                      void *p_data)
 {
-    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, sst_am_get_info,
-                         asset_uuid, s_token, info, 0);
+    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, tfm_sst_get,
+                         uid, data_offset, data_length, p_data);
 }
 
 __tfm_secure_gateway_attributes__
-enum psa_sst_err_t tfm_sst_veneer_get_attributes(uint32_t asset_uuid,
-                                          const struct tfm_sst_token_t *s_token,
-                                          struct psa_sst_asset_attrs_t *attrs)
+enum tfm_sst_err_t tfm_sst_veneer_get_info(const psa_ps_uid_t *uid,
+                                           struct psa_ps_info_t *p_info)
 {
-    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, sst_am_get_attributes,
-                         asset_uuid, s_token, attrs, 0);
+    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, tfm_sst_get_info,
+                         uid, p_info, 0, 0);
 }
 
 __tfm_secure_gateway_attributes__
-enum psa_sst_err_t tfm_sst_veneer_set_attributes(uint32_t asset_uuid,
-                                      const struct tfm_sst_token_t *s_token,
-                                      const struct psa_sst_asset_attrs_t *attrs)
+enum tfm_sst_err_t tfm_sst_veneer_remove(const psa_ps_uid_t *uid)
 {
-    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, sst_am_set_attributes,
-                         asset_uuid, s_token, attrs, 0);
+    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, tfm_sst_remove,
+                         uid, 0, 0, 0);
 }
 
 __tfm_secure_gateway_attributes__
-enum psa_sst_err_t tfm_sst_veneer_read(int32_t client_id,
-                                       uint32_t asset_uuid,
-                                       const struct tfm_sst_token_t *s_token,
-                                       struct tfm_sst_buf_t *data)
+enum tfm_sst_err_t tfm_sst_veneer_get_support(uint32_t *support_flags)
 {
-    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, sst_am_read, client_id,
-                         asset_uuid, s_token, data);
-}
-
-__tfm_secure_gateway_attributes__
-enum psa_sst_err_t tfm_sst_veneer_write(uint32_t asset_uuid,
-                                        const struct tfm_sst_token_t *s_token,
-                                        struct tfm_sst_buf_t *data)
-{
-    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, sst_am_write,
-                         asset_uuid, s_token, data, 0);
-}
-
-__tfm_secure_gateway_attributes__
-enum psa_sst_err_t tfm_sst_veneer_delete(uint32_t asset_uuid,
-                                         const struct tfm_sst_token_t *s_token)
-{
-    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, sst_am_delete,
-                         asset_uuid, s_token, 0, 0);
+    TFM_CORE_SFN_REQUEST(TFM_SP_STORAGE_ID, tfm_sst_get_support,
+                         support_flags, 0, 0, 0);
 }
diff --git a/secure_fw/ns_callable/tfm_veneers.c b/secure_fw/ns_callable/tfm_veneers.c
index 30ef5f1..c3df282 100644
--- a/secure_fw/ns_callable/tfm_veneers.c
+++ b/secure_fw/ns_callable/tfm_veneers.c
@@ -12,13 +12,11 @@
 #include "secure_fw/spm/spm_partition_defs.h"
 
 /******** TFM_SP_STORAGE ********/
-psa_status_t sst_am_create(struct psa_invec *, size_t, struct psa_outvec *, size_t);
-psa_status_t sst_am_get_info(struct psa_invec *, size_t, struct psa_outvec *, size_t);
-psa_status_t sst_am_get_attributes(struct psa_invec *, size_t, struct psa_outvec *, size_t);
-psa_status_t sst_am_set_attributes(struct psa_invec *, size_t, struct psa_outvec *, size_t);
-psa_status_t sst_am_read(struct psa_invec *, size_t, struct psa_outvec *, size_t);
-psa_status_t sst_am_write(struct psa_invec *, size_t, struct psa_outvec *, size_t);
-psa_status_t sst_am_delete(struct psa_invec *, size_t, struct psa_outvec *, size_t);
+psa_status_t tfm_sst_set(struct psa_invec *, size_t, struct psa_outvec *, size_t);
+psa_status_t tfm_sst_get(struct psa_invec *, size_t, struct psa_outvec *, size_t);
+psa_status_t tfm_sst_get_info(struct psa_invec *, size_t, struct psa_outvec *, size_t);
+psa_status_t tfm_sst_remove(struct psa_invec *, size_t, struct psa_outvec *, size_t);
+psa_status_t tfm_sst_get_support(struct psa_invec *, size_t, struct psa_outvec *, size_t);
 
 /******** TFM_SP_AUDIT_LOG ********/
 psa_status_t audit_core_retrieve_record(struct psa_invec *, size_t, struct psa_outvec *, size_t);
@@ -92,13 +90,11 @@
     }
 
 /******** TFM_SP_STORAGE ********/
-TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_create)
-TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_get_info)
-TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_get_attributes)
-TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_set_attributes)
-TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_read)
-TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_write)
-TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_delete)
+TFM_VENEER_FUNCTION(TFM_SP_STORAGE, tfm_sst_set)
+TFM_VENEER_FUNCTION(TFM_SP_STORAGE, tfm_sst_get)
+TFM_VENEER_FUNCTION(TFM_SP_STORAGE, tfm_sst_get_info)
+TFM_VENEER_FUNCTION(TFM_SP_STORAGE, tfm_sst_remove)
+TFM_VENEER_FUNCTION(TFM_SP_STORAGE, tfm_sst_get_support)
 
 /******** TFM_SP_AUDIT_LOG ********/
 TFM_VENEER_FUNCTION(TFM_SP_AUDIT_LOG, audit_core_retrieve_record)
diff --git a/secure_fw/services/secure_storage/CMakeLists.inc b/secure_fw/services/secure_storage/CMakeLists.inc
index a822e08..cc424aa 100644
--- a/secure_fw/services/secure_storage/CMakeLists.inc
+++ b/secure_fw/services/secure_storage/CMakeLists.inc
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2017-2018, Arm Limited. All rights reserved.
+# Copyright (c) 2017-2019, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -61,21 +61,21 @@
 
 	set (SECURE_STORAGE_C_SRC
 		"${SECURE_STORAGE_DIR}/tfm_sst_secure_api.c"
-		"${SECURE_STORAGE_DIR}/sst_asset_management.c"
-		"${SECURE_STORAGE_DIR}/sst_object_system.c"
-		"${SECURE_STORAGE_DIR}/sst_object_table.c"
-		"${SECURE_STORAGE_DIR}/sst_utils.c"
-		"${SECURE_STORAGE_DIR}/assets/sst_asset_defs.c"
-		"${SECURE_STORAGE_DIR}/flash/sst_flash.c"
-		"${SECURE_STORAGE_DIR}/flash_fs/sst_flash_fs.c"
-		"${SECURE_STORAGE_DIR}/flash_fs/sst_flash_fs_dblock.c"
-		"${SECURE_STORAGE_DIR}/flash_fs/sst_flash_fs_mblock.c")
+		"${SECURE_STORAGE_DIR}/tfm_protected_storage.c"
+		# "${SECURE_STORAGE_DIR}/sst_object_system.c"
+		# "${SECURE_STORAGE_DIR}/sst_object_table.c"
+		# "${SECURE_STORAGE_DIR}/sst_utils.c"
+		# "${SECURE_STORAGE_DIR}/flash/sst_flash.c"
+		# "${SECURE_STORAGE_DIR}/flash_fs/sst_flash_fs.c"
+		# "${SECURE_STORAGE_DIR}/flash_fs/sst_flash_fs_dblock.c"
+		# "${SECURE_STORAGE_DIR}/flash_fs/sst_flash_fs_mblock.c"
+	)
 
 	if (SST_ENCRYPTION)
-		list(APPEND SECURE_STORAGE_C_SRC
-			"${SECURE_STORAGE_DIR}/crypto/sst_crypto_interface.c"
-			"${SECURE_STORAGE_DIR}/sst_encrypted_object.c"
-			)
+		# list(APPEND SECURE_STORAGE_C_SRC
+		# 	"${SECURE_STORAGE_DIR}/crypto/sst_crypto_interface.c"
+		# 	"${SECURE_STORAGE_DIR}/sst_encrypted_object.c"
+		# 	)
 		set_property(SOURCE ${SECURE_STORAGE_C_SRC} APPEND PROPERTY COMPILE_DEFINITIONS SST_ENCRYPTION)
 		set_property(DIRECTORY ${TEST_DIR} APPEND PROPERTY COMPILE_DEFINITIONS SST_ENCRYPTION)
 
@@ -83,8 +83,8 @@
 			if (NOT REGRESSION OR TFM_LVL GREATER 1)
 				# In case of regression test executed in TFM level 1, the SST rollback test suite has
 				# its own implementation of sst_nv_counters intefaces to be able to test different scenarios.
-				list (APPEND SECURE_STORAGE_C_SRC
-					"${SECURE_STORAGE_DIR}/nv_counters/sst_nv_counters.c")
+				# list (APPEND SECURE_STORAGE_C_SRC
+				# 	"${SECURE_STORAGE_DIR}/nv_counters/sst_nv_counters.c")
 			endif()
 			set_property(SOURCE ${SECURE_STORAGE_C_SRC} APPEND PROPERTY COMPILE_DEFINITIONS SST_ROLLBACK_PROTECTION)
 		endif()
diff --git a/secure_fw/services/secure_storage/assets/sst_asset_defs.c b/secure_fw/services/secure_storage/assets/sst_asset_defs.c
deleted file mode 100644
index 32e2b3e..0000000
--- a/secure_fw/services/secure_storage/assets/sst_asset_defs.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-/**********************************************/
-/* Automatically-generated file. Do not edit! */
-/**********************************************/
-
-#include "sst_asset_defs.h"
-#include "secure_fw/services/secure_storage/sst_asset_management.h"
-
-const struct sst_asset_policy_t asset_perms[] = {
-{
-    .type = PSA_SST_ASSET_KEY_AES,
-    .asset_uuid = SST_ASSET_ID_AES_KEY_128,
-    .max_size = SST_ASSET_MAX_SIZE_AES_KEY_128,
-    .perms_count = 1,
-    .perms_modes_start_idx = 0,
-},{
-    .type = PSA_SST_ASSET_KEY_AES,
-    .asset_uuid = SST_ASSET_ID_AES_KEY_192,
-    .max_size = SST_ASSET_MAX_SIZE_AES_KEY_192,
-    .perms_count = 3,
-    .perms_modes_start_idx = 1,
-},{
-    .type = PSA_SST_ASSET_KEY_AES,
-    .asset_uuid = SST_ASSET_ID_AES_KEY_256,
-    .max_size = SST_ASSET_MAX_SIZE_AES_KEY_256,
-    .perms_count = 1,
-    .perms_modes_start_idx = 4,
-},{
-    .type = PSA_SST_ASSET_KEY_RSA_PUBLIC,
-    .asset_uuid = SST_ASSET_ID_RSA_KEY_1024,
-    .max_size = SST_ASSET_MAX_SIZE_RSA_KEY_1024,
-    .perms_count = 1,
-    .perms_modes_start_idx = 5,
-},{
-    .type = PSA_SST_ASSET_KEY_RSA_PUBLIC,
-    .asset_uuid = SST_ASSET_ID_RSA_KEY_2048,
-    .max_size = SST_ASSET_MAX_SIZE_RSA_KEY_2048,
-    .perms_count = 1,
-    .perms_modes_start_idx = 6,
-},{
-    .type = PSA_SST_ASSET_KEY_RSA_PRIVATE,
-    .asset_uuid = SST_ASSET_ID_RSA_KEY_4096,
-    .max_size = SST_ASSET_MAX_SIZE_RSA_KEY_4096,
-    .perms_count = 1,
-    .perms_modes_start_idx = 7,
-},{
-    .type = PSA_SST_ASSET_CERT_X_509,
-    .asset_uuid = SST_ASSET_ID_X509_CERT_SMALL,
-    .max_size = SST_ASSET_MAX_SIZE_X509_CERT_SMALL,
-    .perms_count = 1,
-    .perms_modes_start_idx = 8,
-},{
-    .type = PSA_SST_ASSET_CERT_X_509,
-    .asset_uuid = SST_ASSET_ID_X509_CERT_LARGE,
-    .max_size = SST_ASSET_MAX_SIZE_X509_CERT_LARGE,
-    .perms_count = 3,
-    .perms_modes_start_idx = 9,
-},{
-    .type = PSA_SST_ASSET_KEY_HMAC,
-    .asset_uuid = SST_ASSET_ID_SHA224_HASH,
-    .max_size = SST_ASSET_MAX_SIZE_SHA224_HASH,
-    .perms_count = 1,
-    .perms_modes_start_idx = 12,
-},{
-    .type = PSA_SST_ASSET_KEY_HMAC,
-    .asset_uuid = SST_ASSET_ID_SHA384_HASH,
-    .max_size = SST_ASSET_MAX_SIZE_SHA384_HASH,
-    .perms_count = 1,
-    .perms_modes_start_idx = 13,
-} };
-
-const struct sst_asset_perm_t asset_perms_modes[] = {
-{
-    .client_id = SST_CLIENT_ID_3,
-    .perm = SST_PERM_REFERENCE,
-},{
-    .client_id = SST_CLIENT_ID_2,
-    .perm = SST_PERM_REFERENCE,
-},{
-    .client_id = SST_CLIENT_ID_1,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ,
-},{
-    .client_id = SST_CLIENT_ID_0,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE,
-},{
-    .client_id = SST_CLIENT_ID_3,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE,
-},{
-    .client_id = SST_CLIENT_ID_3,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE,
-},{
-    .client_id = SST_CLIENT_ID_3,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE,
-},{
-    .client_id = SST_CLIENT_ID_3,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE,
-},{
-    .client_id = SST_CLIENT_ID_3,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE,
-},{
-    .client_id = SST_CLIENT_ID_2,
-    .perm = SST_PERM_REFERENCE,
-},{
-    .client_id = SST_CLIENT_ID_1,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ,
-},{
-    .client_id = SST_CLIENT_ID_0,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE,
-},{
-    .client_id = SST_CLIENT_ID_1,
-    .perm = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE,
-},{
-    .client_id = SST_CLIENT_ID_0,
-    .perm = SST_PERM_REFERENCE | SST_PERM_WRITE,
-} };
diff --git a/secure_fw/services/secure_storage/assets/sst_asset_defs.h b/secure_fw/services/secure_storage/assets/sst_asset_defs.h
deleted file mode 100644
index 147aa46..0000000
--- a/secure_fw/services/secure_storage/assets/sst_asset_defs.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-/**********************************************/
-/* Automatically-generated file. Do not edit! */
-/**********************************************/
-
-#ifndef __SST_ASSET_DEFS_H__
-#define __SST_ASSET_DEFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* SST service reserved IDs */
-#define SST_ASSET_ID_NO_ASSET 0
-/* End SST service reserved IDs */
-
-/* Asset IDs */
-#define SST_ASSET_ID_AES_KEY_128 1
-#define SST_ASSET_ID_AES_KEY_192 2
-#define SST_ASSET_ID_AES_KEY_256 3
-#define SST_ASSET_ID_RSA_KEY_1024 4
-#define SST_ASSET_ID_RSA_KEY_2048 5
-#define SST_ASSET_ID_RSA_KEY_4096 6
-#define SST_ASSET_ID_X509_CERT_SMALL 7
-#define SST_ASSET_ID_X509_CERT_LARGE 8
-#define SST_ASSET_ID_SHA224_HASH 9
-#define SST_ASSET_ID_SHA384_HASH 10
-
-/* Asset sizes */
-#define SST_ASSET_MAX_SIZE_AES_KEY_128 16
-#define SST_ASSET_MAX_SIZE_AES_KEY_192 24
-#define SST_ASSET_MAX_SIZE_AES_KEY_256 32
-#define SST_ASSET_MAX_SIZE_RSA_KEY_1024 128
-#define SST_ASSET_MAX_SIZE_RSA_KEY_2048 256
-#define SST_ASSET_MAX_SIZE_RSA_KEY_4096 512
-#define SST_ASSET_MAX_SIZE_X509_CERT_SMALL 512
-#define SST_ASSET_MAX_SIZE_X509_CERT_LARGE 2048
-#define SST_ASSET_MAX_SIZE_SHA224_HASH 28
-#define SST_ASSET_MAX_SIZE_SHA384_HASH 48
-
-/* Client IDs which have access rights in one or more assets */
-#define SST_CLIENT_ID_0 -1
-#define SST_CLIENT_ID_1 -2
-#define SST_CLIENT_ID_2 -3
-#define SST_CLIENT_ID_3 -4
-
-/* Number of assets that can be stored in SST area */
-#define SST_NUM_ASSETS 10
-
-/* Largest defined asset size */
-#define SST_MAX_ASSET_SIZE 2048
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SST_ASSET_DEFS_H__ */
diff --git a/secure_fw/services/secure_storage/manifest.yaml b/secure_fw/services/secure_storage/manifest.yaml
index 3b1708a..f6f63c1 100644
--- a/secure_fw/services/secure_storage/manifest.yaml
+++ b/secure_fw/services/secure_storage/manifest.yaml
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2018, Arm Limited. All rights reserved.
+# Copyright (c) 2018-2019, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -15,71 +15,55 @@
   "entry_point": "main",
   "stack_size": "0x2000",
   "heap_size": "0x0400",
-  "tfm_init_symbol": "sst_am_prepare",
+  "tfm_init_symbol": "tfm_sst_init",
   "secure_functions": [
     {
-      "sfid": "SST_AM_CREATE_SFID",
-      "signal": "SST_AM_CREATE",
-      "tfm_symbol": "sst_am_create",
+      "sfid": "TFM_SST_SET_SFID",
+      "signal": "TFM_SST_SET",
+      "tfm_symbol": "tfm_sst_set",
       "non_secure_clients": true,
       "minor_version": 1,
       "minor_policy": "strict"
     },
     {
-      "sfid": "SST_AM_GET_INFO_SFID",
-      "signal": "SST_AM_GET_INFO",
-      "tfm_symbol": "sst_am_get_info",
+      "sfid": "TFM_SST_GET_SFID",
+      "signal": "TFM_SST_GET",
+      "tfm_symbol": "tfm_sst_get",
       "non_secure_clients": true,
       "minor_version": 1,
       "minor_policy": "strict"
     },
     {
-      "sfid": "SST_AM_GET_ATTRIBUTES_SFID",
-      "signal": "SST_AM_GET_ATTRIBUTES",
-      "tfm_symbol": "sst_am_get_attributes",
+      "sfid": "TFM_SST_GET_INFO_SFID",
+      "signal": "TFM_SST_GET_INFO",
+      "tfm_symbol": "tfm_sst_get_info",
       "non_secure_clients": true,
       "minor_version": 1,
       "minor_policy": "strict"
     },
     {
-      "sfid": "SST_AM_SET_ATTRIBUTES_SFID",
-      "signal": "SST_AM_SET_ATTRIBUTES",
-      "tfm_symbol": "sst_am_set_attributes",
+      "sfid": "TFM_SST_REMOVE_SFID",
+      "signal": "TFM_SST_REMOVE",
+      "tfm_symbol": "tfm_sst_remove",
       "non_secure_clients": true,
       "minor_version": 1,
       "minor_policy": "strict"
     },
     {
-      "sfid": "SST_AM_READ_SFID",
-      "signal": "SST_AM_READ",
-      "tfm_symbol": "sst_am_read",
-      "non_secure_clients": true,
-      "minor_version": 1,
-      "minor_policy": "strict"
-    },
-    {
-      "sfid": "SST_AM_WRITE_SFID",
-      "signal": "SST_AM_WRITE",
-      "tfm_symbol": "sst_am_write",
-      "non_secure_clients": true,
-      "minor_version": 1,
-      "minor_policy": "strict"
-    },
-    {
-      "sfid": "SST_AM_DELETE_SFID",
-      "signal": "SST_AM_DELETE",
-      "tfm_symbol": "sst_am_delete",
+      "sfid": "TFM_SST_GET_SUPPORT_SFID",
+      "signal": "TFM_SST_GET_SUPPORT",
+      "tfm_symbol": "tfm_sst_get_support",
       "non_secure_clients": true,
       "minor_version": 1,
       "minor_policy": "strict"
     }
   ],
   "source_files": [
-    "sst_utils.c",
     "sst_encrypted_object.c",
     "sst_object_system.c",
-    "sst_asset_management.c",
-    "assets/sst_asset_defs.c",
+    "sst_object_table.c",
+    "sst_utils.c",
+    "tfm_protected_storage.c",
     "crypto/sst_crypto_interface.c",
     "flash/sst_flash.c",
     "flash_fs/sst_flash_fs.c",
diff --git a/secure_fw/services/secure_storage/sst_asset_management.c b/secure_fw/services/secure_storage/sst_asset_management.c
deleted file mode 100644
index e811817..0000000
--- a/secure_fw/services/secure_storage/sst_asset_management.c
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#include "sst_asset_management.h"
-
-#include <stddef.h>
-
-#include "assets/sst_asset_defs.h"
-#include "sst_object_system.h"
-#include "sst_utils.h"
-#include "tfm_secure_api.h"
-#include "tfm_sst_defs.h"
-
-/******************************/
-/* Asset management functions */
-/******************************/
-
-/* Policy database */
-extern struct sst_asset_policy_t asset_perms[];
-extern struct sst_asset_perm_t asset_perms_modes[];
-
-/**
- * \brief Looks up for policy entry for give client and uuid
- *
- * \param[in] db_entry  Asset specific entry
- * \param[in] client_id Identify of the client calling the service
- *
- * \return Returns the perms entry on successful lookup
- */
-static struct sst_asset_perm_t *sst_am_lookup_client_perms(
-                                      const struct sst_asset_policy_t *db_entry,
-                                      int32_t client_id)
-{
-    struct sst_asset_perm_t *perm_entry;
-    uint32_t i;
-
-    for (i = 0; i < db_entry->perms_count; i++) {
-        perm_entry = &asset_perms_modes[db_entry->perms_modes_start_idx+i];
-        if (perm_entry->client_id == client_id) {
-            return perm_entry;
-        }
-    }
-
-    return NULL;
-}
-
-/**
- * \brief Gets pointer to policy entry for an asset
- *
- * \param[in] uuid  Unique identifier of the object being accessed
- *
- * \return Returns the pointer for entry for specified asset
- */
-static struct sst_asset_policy_t *sst_am_lookup_db_entry(uint32_t uuid)
-{
-    uint32_t i;
-
-    /* Lookup in db for matching entry */
-    for (i = 0; i < SST_NUM_ASSETS; i++) {
-        if (asset_perms[i].asset_uuid == uuid) {
-            return &asset_perms[i];
-        }
-    }
-
-    return NULL;
-}
-
-/**
- * \brief Checks the compile time policy for secure/non-secure separation
- *
- * \param[in] client_id     Client ID
- * \param[in] request_type  requested action to perform
- *
- * \return Returns the sanitized request_type
- */
-static uint16_t sst_am_check_s_ns_policy(int32_t client_id,
-                                         uint16_t request_type)
-{
-    enum psa_sst_err_t err;
-    uint16_t access;
-
-    /* FIXME: based on level 1 tfm isolation, any entity on the secure side
-     * can have full access if it uses secure client ID to make the call.
-     * When the secure caller passes on the client_id of non-secure entity,
-     * the code only allows read by reference. I.e. if the client_id
-     * has the reference permission, the secure caller will be allowed
-     * to read the entry. This needs a revisit when for higher level
-     * of isolation.
-     *
-     * FIXME: current code allows only a referenced read, however there
-     * is a case for refereced create/write/delete as well, for example
-     * a NS entity may ask another secure service to derive a key and securely
-     * store it, and make references for encryption/decryption and later on
-     * delete it.
-     * For now it is for the other secure service to create/delete/write
-     * resources with the secure client ID.
-     */
-    err = sst_utils_validate_secure_caller();
-
-    if (err == PSA_SST_ERR_SUCCESS) {
-        if (TFM_CLIENT_ID_IS_S(client_id) == 0) {
-            if (request_type & SST_PERM_REFERENCE) {
-                access = SST_PERM_REFERENCE;
-            } else {
-                /* Other permissions can not be delegated */
-                access = SST_PERM_FORBIDDEN;
-            }
-        } else {
-            /* a call from secure entity on it's own behalf.
-             * In level 1 isolation, any secure entity has
-             * full access to storage.
-             */
-            access = SST_PERM_BYPASS;
-        }
-    } else if (TFM_CLIENT_ID_IS_S(client_id) == 1) {
-        /* non secure caller spoofing as secure caller */
-        access = SST_PERM_FORBIDDEN;
-    } else {
-        access = request_type;
-    }
-    return access;
-}
-
-/**
- * \brief Gets asset's permissions if the client is allowed
- *        based on the request_type
- *
- * \param[in] client_id     Client ID
- * \param[in] uuid          Asset's unique identifier
- * \param[in] request_type  Type of requested access
- *
- * \note If request_type contains multiple permissions, this function
- *       returns the entry pointer for specified asset if at least one
- *       of those permissions match.
- *
- * \return Returns the entry pointer for specified asset
- */
-static struct sst_asset_policy_t *sst_am_get_db_entry(int32_t client_id,
-                                                      uint32_t uuid,
-                                                      uint8_t request_type)
-{
-    struct sst_asset_perm_t   *perm_entry;
-    struct sst_asset_policy_t *db_entry;
-
-    request_type = sst_am_check_s_ns_policy(client_id, request_type);
-
-    /* security access violation */
-    if (request_type == SST_PERM_FORBIDDEN) {
-        /* FIXME: this is prone to timing attacks. Ideally the time
-         * spent in this function should always be constant irrespective
-         * of success or failure of checks. Timing attacks will be
-         * addressed in later version.
-         */
-        return NULL;
-    }
-
-    /* Find policy db entry for the the asset */
-    db_entry = sst_am_lookup_db_entry(uuid);
-    if (db_entry == NULL) {
-        return NULL;
-    }
-
-    if (request_type == SST_PERM_BYPASS) {
-         return db_entry;
-     }
-
-    /* Find the client ID entry in the database */
-    perm_entry = sst_am_lookup_client_perms(db_entry, client_id);
-    if (perm_entry == NULL) {
-        return NULL;
-    }
-
-     /* Check if the db permission matches with at least one of the
-      * requested permissions types.
-      */
-    if ((perm_entry->perm & request_type) != 0) {
-        return db_entry;
-    }
-    return NULL;
-}
-
-/**
- * \brief Validates the policy database's integrity
- *        Stub function.
- *
- * \return Returns value specified in \ref psa_sst_err_t
- */
-static enum psa_sst_err_t validate_policy_db(void)
-{
-    /* Currently the policy database is inbuilt
-     * in the code. It's sanity is assumed to be correct.
-     * In the later revisions if access policy is
-     * stored differently, it may require sanity check
-     * as well.
-     */
-    return PSA_SST_ERR_SUCCESS;
-}
-
-enum psa_sst_err_t sst_am_prepare(void)
-{
-    enum psa_sst_err_t err;
-    /* FIXME: outcome of this function should determine
-     * state machine of asset manager. If this
-     * step fails other APIs shouldn't entertain
-     * any user calls. Not a major issue for now
-     * as policy db check is a dummy function, and
-     * sst core maintains it's own state machine.
-     */
-
-    /* Validate policy database */
-    err = validate_policy_db();
-
-    /* Initialize underlying storage system */
-    if (err != PSA_SST_ERR_SUCCESS) {
-        return PSA_SST_ERR_SYSTEM_ERROR;
-    }
-
-    err = sst_system_prepare();
-#ifdef SST_CREATE_FLASH_LAYOUT
-    /* If SST_CREATE_FLASH_LAYOUT is set, it indicates that it is required to
-     * create a SST flash layout. SST service will generate an empty and valid
-     * SST flash layout to store assets. It will erase all data located in the
-     * assigned SST memory area before generating the SST layout.
-     * This flag is required to be set if the SST memory area is located in a
-     * non-persistent memory.
-     * This flag can be set if the SST memory area is located in a persistent
-     * memory without a previous valid SST flash layout in it. That is the case
-     * when it is the first time in the device life that the SST service is
-     * executed.
-     */
-    if (err != PSA_SST_ERR_SUCCESS) {
-        /* Remove all data in the SST memory area and creates a valid SST flash
-         * layout in that area.
-         */
-        sst_system_wipe_all();
-
-        /* Attempt to initialise again */
-        err = sst_system_prepare();
-    }
-#endif /* SST_CREATE_FLASH_LAYOUT */
-
-    return err;
-}
-
-/**
- * \brief Validate incoming iovec structure
- *
- * \param[in] src        Incoming iovec for the read/write request
- * \param[in] dest       Pointer to local copy of the iovec
- * \param[in] client_id  Client ID of the caller
- * \param[in] access     Access type to be permormed on the given dest->data
- *                       address
- *
- * \return Returns value specified in \ref psa_sst_err_t
- */
-static enum psa_sst_err_t validate_copy_validate_iovec(
-                                                const struct tfm_sst_buf_t *src,
-                                                struct tfm_sst_buf_t *dest,
-                                                int32_t client_id,
-                                                uint32_t access)
-{
-    /* iovec struct needs to be used as veneers do not allow
-     * more than four params.
-     * First validate the pointer for iovec itself, then copy
-     * the iovec, then validate the local copy of iovec.
-     */
-    enum psa_sst_err_t bound_check;
-
-    bound_check = sst_utils_bound_check_and_copy((uint8_t *) src,
-                                                 (uint8_t *) dest,
-                                                 sizeof(struct tfm_sst_buf_t),
-                                                 client_id);
-    if (bound_check == PSA_SST_ERR_SUCCESS) {
-        bound_check = sst_utils_memory_bound_check(dest->data, dest->size,
-                                                   client_id, access);
-    }
-
-    return bound_check;
-}
-
-enum psa_sst_err_t sst_am_get_info(uint32_t asset_uuid,
-                                   const struct tfm_sst_token_t *s_token,
-                                   struct psa_sst_asset_info_t *info)
-{
-    enum psa_sst_err_t bound_check;
-    struct sst_asset_policy_t *db_entry;
-    struct psa_sst_asset_info_t tmp_info;
-    enum psa_sst_err_t err;
-    uint8_t all_perms = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE;
-    int32_t client_id;
-
-    if (tfm_core_get_caller_client_id(&client_id) != TFM_SUCCESS) {
-        return PSA_SST_ERR_SYSTEM_ERROR;
-    }
-
-    bound_check = sst_utils_memory_bound_check(info, PSA_SST_ASSET_INFO_SIZE,
-                                               client_id,
-                                               TFM_MEMORY_ACCESS_RW);
-    if (bound_check != PSA_SST_ERR_SUCCESS) {
-        return PSA_SST_ERR_PARAM_ERROR;
-    }
-
-    db_entry = sst_am_get_db_entry(client_id, asset_uuid, all_perms);
-    if (db_entry == NULL) {
-        return PSA_SST_ERR_ASSET_NOT_FOUND;
-    }
-
-    err = sst_object_get_info(asset_uuid, s_token, &tmp_info);
-    if (err == PSA_SST_ERR_SUCCESS) {
-        /* Use tmp_info to not leak information in case the previous function
-         * returns and error. It avoids to leak information in case of error.
-         * So, copy the tmp_info content into the attrs only if that tmp_info
-         * data is valid.
-         */
-        sst_utils_memcpy(info, &tmp_info, PSA_SST_ASSET_INFO_SIZE);
-    }
-
-    return err;
-}
-
-enum psa_sst_err_t sst_am_get_attributes(uint32_t asset_uuid,
-                                         const struct tfm_sst_token_t *s_token,
-                                         struct psa_sst_asset_attrs_t *attrs)
-{
-    uint8_t all_perms = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE;
-    enum psa_sst_err_t bound_check;
-    struct sst_asset_policy_t *db_entry;
-    enum psa_sst_err_t err;
-    struct psa_sst_asset_attrs_t tmp_attrs;
-    int32_t client_id;
-
-    if (tfm_core_get_caller_client_id(&client_id) != TFM_SUCCESS) {
-        return PSA_SST_ERR_SYSTEM_ERROR;
-    }
-
-    bound_check = sst_utils_memory_bound_check(attrs, PSA_SST_ASSET_ATTR_SIZE,
-                                               client_id,
-                                               TFM_MEMORY_ACCESS_RW);
-    if (bound_check != PSA_SST_ERR_SUCCESS) {
-        return PSA_SST_ERR_PARAM_ERROR;
-    }
-
-    db_entry = sst_am_get_db_entry(client_id, asset_uuid, all_perms);
-    if (db_entry == NULL) {
-        return PSA_SST_ERR_ASSET_NOT_FOUND;
-    }
-
-    err = sst_object_get_attributes(asset_uuid, s_token, &tmp_attrs);
-    if (err == PSA_SST_ERR_SUCCESS) {
-        /* Use tmp_attrs to not leak information incase the previous function
-         * returns and error. It avoids to leak information in case of error.
-         * So, copy the tmp_attrs content into the attrs only if that tmp_attrs
-         * data is valid.
-         */
-        sst_utils_memcpy(attrs, &tmp_attrs, PSA_SST_ASSET_ATTR_SIZE);
-    }
-
-    return err;
-}
-
-enum psa_sst_err_t sst_am_set_attributes(uint32_t asset_uuid,
-                                      const struct tfm_sst_token_t *s_token,
-                                      const struct psa_sst_asset_attrs_t *attrs)
-{
-    uint8_t all_perms = SST_PERM_REFERENCE | SST_PERM_READ | SST_PERM_WRITE;
-    enum psa_sst_err_t bound_check;
-    struct sst_asset_policy_t *db_entry;
-    enum psa_sst_err_t err;
-    int32_t client_id;
-
-    if (tfm_core_get_caller_client_id(&client_id) != TFM_SUCCESS) {
-        return PSA_SST_ERR_SYSTEM_ERROR;
-    }
-
-    bound_check = sst_utils_memory_bound_check((uint8_t *)attrs,
-                                               PSA_SST_ASSET_ATTR_SIZE,
-                                               client_id,
-                                               TFM_MEMORY_ACCESS_RO);
-    if (bound_check != PSA_SST_ERR_SUCCESS) {
-        return PSA_SST_ERR_PARAM_ERROR;
-    }
-
-    db_entry = sst_am_get_db_entry(client_id, asset_uuid, all_perms);
-    if (db_entry == NULL) {
-        return PSA_SST_ERR_ASSET_NOT_FOUND;
-    }
-
-    /* FIXME: Validity attributes are not supported in the current service
-     *        implementation. It is mandatory to set start and end subattributes
-     *        to 0.
-     */
-    if (attrs->validity.start != 0 || attrs->validity.end != 0) {
-        return PSA_SST_ERR_PARAM_ERROR;
-    }
-
-    /* FIXME: Check which bit attributes have been changed and check if those
-     *        can be modified or not.
-     */
-    err = sst_object_set_attributes(asset_uuid, s_token, attrs);
-
-    return err;
-}
-
-enum psa_sst_err_t sst_am_create(uint32_t asset_uuid,
-                                 const struct tfm_sst_token_t *s_token)
-{
-    enum psa_sst_err_t err;
-    struct sst_asset_policy_t *db_entry;
-    int32_t client_id;
-
-    if (tfm_core_get_caller_client_id(&client_id) != TFM_SUCCESS) {
-        return PSA_SST_ERR_SYSTEM_ERROR;
-    }
-
-    db_entry = sst_am_get_db_entry(client_id, asset_uuid, SST_PERM_WRITE);
-    if (db_entry == NULL) {
-        return PSA_SST_ERR_ASSET_NOT_FOUND;
-    }
-
-    err = sst_object_create(asset_uuid, s_token, db_entry->type,
-                            db_entry->max_size);
-
-    return err;
-}
-
-enum psa_sst_err_t sst_am_read(int32_t client_id, uint32_t asset_uuid,
-                               const struct tfm_sst_token_t *s_token,
-                               struct tfm_sst_buf_t *data)
-{
-    int32_t caller_id;
-    struct sst_asset_policy_t *db_entry;
-    enum psa_sst_err_t err;
-    struct tfm_sst_buf_t local_data;
-
-    /* Check if it is a read by reference request */
-    if (client_id != SST_DIRECT_CLIENT_READ) {
-        /* Only secure partitions can request it */
-        if (sst_utils_validate_secure_caller() == PSA_SST_ERR_SUCCESS) {
-            /* Reference read access requested, check if the client has
-             * reference permission, otherwise reject the request.
-             */
-            db_entry = sst_am_get_db_entry(client_id, asset_uuid,
-                                           SST_PERM_REFERENCE);
-            if (db_entry == NULL) {
-                return PSA_SST_ERR_ASSET_NOT_FOUND;
-            }
-        } else {
-            /* A non-secure caller is not allowed to specify any client ID to
-             * request a read by reference.
-             */
-            return PSA_SST_ERR_ASSET_NOT_FOUND;
-        }
-    }
-
-    if (tfm_core_get_caller_client_id(&caller_id) != TFM_SUCCESS) {
-        return PSA_SST_ERR_SYSTEM_ERROR;
-    }
-
-    /* Check client ID permissions */
-    db_entry = sst_am_get_db_entry(caller_id, asset_uuid, SST_PERM_READ);
-    if (db_entry == NULL) {
-        return PSA_SST_ERR_ASSET_NOT_FOUND;
-    }
-
-    /* Make a local copy of the iovec data structure */
-    err = validate_copy_validate_iovec(data, &local_data,
-                                       caller_id, TFM_MEMORY_ACCESS_RW);
-    if (err != PSA_SST_ERR_SUCCESS) {
-        return PSA_SST_ERR_ASSET_NOT_FOUND;
-    }
-
-#ifndef SST_ENABLE_PARTIAL_ASSET_RW
-    if (data->offset != 0) {
-        return PSA_SST_ERR_PARAM_ERROR;
-    }
-#endif
-
-    err = sst_object_read(asset_uuid, s_token, local_data.data,
-                          local_data.offset, local_data.size);
-
-    return err;
-}
-
-enum psa_sst_err_t sst_am_write(uint32_t asset_uuid,
-                                const struct tfm_sst_token_t *s_token,
-                                const struct tfm_sst_buf_t *data)
-{
-    struct tfm_sst_buf_t local_data;
-    enum psa_sst_err_t err;
-    struct sst_asset_policy_t *db_entry;
-    int32_t client_id;
-
-    if (tfm_core_get_caller_client_id(&client_id) != TFM_SUCCESS) {
-        return PSA_SST_ERR_SYSTEM_ERROR;
-    }
-
-    /* Check client ID permissions */
-    db_entry = sst_am_get_db_entry(client_id, asset_uuid, SST_PERM_WRITE);
-    if (db_entry == NULL) {
-        return PSA_SST_ERR_ASSET_NOT_FOUND;
-    }
-
-    /* Make a local copy of the iovec data structure */
-    err = validate_copy_validate_iovec(data, &local_data,
-                                       client_id, TFM_MEMORY_ACCESS_RO);
-    if (err != PSA_SST_ERR_SUCCESS) {
-        return PSA_SST_ERR_ASSET_NOT_FOUND;
-    }
-
-    /* Boundary check the incoming request */
-    err = sst_utils_check_contained_in(0, db_entry->max_size,
-                                       local_data.offset, local_data.size);
-
-    if (err != PSA_SST_ERR_SUCCESS) {
-        return err;
-    }
-
-#ifndef SST_ENABLE_PARTIAL_ASSET_RW
-    if (data->offset != 0) {
-        return PSA_SST_ERR_PARAM_ERROR;
-    }
-#endif
-
-    err = sst_object_write(asset_uuid, s_token, local_data.data,
-                           local_data.offset, local_data.size);
-
-    return err;
-}
-
-enum psa_sst_err_t sst_am_delete(uint32_t asset_uuid,
-                                 const struct tfm_sst_token_t *s_token)
-{
-    enum psa_sst_err_t err;
-    struct sst_asset_policy_t *db_entry;
-    int32_t client_id;
-
-    if (tfm_core_get_caller_client_id(&client_id) != TFM_SUCCESS) {
-        return PSA_SST_ERR_SYSTEM_ERROR;
-    }
-
-    db_entry = sst_am_get_db_entry(client_id, asset_uuid, SST_PERM_WRITE);
-    if (db_entry == NULL) {
-        return PSA_SST_ERR_ASSET_NOT_FOUND;
-    }
-
-    err = sst_object_delete(asset_uuid, s_token);
-
-    return err;
-}
diff --git a/secure_fw/services/secure_storage/sst_asset_management.h b/secure_fw/services/secure_storage/sst_asset_management.h
deleted file mode 100644
index 6967c2f..0000000
--- a/secure_fw/services/secure_storage/sst_asset_management.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef __SST_ASSET_MANAGEMENT_H__
-#define __SST_ASSET_MANAGEMENT_H__
-
-#include <stdint.h>
-#include "tfm_sst_defs.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* This define uses the TF-M invalid client ID to specify a direct client read,
- * as that it can not be used to identify a client.
- */
-#define SST_DIRECT_CLIENT_READ  TFM_INVALID_CLIENT_ID
-
-#define SST_PERM_BYPASS     (1<<3) /*!< Permission check bypassed. Used when
-                                    *   secure a secure entity calls as itself
-                                    *   (and not on behalf of another NS client)
-                                    */
-#define SST_PERM_READ       (1<<2) /*!< Client can read this asset */
-#define SST_PERM_WRITE      (1<<1) /*!< Client can write to this asset */
-#define SST_PERM_REFERENCE  (1)    /*!< Client can access this value's meta */
-#define SST_PERM_FORBIDDEN  (0)    /*!< Used when a security
-                                    *   violation detected
-                                    */
-
-struct sst_asset_perm_t {
-    int32_t client_id;  /*!< Client ID */
-    uint8_t perm;       /*!< Permissions bitfield */
-};
-
-struct sst_asset_policy_t {
-    uint32_t type;         /*!< Asset type */
-    uint16_t asset_uuid;   /*!< Asset's unique ID */
-    uint16_t perms_count;  /*!< Number of permissions owned by this asset */
-    uint16_t max_size;     /*!< Policy maximum size fo this asset */
-    uint16_t perms_modes_start_idx; /*!< First permission index */
-};
-
-/**
- * \brief Initializes the secure storage system
- *
- * \return Returns error code as specified in \ref psa_sst_err_t
- */
-enum psa_sst_err_t sst_am_prepare(void);
-
-/**
- * \brief Allocates space for the asset, referenced by asset UUID,
- *        without setting any data in the asset.
- *
- * \param[in] s_token     Pointer to the asset's token \ref tfm_sst_token_t
- * \param[in] asset_uuid  Asset UUID
- *
- * \return Returns error code as specified in \ref psa_sst_err_t
- */
-enum psa_sst_err_t sst_am_create(uint32_t asset_uuid,
-                                 const struct tfm_sst_token_t *s_token);
-
-/**
- * \brief Gets the asset's info referenced by asset UUID.
- *
- * \param[in]  asset_uuid  Asset UUID
- * \param[in]  s_token     Pointer to the asset's token \ref tfm_sst_token_t
- * \param[out] info        Pointer to store the asset's information
- *                         \ref psa_sst_asset_info_t
- *
- * \return Returns error code as specified in \ref psa_sst_err_t
- */
-enum psa_sst_err_t sst_am_get_info(uint32_t asset_uuid,
-                                   const struct tfm_sst_token_t *s_token,
-                                   struct psa_sst_asset_info_t *info);
-
-/**
- * \brief Gets the asset's attributes referenced by asset UUID.
- *
- * \param[in]  asset_uuid  Asset UUID
- * \param[in]  s_token     Pointer to the asset's token \ref tfm_sst_token_t
- * \param[out] attrs       Pointer to store the asset's attributes
- *                         \ref psa_sst_asset_attrs_t
- *
- * \return Returns error code as specified in \ref psa_sst_err_t
- */
-enum psa_sst_err_t sst_am_get_attributes(uint32_t asset_uuid,
-                                         const struct tfm_sst_token_t *s_token,
-                                         struct psa_sst_asset_attrs_t *attrs);
-
-/**
- * \brief Sets the asset's attributes referenced by asset UUID.
- *
- * \param[in] asset_uuid  Asset UUID
- * \param[in] s_token     Pointer to the asset's token \ref tfm_sst_token_t
- * \param[in] attrs       Pointer to new the asset's attributes
- *                        \ref psa_sst_asset_attrs_t
- *
- * \return Returns error code as specified in \ref psa_sst_err_t
- */
-enum psa_sst_err_t sst_am_set_attributes(uint32_t asset_uuid,
-                                     const struct tfm_sst_token_t *s_token,
-                                     const struct psa_sst_asset_attrs_t *attrs);
-
-/**
- * \brief Reads asset's data referenced by asset UUID.
- *
- * \param[in]  client_id   In case, the caller is a secure partition, this
- *                         parameter can be a non-secure or secure client ID if
- *                         the read is in behalf of that client.
- *                         Otherwise, it must be 0.
- * \param[in]  asset_uuid  Asset UUID
- * \param[in]  s_token     Pointer to the asset's token \ref tfm_sst_token_t
- * \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 psa_sst_err_t
- */
-enum psa_sst_err_t sst_am_read(int32_t client_id, uint32_t asset_uuid,
-                               const struct tfm_sst_token_t *s_token,
-                               struct tfm_sst_buf_t *data);
-
-/**
- * \brief Writes data into an asset referenced by asset UUID.
- *
- * \param[in] asset_uuid  Asset UUID
- * \param[in] s_token     Pointer to the asset's token \ref tfm_sst_token_t
- * \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 psa_sst_err_t
- */
-enum psa_sst_err_t sst_am_write(uint32_t asset_uuid,
-                                const struct tfm_sst_token_t *s_token,
-                                const struct tfm_sst_buf_t *data);
-
-/**
- * \brief Deletes the asset referenced by the asset UUID.
- *
- * \param[in] asset_uuid  Asset UUID
- * \param[in] s_token     Pointer to the asset's token \ref tfm_sst_token_t
- *
- * \return Returns error code as specified in \ref psa_sst_err_t
- */
-enum psa_sst_err_t sst_am_delete(uint32_t asset_uuid,
-                                 const struct tfm_sst_token_t *s_token);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SST_ASSET_MANAGEMENT_H__ */
diff --git a/secure_fw/services/secure_storage/tfm_protected_storage.c b/secure_fw/services/secure_storage/tfm_protected_storage.c
new file mode 100644
index 0000000..786be7f
--- /dev/null
+++ b/secure_fw/services/secure_storage/tfm_protected_storage.c
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2019, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+/* Note: A full implementation will be added in another patch. */
+
+#include "tfm_protected_storage.h"
+
+enum tfm_sst_err_t tfm_sst_init(void)
+{
+    return TFM_SST_ERR_SUCCESS;
+}
+
+enum tfm_sst_err_t tfm_sst_set(const psa_ps_uid_t *uid,
+                               uint32_t data_length,
+                               const void *p_data,
+                               psa_ps_create_flags_t create_flags)
+{
+    (void)uid, (void)data_length, (void)p_data, (void)create_flags;
+    return TFM_SST_ERR_NOT_SUPPORTED;
+}
+
+enum tfm_sst_err_t tfm_sst_get(const psa_ps_uid_t *uid,
+                               uint32_t data_offset,
+                               uint32_t data_length,
+                               void *p_data)
+{
+    (void)uid, (void)data_offset, (void)data_length, (void)p_data;
+    return TFM_SST_ERR_NOT_SUPPORTED;
+}
+
+enum tfm_sst_err_t tfm_sst_get_info(const psa_ps_uid_t *uid,
+                                    struct psa_ps_info_t *p_info)
+{
+    (void)uid, (void)p_info;
+    return TFM_SST_ERR_NOT_SUPPORTED;
+}
+
+enum tfm_sst_err_t tfm_sst_remove(const psa_ps_uid_t *uid)
+{
+    (void)uid, (void)uid;
+    return TFM_SST_ERR_NOT_SUPPORTED;
+}
+
+enum tfm_sst_err_t tfm_sst_get_support(uint32_t *support_flags)
+{
+    (void)support_flags;
+    return TFM_SST_ERR_NOT_SUPPORTED;
+}
diff --git a/secure_fw/services/secure_storage/tfm_protected_storage.h b/secure_fw/services/secure_storage/tfm_protected_storage.h
new file mode 100644
index 0000000..f8e17d9
--- /dev/null
+++ b/secure_fw/services/secure_storage/tfm_protected_storage.h
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 2019, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#ifndef __TFM_PROTECTED_STORAGE_H__
+#define __TFM_PROTECTED_STORAGE_H__
+
+#include <stdint.h>
+
+#include "psa_protected_storage.h"
+#include "tfm_sst_defs.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief Initializes the secure storage system.
+ *
+ * \return A status indicating the success/failure of the operation as specified
+ *         in \ref tfm_sst_err_t
+ *
+ * \retval TFM_SST_ERR_SUCCESS            The operation completed successfully
+ * \retval TFM_SST_ERROR_STORAGE_FAILURE  The operation failed because the
+ *                                        storage system initialization has
+ *                                        failed (fatal error)
+ * \retval TFM_SST_ERR_OPERATION_FAILED   The operation failed because of an
+ *                                        unspecified internal failure
+ */
+enum tfm_sst_err_t tfm_sst_init(void);
+
+/**
+ * \brief Creates a new or modifies an existing asset.
+ *
+ * \param[in] uid           Pointer to the unique identifier for the data
+ * \param[in] data_length   The size in bytes of the data in `p_data`
+ * \param[in] p_data        A buffer containing the data
+ * \param[in] create_flags  The flags indicating the properties of the data
+ *
+ * \return A status indicating the success/failure of the operation as specified
+ *         in \ref tfm_sst_err_t
+ *
+ * \retval TFM_SST_ERR_SUCCESS              The operation completed successfully
+ * \retval TFM_SST_ERR_WRITE_ONCE           The operation failed because the
+ *                                          provided uid value was already
+ *                                          created with PSA_PS_FLAG_WRITE_ONCE
+ * \retval TFM_SST_ERR_INVALID_ARGUMENT     The operation failed because one or
+ *                                          more of the given arguments were
+ *                                          invalid (null pointer, etc.)
+ * \retval TFM_SST_ERR_FLAGS_NOT_SUPPORTED  The operation failed because one or
+ *                                          more of the flags provided in
+ *                                          `create_flags` is not supported or
+ *                                          is not valid
+ * \retval TFM_SST_ERR_INSUFFICIENT_SPACE   The operation failed because there
+ *                                          was insufficient space on the
+ *                                          storage medium
+ * \retval TFM_SST_ERR_STORAGE_FAILURE      The operation failed because the
+ *                                          physical storage has failed (fatal
+ *                                          error)
+ * \retval TFM_SST_ERR_OPERATION_FAILED     The operation failed because of an
+ *                                          unspecified internal failure
+ */
+enum tfm_sst_err_t tfm_sst_set(const psa_ps_uid_t *uid,
+                               uint32_t data_length,
+                               const void *p_data,
+                               psa_ps_create_flags_t create_flags);
+
+/**
+ * \brief Gets the asset data for the provided uid.
+ *
+ * \param[in]  uid          Pointer to the unique identifier for the data
+ * \param[in]  data_offset  The offset within the data associated with the `uid`
+ *                          to start retrieving data
+ * \param[in]  data_length  The amount of data to read (and the minimum
+ *                          allocated size of the `p_data` buffer)
+ * \param[out] p_data       The buffer where the data will be placed upon
+ *                          successful completion
+ *
+ * \return A status indicating the success/failure of the operation as specified
+ *         in \ref tfm_sst_err_t
+ *
+ * \retval TFM_SST_ERR_SUCCESS           The operation completed successfully
+ * \retval TFM_SST_ERR_INVALID_ARGUMENT  The operation failed because one or
+ *                                       more of the given arguments were
+ *                                       invalid (null pointer, etc.)
+ * \retval TFM_SST_ERR_UID_NOT_FOUND     The operation failed because the
+ *                                       provided uid value was not found in the
+ *                                       storage
+ * \retval TFM_SST_ERR_INCORRECT_SIZE    The operation failed because the data
+ *                                       associated with provided uid is not the
+ *                                       same size as `data_size`
+ * \retval TFM_SST_ERR_STORAGE_FAILURE   The operation failed because the
+ *                                       physical storage has failed (fatal
+ *                                       error)
+ * \retval TFM_SST_ERR_OPERATION_FAILED  The operation failed because of an
+ *                                       unspecified internal failure
+ * \retval TFM_SST_ERR_DATA_CORRUPT      The operation failed because the data
+ *                                       associated with the UID was corrupt
+ * \retval TFM_SST_ERR_AUTH_FAILED       The operation failed because the data
+ *                                       associated with the UID failed
+ *                                       authentication
+ */
+enum tfm_sst_err_t tfm_sst_get(const psa_ps_uid_t *uid,
+                               uint32_t data_offset,
+                               uint32_t data_length,
+                               void *p_data);
+
+/**
+ * \brief Gets the metadata for the provided uid.
+ *
+ * \param[in]  uid     Pointer to the unique identifier for the data
+ * \param[out] p_info  A pointer to the `psa_ps_info_t` struct that will be
+ *                     populated with the metadata
+ *
+ * \return A status indicating the success/failure of the operation as specified
+ *         in \ref tfm_sst_err_t
+ *
+ * \retval TFM_SST_ERR_SUCCESS           The operation completed successfully
+ * \retval TFM_SST_ERR_INVALID_ARGUMENT  The operation failed because one or
+ *                                       more of the given arguments were
+ *                                       invalid (null pointer, etc.)
+ * \retval TFM_SST_ERR_UID_NOT_FOUND     The operation failed because the
+ *                                       provided uid value was not found in the
+ *                                       storage
+ * \retval TFM_SST_ERR_STORAGE_FAILURE   The operation failed because the
+ *                                       physical storage has failed (fatal
+ *                                       error)
+ * \retval TFM_SST_ERR_OPERATION_FAILED  The operation failed because of an
+ *                                       unspecified internal failure
+ * \retval TFM_SST_ERR_DATA_CORRUPT      The operation failed because the data
+ *                                       associated with the UID was corrupt
+ * \retval TFM_SST_ERR_AUTH_FAILED       The operation failed because the data
+ *                                       associated with the UID failed
+ *                                       authentication
+ */
+enum tfm_sst_err_t tfm_sst_get_info(const psa_ps_uid_t *uid,
+                                    struct psa_ps_info_t *p_info);
+
+/**
+ * \brief Removes the provided uid and its associated data from storage.
+ *
+ * \param[in] uid  Pointer to the unique identifier for the data to be removed
+ *
+ * \return A status indicating the success/failure of the operation as specified
+ *         in \ref tfm_sst_err_t
+ *
+ * \retval TFM_SST_ERR_SUCCESS           The operation completed successfully
+ * \retval TFM_SST_ERR_INVALID_ARGUMENT  The operation failed because one or
+ *                                       more of the given arguments were
+ *                                       invalid (null pointer, etc.)
+ * \retval TFM_SST_ERR_UID_NOT_FOUND     The operation failed because the
+ *                                       provided uid value was not found in the
+ *                                       storage
+ * \retval TFM_SST_ERR_WRITE_ONCE        The operation failed because the
+ *                                       provided uid value was created with
+ *                                       PSA_PS_WRITE_ONCE_FLAG
+ * \retval TFM_SST_ERR_STORAGE_FAILURE   The operation failed because the
+ *                                       physical storage has failed (fatal
+ *                                       error)
+ * \retval TFM_SST_ERR_OPERATION_FAILED  The operation failed because of an
+ *                                       unspecified internal failure
+ */
+enum tfm_sst_err_t tfm_sst_remove(const psa_ps_uid_t *uid);
+
+/**
+ * \brief Gets a bitmask with flags set for all of the optional features
+ *        supported by the implementation.
+ *
+ * \param[out] support_flags  A pointer to a variable that will be populated
+ *                            with a uint32_t bitmask value which contains all
+ *                            the bits set for all the optional features
+ *                            supported by the implementation
+ *
+ * \return A status indicating the success/failure of the operation as specified
+ *         in \ref tfm_sst_err_t
+ *
+ * \retval TFM_SST_ERR_SUCCESS           The operation completed successfully
+ * \retval TFM_SST_ERR_OPERATION_FAILED  The operation failed because of an
+ *                                       unspecified internal failure
+ */
+enum tfm_sst_err_t tfm_sst_get_support(uint32_t *support_flags);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TFM_PROTECTED_STORAGE_H__ */
diff --git a/secure_fw/services/secure_storage/tfm_sst_secure_api.c b/secure_fw/services/secure_storage/tfm_sst_secure_api.c
index 78bb4b3..c9ff324 100644
--- a/secure_fw/services/secure_storage/tfm_sst_secure_api.c
+++ b/secure_fw/services/secure_storage/tfm_sst_secure_api.c
@@ -1,157 +1,89 @@
 /*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
  */
 
-#include "psa_sst_api.h"
+#include "psa_protected_storage.h"
 #include "tfm_sst_veneers.h"
-#include "tfm_secure_api.h"
-#include "secure_fw/services/secure_storage/sst_asset_management.h"
 
 __attribute__(( section("SFN")))
-enum psa_sst_err_t psa_sst_create(uint32_t asset_uuid, const uint8_t *token,
-                                  uint32_t token_size)
+psa_ps_status_t psa_ps_set(psa_ps_uid_t uid,
+                           uint32_t data_length,
+                           const void *p_data,
+                           psa_ps_create_flags_t create_flags)
 {
-    struct tfm_sst_token_t s_token;
+    enum tfm_sst_err_t err;
 
-    /* Pack the token information in the token structure */
-    s_token.token = token;
-    s_token.token_size = token_size;
+    err = tfm_sst_veneer_set(&uid, data_length, p_data, create_flags);
 
-    return tfm_sst_veneer_create(asset_uuid, &s_token);
-
+    return TFM_SST_PSA_RETURN(err);
 }
 
 __attribute__(( section("SFN")))
-enum psa_sst_err_t psa_sst_get_info(uint32_t asset_uuid,
-                                    const uint8_t *token,
-                                    uint32_t token_size,
-                                    struct psa_sst_asset_info_t *info)
+psa_ps_status_t psa_ps_get(psa_ps_uid_t uid,
+                           uint32_t data_offset,
+                           uint32_t data_length,
+                           void *p_data)
 {
-    struct tfm_sst_token_t s_token;
+    enum tfm_sst_err_t err;
 
-    /* Pack the token information in the token structure */
-    s_token.token = token;
-    s_token.token_size = token_size;
+    err = tfm_sst_veneer_get(&uid, data_offset, data_length, p_data);
 
-    return tfm_sst_veneer_get_info(asset_uuid, &s_token, info);
+    return TFM_SST_PSA_RETURN(err);
 }
 
 __attribute__(( section("SFN")))
-enum psa_sst_err_t psa_sst_get_attributes(uint32_t asset_uuid,
-                                          const uint8_t *token,
-                                          uint32_t token_size,
-                                          struct psa_sst_asset_attrs_t *attrs)
+psa_ps_status_t psa_ps_get_info(psa_ps_uid_t uid, struct psa_ps_info_t *p_info)
 {
-    struct tfm_sst_token_t s_token;
+    enum tfm_sst_err_t err;
 
-    /* Pack the token information in the token structure */
-    s_token.token = token;
-    s_token.token_size = token_size;
+    err = tfm_sst_veneer_get_info(&uid, p_info);
 
-    return tfm_sst_veneer_get_attributes(asset_uuid, &s_token, attrs);
+    return TFM_SST_PSA_RETURN(err);
 }
 
 __attribute__(( section("SFN")))
-enum psa_sst_err_t psa_sst_set_attributes(uint32_t asset_uuid,
-                                      const uint8_t *token,
-                                      uint32_t token_size,
-                                      const struct psa_sst_asset_attrs_t *attrs)
+psa_ps_status_t psa_ps_remove(psa_ps_uid_t uid)
 {
-    struct tfm_sst_token_t s_token;
+    enum tfm_sst_err_t err;
 
-    /* Pack the token information in the token structure */
-    s_token.token = token;
-    s_token.token_size = token_size;
+    err = tfm_sst_veneer_remove(&uid);
 
-    return tfm_sst_veneer_set_attributes(asset_uuid, &s_token, attrs);
+    return TFM_SST_PSA_RETURN(err);
 }
 
 __attribute__(( section("SFN")))
-enum psa_sst_err_t psa_sst_read(uint32_t asset_uuid,
-                                const uint8_t *token,
-                                uint32_t token_size,
-                                uint32_t size,
-                                uint32_t offset,
-                                uint8_t *data)
+psa_ps_status_t psa_ps_create(psa_ps_uid_t uid, uint32_t size,
+                              psa_ps_create_flags_t create_flags)
 {
-    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_sst_veneer_read(SST_DIRECT_CLIENT_READ,
-                               asset_uuid,
-                               &s_token,
-                               &s_data);
+    (void)uid, (void)size, (void)create_flags;
+    return PSA_PS_ERROR_NOT_SUPPORTED;
 }
 
 __attribute__(( section("SFN")))
-enum psa_sst_err_t psa_sst_reference_read(int32_t  client_id,
-                                          uint32_t asset_uuid,
-                                          const uint8_t *token,
-                                          uint32_t token_size,
-                                          uint32_t size,
-                                          uint32_t offset,
-                                          uint8_t *data)
+psa_ps_status_t psa_ps_set_extended(psa_ps_uid_t uid, uint32_t data_offset,
+                                    uint32_t data_length, const void *p_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_sst_veneer_read(client_id, asset_uuid, &s_token, &s_data);
+    (void)uid, (void)data_offset, (void)data_length, (void)p_data;
+    return PSA_PS_ERROR_NOT_SUPPORTED;
 }
 
 __attribute__(( section("SFN")))
-enum psa_sst_err_t psa_sst_write(uint32_t asset_uuid,
-                                 const uint8_t *token,
-                                 uint32_t token_size,
-                                 uint32_t size,
-                                 uint32_t offset,
-                                 const uint8_t *data)
+uint32_t psa_ps_get_support(void)
 {
-    struct tfm_sst_token_t s_token;
-    struct tfm_sst_buf_t   s_data;
+    uint32_t support_flags;
 
-    /* Pack the token information in the token structure */
-    s_token.token = token;
-    s_token.token_size = token_size;
+    /* Initialise support_flags to a sensible default, to avoid returning an
+     * uninitialised value in case the secure function fails.
+     */
+    support_flags = 0;
 
-    /* Pack buffer information in the buffer structure */
-    s_data.size = size;
-    s_data.offset = offset;
-    s_data.data = (uint8_t *)data;
+    /* The PSA API does not return an error, so any error from TF-M is
+     * ignored.
+     */
+    (void)tfm_sst_veneer_get_support(&support_flags);
 
-    return tfm_sst_veneer_write(asset_uuid, &s_token, &s_data);
-}
-
-__attribute__(( section("SFN")))
-enum psa_sst_err_t psa_sst_delete(uint32_t asset_uuid,
-                                  const uint8_t *token,
-                                  uint32_t token_size)
-{
-    struct tfm_sst_token_t s_token;
-
-    /* Pack the token information in the token structure */
-    s_token.token = token;
-    s_token.token_size = token_size;
-
-    return tfm_sst_veneer_delete(asset_uuid, &s_token);
+    return support_flags;
 }
diff --git a/secure_fw/services/tfm_partition_defs.inc b/secure_fw/services/tfm_partition_defs.inc
index a84c54b..bba652c 100644
--- a/secure_fw/services/tfm_partition_defs.inc
+++ b/secure_fw/services/tfm_partition_defs.inc
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
diff --git a/secure_fw/services/tfm_partition_defs.inc.template b/secure_fw/services/tfm_partition_defs.inc.template
index 6c93c77..ad05eeb 100644
--- a/secure_fw/services/tfm_partition_defs.inc.template
+++ b/secure_fw/services/tfm_partition_defs.inc.template
@@ -1,5 +1,5 @@
 /*

- * Copyright (c) 2018, Arm Limited. All rights reserved.

+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.

  *

  * SPDX-License-Identifier: BSD-3-Clause

  *

diff --git a/secure_fw/services/tfm_partition_list.inc b/secure_fw/services/tfm_partition_list.inc
index 57dd18f..260dbc6 100644
--- a/secure_fw/services/tfm_partition_list.inc
+++ b/secure_fw/services/tfm_partition_list.inc
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -12,7 +12,7 @@
 
 /******** TFM_SP_STORAGE ********/
 PARTITION_DECLARE(TFM_SP_STORAGE, SPM_PART_FLAG_SECURE | SPM_PART_FLAG_TRUSTED);
-PARTITION_ADD_INIT_FUNC(TFM_SP_STORAGE, sst_am_prepare);
+PARTITION_ADD_INIT_FUNC(TFM_SP_STORAGE, tfm_sst_init);
 
 /******** TFM_SP_AUDIT_LOG ********/
 PARTITION_DECLARE(TFM_SP_AUDIT_LOG, SPM_PART_FLAG_SECURE | SPM_PART_FLAG_TRUSTED);
diff --git a/secure_fw/services/tfm_partition_list.inc.template b/secure_fw/services/tfm_partition_list.inc.template
index 7cc1993..3c5812b 100644
--- a/secure_fw/services/tfm_partition_list.inc.template
+++ b/secure_fw/services/tfm_partition_list.inc.template
@@ -1,5 +1,5 @@
 /*

- * Copyright (c) 2018, Arm Limited. All rights reserved.

+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.

  *

  * SPDX-License-Identifier: BSD-3-Clause

  *

diff --git a/secure_fw/services/tfm_sfid_list.inc b/secure_fw/services/tfm_sfid_list.inc
index 4e56af4..5d08aa6 100644
--- a/secure_fw/services/tfm_sfid_list.inc
+++ b/secure_fw/services/tfm_sfid_list.inc
@@ -11,13 +11,11 @@
 #define __TFM_SFID_LIST_INC__
 
     /******** TFM_SP_STORAGE ********/
-    {sst_am_create, SST_AM_CREATE_SFID},
-    {sst_am_get_info, SST_AM_GET_INFO_SFID},
-    {sst_am_get_attributes, SST_AM_GET_ATTRIBUTES_SFID},
-    {sst_am_set_attributes, SST_AM_SET_ATTRIBUTES_SFID},
-    {sst_am_read, SST_AM_READ_SFID},
-    {sst_am_write, SST_AM_WRITE_SFID},
-    {sst_am_delete, SST_AM_DELETE_SFID},
+    {tfm_sst_set, TFM_SST_SET_SFID},
+    {tfm_sst_get, TFM_SST_GET_SFID},
+    {tfm_sst_get_info, TFM_SST_GET_INFO_SFID},
+    {tfm_sst_remove, TFM_SST_REMOVE_SFID},
+    {tfm_sst_get_support, TFM_SST_GET_SUPPORT_SFID},
 
     /******** TFM_SP_AUDIT_LOG ********/
     {audit_core_retrieve_record, TFM_AUDIT_RETRIEVE_RECORD_SFID},
diff --git a/secure_fw/services/tfm_sfid_list.inc.template b/secure_fw/services/tfm_sfid_list.inc.template
index 08e5918..7f9bb92 100644
--- a/secure_fw/services/tfm_sfid_list.inc.template
+++ b/secure_fw/services/tfm_sfid_list.inc.template
@@ -1,5 +1,5 @@
 /*

- * Copyright (c) 2018, Arm Limited. All rights reserved.

+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.

  *

  * SPDX-License-Identifier: BSD-3-Clause

  *