diff options
author | Mark Dykes <mark.dykes@arm.com> | 2020-06-03 15:46:55 -0500 |
---|---|---|
committer | Manish Pandey <manish.pandey2@arm.com> | 2020-10-19 11:22:34 +0000 |
commit | e7810b57c8e671f3b10f7dc901ac3712109564e9 (patch) | |
tree | 971eaeeae533ac6d4605bb26948c1d641e8a7a06 /Makefile | |
parent | 12c20464817a98348b06069c75a3cfe4dbc6f85d (diff) | |
download | tf-a-tests-e7810b57c8e671f3b10f7dc901ac3712109564e9.tar.gz |
SMC fuzzing module integration.
This includes one test with one seed as
the initial implementation. A future upgrade will include an enhanced
seeding strategy. The patch includes an example device tree file with
the actual test (sdei.dts) leveraging the SDEI functions that can be called
without reference to system state. Platform CI will have a single
TFTF config to be used in all future testing. Once both branches
of TFA tests and platform CI are checked in a user can invoke the
testing with:
workspace=<workspace location> test_groups=fvp-aarch64-sdei,fvp-smcfuzzing:fvp-tftf-fip.tftf-aemv8a test_run=1 bin_mode=debug retain_paths=1 ./platform-ci/script/run_local_ci.sh
Signed-off-by: Mark Dykes <mark.dykes@arm.com>
Change-Id: Ic290e7255bcfd845c0d22037e0b670a6691541df
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -26,10 +26,12 @@ ENABLE_ASSERTIONS := ${DEBUG} CHECKCODE_ARGS := --no-patch # Do not check the coding style on imported library files or documentation files INC_LIB_DIRS_TO_CHECK := $(sort $(filter-out \ + include/lib/libfdt \ include/lib/libc, \ $(wildcard include/lib/*))) LIB_DIRS_TO_CHECK := $(sort $(filter-out \ lib/compiler-rt \ + lib/libfdt% \ lib/libc, \ $(wildcard lib/*))) ROOT_DIRS_TO_CHECK := $(sort $(filter-out \ @@ -232,11 +234,12 @@ PP := ${CROSS_COMPILE}gcc ################################################################################ -TFTF_SOURCES := ${FRAMEWORK_SOURCES} ${TESTS_SOURCES} ${PLAT_SOURCES} ${LIBC_SRCS} +TFTF_SOURCES := ${FRAMEWORK_SOURCES} ${TESTS_SOURCES} ${PLAT_SOURCES} ${LIBC_SRCS} ${LIBFDT_SRCS} TFTF_INCLUDES += ${PLAT_INCLUDES} TFTF_CFLAGS += ${COMMON_CFLAGS} TFTF_ASFLAGS += ${COMMON_ASFLAGS} TFTF_LDFLAGS += ${COMMON_LDFLAGS} +TFTF_EXTRA_OBJS := ifneq (${BP_OPTION},none) TFTF_CFLAGS += -mbranch-protection=${BP_OPTION} @@ -248,6 +251,10 @@ IVY_CFLAGS += -mbranch-protection=${BP_OPTION} QUARK_CFLAGS += -mbranch-protection=${BP_OPTION} endif +ifeq ($(SMC_FUZZING), 1) +TFTF_EXTRA_OBJS += ${BUILD_PLAT}/smcf/dtb.o +endif + ##################################################################################### ifneq ($(findstring gcc,$(notdir $(LD))),) PIE_LDFLAGS += -Wl,-pie -Wl,--no-dynamic-linker @@ -319,13 +326,14 @@ realclean distclean: checkcodebase: locate-checkpatch @echo " CHECKING STYLE" @if test -d .git ; then \ - git ls-files | grep -E -v 'libc|docs|\.md|\.rst' | \ + git ls-files | grep -E -v 'libfdt|libc|docs|\.md|\.rst' | \ while read GIT_FILE ; \ do ${CHECKPATCH} ${CHECKCODE_ARGS} -f $$GIT_FILE ; \ done ; \ else \ find . -type f -not -iwholename "*.git*" \ -not -iwholename "*build*" \ + -not -iwholename "*libfdt*" \ -not -iwholename "*libc*" \ -not -iwholename "*docs*" \ -not -iwholename "*.md" \ @@ -445,6 +453,7 @@ define MAKE_IMG $(eval BUILD_DIR := ${BUILD_PLAT}/$(1)) $(eval SOURCES := $(${IMG_PREFIX}_SOURCES)) $(eval OBJS := $(addprefix $(BUILD_DIR)/,$(call SOURCES_TO_OBJS,$(SOURCES)))) + $(eval OBJS += $(${IMG_PREFIX}_EXTRA_OBJS)) $(eval LINKERFILE := $(BUILD_DIR)/$(1).ld) $(eval MAPFILE := $(BUILD_DIR)/$(1).map) $(eval ELF := $(BUILD_DIR)/$(1).elf) @@ -489,6 +498,13 @@ $(AUTOGEN_DIR): $(AUTOGEN_DIR)/tests_list.c $(AUTOGEN_DIR)/tests_list.h: $(AUTOGEN_DIR) ${TESTS_FILE} ${PLAT_TESTS_SKIP_LIST} @echo " AUTOGEN $@" tools/generate_test_list/generate_test_list.pl $(AUTOGEN_DIR)/tests_list.c $(AUTOGEN_DIR)/tests_list.h ${TESTS_FILE} $(PLAT_TESTS_SKIP_LIST) +ifeq ($(SMC_FUZZING), 1) + $(Q)mkdir -p ${BUILD_PLAT}/smcf + dtc ${SMC_FUZZ_DTS} >> ${BUILD_PLAT}/smcf/dtb + $(OC) -I binary -O elf64-littleaarch64 -B aarch64 ${BUILD_PLAT}/smcf/dtb ${BUILD_PLAT}/smcf/dtb.o \ + --redefine-sym _binary___build_fvp_debug_smcf_dtb_start=_binary___dtb_start \ + --redefine-sym _binary___build_fvp_debug_smcf_dtb_end=_binary___dtb_end +endif $(eval $(call MAKE_IMG,tftf)) |