refact(trng): cleanup TRNG service tests
This patch adds the following changes:
1. Updates tftf-docs on the TRNG test support
2. Improvise few other files and macro names
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I69bbcb24e8485d2cd1384970e7424541d11838af
diff --git a/include/runtime_services/trng.h b/include/runtime_services/trng.h
index a5d8e4d..41600b4 100644
--- a/include/runtime_services/trng.h
+++ b/include/runtime_services/trng.h
@@ -42,12 +42,12 @@
#define SMC_TRNG_RND 0x84000053
#define TRNG_MAX_BITS U(96)
#define TRNG_ENTROPY_MASK U(0xFFFFFFFF)
-#endif
+#endif /* __aarch64__ */
/*
* Number of TRNG calls defined in the TRNG specification.
*/
-#define TRNG_NUM_CALLS 4
+#define TRNG_NUM_CALLS (4U)
#ifndef __ASSEMBLY__
typedef struct {
@@ -67,17 +67,16 @@
/*******************************************************************************
* TRNG version
******************************************************************************/
-#define TRNG_MAJOR_VER_SHIFT (16)
-#define TRNG_VERSION(major, minor) ((major << TRNG_MAJOR_VER_SHIFT) \
- | minor)
+#define TRNG_MAJOR_VER_SHIFT (16)
+#define TRNG_VERSION(major, minor) ((major << TRNG_MAJOR_VER_SHIFT)| minor)
/*******************************************************************************
* TRNG error codes
******************************************************************************/
-#define TRNG_E_SUCCESS (0)
-#define TRNG_E_NOT_SUPPORTED (-1)
-#define TRNG_E_INVALID_PARAMS (-2)
-#define TRNG_E_NO_ENTOPY (-3)
-#define TRNG_E_NOT_IMPLEMENTED (-4)
+#define TRNG_E_SUCCESS (0)
+#define TRNG_E_NOT_SUPPORTED (-1)
+#define TRNG_E_INVALID_PARAMS (-2)
+#define TRNG_E_NO_ENTROPY (-3)
+#define TRNG_E_NOT_IMPLEMENTED (-4)
#endif /* __TRNG_H__ */