aboutsummaryrefslogtreecommitdiff
path: root/tftf
diff options
context:
space:
mode:
authorJoanna Farley <joanna.farley@arm.com>2020-10-21 13:06:20 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2020-10-21 13:06:20 +0000
commit7f7bcfde74ff7043fd340e8b1c5744a8742b1bc7 (patch)
tree1d46cf86c959bd7dba0963889fc6855c8a535ab8 /tftf
parentee0cdc49fd7f7a6c91ef2dae5a0975492db068dc (diff)
parente7810b57c8e671f3b10f7dc901ac3712109564e9 (diff)
downloadtf-a-tests-7f7bcfde74ff7043fd340e8b1c5744a8742b1bc7.tar.gz
Merge "SMC fuzzing module integration."
Diffstat (limited to 'tftf')
-rw-r--r--tftf/framework/framework.mk6
-rw-r--r--tftf/framework/tftf.ld.S10
-rw-r--r--tftf/tests/tests-smcfuzzing.mk12
-rw-r--r--tftf/tests/tests-smcfuzzing.xml15
4 files changed, 40 insertions, 3 deletions
diff --git a/tftf/framework/framework.mk b/tftf/framework/framework.mk
index 34601c2d..4ca1d425 100644
--- a/tftf/framework/framework.mk
+++ b/tftf/framework/framework.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018-2019, Arm Limited. All rights reserved.
+# Copyright (c) 2018-2020, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -8,6 +8,7 @@ AUTOGEN_DIR := $(BUILD_PLAT)/autogen
include lib/xlat_tables_v2/xlat_tables.mk
include lib/compiler-rt/compiler-rt.mk
+include lib/libfdt/libfdt.mk
TFTF_INCLUDES := \
-I${AUTOGEN_DIR} \
@@ -26,7 +27,8 @@ TFTF_INCLUDES := \
-Iinclude/runtime_services/secure_el1_payloads \
-Ispm/cactus \
-Ispm/ivy \
- -Ispm/quark
+ -Ispm/quark \
+ -Ismc_fuzz/include
FRAMEWORK_SOURCES := ${AUTOGEN_DIR}/tests_list.c
diff --git a/tftf/framework/tftf.ld.S b/tftf/framework/tftf.ld.S
index 364753fe..9374206f 100644
--- a/tftf/framework/tftf.ld.S
+++ b/tftf/framework/tftf.ld.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -75,6 +75,14 @@ SECTIONS
} >RAM
/*
+ * The SMC fuzzing module requires alignment due to malloc
+ * constraints. Also size must be at least around 64K
+ */
+ smcfuzz (NOLOAD) : {
+ *(smcfuzz)
+ } >RAM
+
+ /*
* The base address of the coherent memory section must be page-aligned (4K)
* to guarantee that the coherent data are stored on their own pages and
* are not mixed with normal data. This is required to set up the correct
diff --git a/tftf/tests/tests-smcfuzzing.mk b/tftf/tests/tests-smcfuzzing.mk
new file mode 100644
index 00000000..82b6a7c8
--- /dev/null
+++ b/tftf/tests/tests-smcfuzzing.mk
@@ -0,0 +1,12 @@
+#
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+TESTS_SOURCES += \
+ $(addprefix smc_fuzz/src/, \
+ randsmcmod.c \
+ smcmalloc.c \
+ fifo3d.c \
+ )
diff --git a/tftf/tests/tests-smcfuzzing.xml b/tftf/tests/tests-smcfuzzing.xml
new file mode 100644
index 00000000..c549e478
--- /dev/null
+++ b/tftf/tests/tests-smcfuzzing.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright (c) 2020, Arm Limited. All rights reserved.
+
+ SPDX-License-Identifier: BSD-3-Clause
+-->
+
+<testsuites>
+
+ <testsuite name="smcfuzzing" description="smcfuzzing test framework">
+ <testcase name="SMC fuzzing top level function" function="smc_fuzzing_top" />
+ </testsuite>
+
+</testsuites>