feat(unittests): add a unit test framework.

This patch adds all the infrastructure needed to run unit tests for
RMM, including a new variant for platform host, called `host_test`.

To build and run the tests:

cmake -DRMM_CONFIG=host_defcfg -DHOST_VARIANT=host_test \
  -DCMAKE_BUILD_TYPE=Debug -S ${RMM_SOURCE_DIR} -B ${RMM_BUILD_DIR}
cmake --build ${RMM_BUILD_DIR} -- run-unittests

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: If16686e111d91c563f8e7281d4ee7ca2864125ae
diff --git a/lib/arch/include/fake_host/memory.h b/lib/arch/include/fake_host/memory.h
index 3f10f44..3f182a4 100644
--- a/lib/arch/include/fake_host/memory.h
+++ b/lib/arch/include/fake_host/memory.h
@@ -14,27 +14,27 @@
 {
 	*ptr = val;
 }
-#define SCA_WRITE64(_p, _v) __sca_write64((void *)(_p), ((uint64_t)(_v)))
+#define SCA_WRITE64(_p, _v) __sca_write64((uint64_t *)(_p), ((uint64_t)(_v)))
 
 /* Single-Copy Atomic 64-bit write with RELEASE memory ordering semantics*/
 static inline void __sca_write64_release(uint64_t *ptr, uint64_t val)
 {
 	*ptr = val;
 }
-#define SCA_WRITE64_RELEASE(_p, _v) __sca_write64_release((void *)(_p), ((uint64_t)(_v)))
+#define SCA_WRITE64_RELEASE(_p, _v) __sca_write64_release((uint64_t *)(_p), ((uint64_t)(_v)))
 
 /* Single-Copy Atomic 64-bit read */
 static inline uint64_t __sca_read64(uint64_t *ptr)
 {
 	return *ptr;
 }
-#define SCA_READ64(_p) ((typeof(*(_p)))__sca_read64((void *)(_p)))
+#define SCA_READ64(_p) ((typeof(*(_p)))__sca_read64((uint64_t *)(_p)))
 
 /* Single-Copy Atomic 64-bit read with ACQUIRE memory ordering semantics */
 static inline uint64_t __sca_read64_acquire(uint64_t *ptr)
 {
 	return *ptr;
 }
-#define SCA_READ64_ACQUIRE(_p) ((typeof(*(_p)))__sca_read64_acquire((void *)(_p)))
+#define SCA_READ64_ACQUIRE(_p) ((typeof(*(_p)))__sca_read64_acquire((uint64_t *)(_p)))
 
 #endif /* MEMORY_H */