Attest: Use macros generated by tools
- Use the SID and service version defined in sid.h.
- Use signal defined in tfm_initial_attestation.h.
- Remove tfm_attest_defs.h and tfm_attest_signal.h.
Change-Id: I36a5be19c8d89ca1e9dfb5978438bb0e66f3cde7
Signed-off-by: Edison Ai <edison.ai@arm.com>
diff --git a/interface/include/tfm_attest_defs.h b/interface/include/tfm_attest_defs.h
deleted file mode 100644
index 5cbca7a..0000000
--- a/interface/include/tfm_attest_defs.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2019, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef __TFM_ATTEST_DEFS_H__
-#define __TFM_ATTEST_DEFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef TFM_PSA_API
-/*
- * Defines for SID and minor version number. These SIDs must align with the
- * value in service manifest file.
- */
-#define TFM_ATTEST_GET_TOKEN_SID (0x00000020)
-#define TFM_ATTEST_GET_TOKEN_MINOR_VER (0x0001)
-#define TFM_ATTEST_GET_TOKEN_SIZE_SID (0x00000021)
-#define TFM_ATTEST_GET_TOKEN_SIZE_MINOR_VER (0x0001)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TFM_ATTEST_DEFS_H__ */
\ No newline at end of file
diff --git a/interface/src/tfm_initial_attestation_api.c b/interface/src/tfm_initial_attestation_api.c
index 9d00214..7324b1f 100644
--- a/interface/src/tfm_initial_attestation_api.c
+++ b/interface/src/tfm_initial_attestation_api.c
@@ -10,7 +10,7 @@
#include "tfm_ns_lock.h"
#include "psa/client.h"
#ifdef TFM_PSA_API
-#include "tfm_attest_defs.h"
+#include "psa_manifest/sid.h"
#endif
#define IOVEC_LEN(x) (sizeof(x)/sizeof(x[0]))
@@ -36,7 +36,7 @@
#ifdef TFM_PSA_API
handle = psa_connect(TFM_ATTEST_GET_TOKEN_SID,
- TFM_ATTEST_GET_TOKEN_MINOR_VER);
+ TFM_ATTEST_GET_TOKEN_VERSION);
if (handle <= 0) {
return PSA_ATTEST_ERR_GENERAL;
}
@@ -85,7 +85,7 @@
#ifdef TFM_PSA_API
handle = psa_connect(TFM_ATTEST_GET_TOKEN_SIZE_SID,
- TFM_ATTEST_GET_TOKEN_SIZE_MINOR_VER);
+ TFM_ATTEST_GET_TOKEN_SIZE_VERSION);
if (handle <= 0) {
return PSA_ATTEST_ERR_GENERAL;
}