diff options
Diffstat (limited to 'tftf')
-rw-r--r-- | tftf/framework/framework.mk | 6 | ||||
-rw-r--r-- | tftf/framework/tftf.ld.S | 10 | ||||
-rw-r--r-- | tftf/tests/tests-smcfuzzing.mk | 12 | ||||
-rw-r--r-- | tftf/tests/tests-smcfuzzing.xml | 15 |
4 files changed, 40 insertions, 3 deletions
diff --git a/tftf/framework/framework.mk b/tftf/framework/framework.mk index 34601c2d6..4ca1d4258 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 364753fe9..9374206f1 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 000000000..82b6a7c85 --- /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 000000000..c549e478c --- /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> |