Platform: Rename NV counter enumerators
Rename the enumerators of the tfm_nv_counter_t enumeration to
eliminate any names related to other modules of TF-M.
Change-Id: I2cc1435c74ea1c27c72264a5f0b1fd8abab7dba2
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/platform/include/tfm_plat_nv_counters.h b/platform/include/tfm_plat_nv_counters.h
index c987ed7..26e213b 100644
--- a/platform/include/tfm_plat_nv_counters.h
+++ b/platform/include/tfm_plat_nv_counters.h
@@ -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
*
@@ -19,9 +19,9 @@
#include "tfm_plat_defs.h"
enum tfm_nv_counter_t {
- TFM_SST_NV_COUNTER_1 = 0,
- TFM_SST_NV_COUNTER_2,
- TFM_SST_NV_COUNTER_3,
+ PLAT_NV_COUNTER_0 = 0, /* Used by SST service */
+ PLAT_NV_COUNTER_1, /* Used by SST service */
+ PLAT_NV_COUNTER_2, /* Used by SST service */
};
#ifdef __cplusplus
diff --git a/secure_fw/services/secure_storage/nv_counters/sst_nv_counters.h b/secure_fw/services/secure_storage/nv_counters/sst_nv_counters.h
index d7bd31a..b15ec65 100644
--- a/secure_fw/services/secure_storage/nv_counters/sst_nv_counters.h
+++ b/secure_fw/services/secure_storage/nv_counters/sst_nv_counters.h
@@ -20,7 +20,11 @@
#include "psa_protected_storage.h"
#include "platform/include/tfm_plat_nv_counters.h"
-#define SST_NV_COUNTER_SIZE 4 /* In bytes */
+#define TFM_SST_NV_COUNTER_1 PLAT_NV_COUNTER_0
+#define TFM_SST_NV_COUNTER_2 PLAT_NV_COUNTER_1
+#define TFM_SST_NV_COUNTER_3 PLAT_NV_COUNTER_2
+
+#define SST_NV_COUNTER_SIZE 4 /* In bytes */
#ifdef __cplusplus
extern "C" {
diff --git a/test/suites/sst/secure/sst_rollback_protection_testsuite.c b/test/suites/sst/secure/sst_rollback_protection_testsuite.c
index cd26feb..2df7e66 100644
--- a/test/suites/sst/secure/sst_rollback_protection_testsuite.c
+++ b/test/suites/sst/secure/sst_rollback_protection_testsuite.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <string.h>
+#include "secure_fw/services/secure_storage/nv_counters/sst_nv_counters.h"
#include "nv_counters/test_sst_nv_counters.h"
#include "psa_protected_storage.h"
#include "secure_fw/core/tfm_memory_utils.h"