feat(cbmc): add host target for CBMC
Change-Id: Id7d043b691aa3f70f4c1c161360c276bc7eb50b1
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/docs/getting_started/build-options.rst b/docs/getting_started/build-options.rst
index 9c525d7..985fc6b 100644
--- a/docs/getting_started/build-options.rst
+++ b/docs/getting_started/build-options.rst
@@ -271,7 +271,7 @@
MBEDTLS_ECP_MAX_OPS ,248 - ,1000 ,"Number of max operations per ECC signing iteration"
RMM_FPU_USE_AT_REL2 ,ON | OFF ,OFF(fake_host) ON(aarch64),"Enable FPU/SIMD usage in RMM."
RMM_MAX_GRANULES , ,0 ,"Maximum number of memory granules available to the system"
- HOST_VARIANT ,host_build | host_test ,host_build ,"Variant to build for the host platform. Only available when RMM_PLATFORM=host"
+ HOST_VARIANT ,host_build | host_test | host_cbmc ,host_build ,"Variant to build for the host platform. Only available when RMM_PLATFORM=host"
HOST_MEM_SIZE , ,0x40000000 ,"Host memory size that will be used as physical granules"
RMM_COVERAGE ,ON | OFF ,OFF ,"Enable coverage analysis"
RMM_HTML_COV_REPORT ,ON | OFF ,ON ,"Enable HTML output report for coverage analysis"
diff --git a/plat/host/CMakeLists.txt b/plat/host/CMakeLists.txt
index 7c4a14a..600cbee 100644
--- a/plat/host/CMakeLists.txt
+++ b/plat/host/CMakeLists.txt
@@ -7,7 +7,7 @@
NAME HOST_VARIANT
HELP "Select the variant to use for the host platform"
TYPE STRING
- STRINGS "host_build" "host_test"
+ STRINGS "host_build" "host_test" "host_cbmc"
DEFAULT "host_build")
arm_config_option(
diff --git a/plat/host/host_cbmc/CMakeLists.txt b/plat/host/host_cbmc/CMakeLists.txt
new file mode 100644
index 0000000..7562bb0
--- /dev/null
+++ b/plat/host/host_cbmc/CMakeLists.txt
@@ -0,0 +1,18 @@
+#
+# SPDX-License-Identifier: BSD-3-Clause
+# SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
+#
+
+add_library(rmm-plat-host_cbmc)
+
+target_link_libraries(rmm-plat-host_cbmc
+ PRIVATE rmm-lib
+ PUBLIC rmm-host-common)
+
+target_sources(rmm-plat-host_cbmc
+ PRIVATE "src/host_harness.c")
+
+target_include_directories(rmm-plat-host_cbmc
+ PUBLIC "include")
+
+add_library(rmm-platform ALIAS rmm-plat-host_cbmc)
diff --git a/plat/host/host_cbmc/src/host_harness.c b/plat/host/host_cbmc/src/host_harness.c
new file mode 100644
index 0000000..961f219
--- /dev/null
+++ b/plat/host/host_cbmc/src/host_harness.c
@@ -0,0 +1,19 @@
+/*
+ * SPDX-License-Identifier: BSD-3-Clause
+ * SPDX-FileCopyrightText: Copyright TF-RMM Contributors.
+ */
+
+#include <buffer.h>
+#include <host_harness.h>
+
+void *host_buffer_arch_map(unsigned int slot, unsigned long addr)
+{
+ (void)slot;
+
+ return (void *)addr;
+}
+
+void host_buffer_arch_unmap(void *buf)
+{
+ (void)buf;
+}