diff options
author | Greg Bellows <greg.bellows@linaro.org> | 2015-04-21 14:07:46 -0500 |
---|---|---|
committer | Greg Bellows <greg.bellows@linaro.org> | 2015-04-21 14:07:46 -0500 |
commit | 480826f5596be9843a405a178d59ab14ac455c73 (patch) | |
tree | e503b0f2129701efcaa469e53a684a41459512f3 | |
parent | 0cd8c2d8c7c7f238c35f07abd6197a5f73b2f073 (diff) |
Create EL0 secure/nonsecure path and C file
Added EL0 test layout to match EL1 to simplify instructions. Updated makefiles
as needed.
Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
-rw-r--r-- | el0/nonsecure/Makefile | 7 | ||||
-rw-r--r-- | el0/secure/Makefile | 7 | ||||
-rw-r--r-- | tztest/el0/nonsecure/tztest_el0_nsec.c | 13 | ||||
-rw-r--r-- | tztest/el0/secure/tztest_el0_sec.c | 13 | ||||
-rw-r--r-- | tztest/el0/tztest_el0.c | 11 | ||||
-rw-r--r-- | tztest/el0/tztest_el0.h | 1 |
6 files changed, 35 insertions, 17 deletions
diff --git a/el0/nonsecure/Makefile b/el0/nonsecure/Makefile index 6699b06..ea1cfd2 100644 --- a/el0/nonsecure/Makefile +++ b/el0/nonsecure/Makefile @@ -1,5 +1,5 @@ -VPATH = $(ARCH):../$(ARCH):../../common/$(ARCH):../:i -VPATH += ../../tztest/el0:../../tztest +VPATH = $(ARCH):../$(ARCH):../../common/$(ARCH): +VPATH += ../:../../tztest/el0/nonsecure:../../tztest/el0:../../tztest EL0_NS_ELF = el0_nsec.elf EL0_NS_IMAGE = el0_nsec.bin @@ -8,7 +8,8 @@ EL0_NS_OBJS = el0_nsec.o \ el0.o \ builtins.o \ tztest.o \ - tztest_el0.o + tztest_el0.o \ + tztest_el0_nsec.o libgcc := $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) FLATLIBS = ../../libcflat/libcflat.a $(libgcc) ../../libcflat/$(ARCH)/libeabi.a diff --git a/el0/secure/Makefile b/el0/secure/Makefile index 9f71f4a..b20a895 100644 --- a/el0/secure/Makefile +++ b/el0/secure/Makefile @@ -1,5 +1,5 @@ -VPATH = $(ARCH):../$(ARCH):../../common/$(ARCH):../: -VPATH += ../../tztest/el0:../../tztest +VPATH = $(ARCH):../$(ARCH):../../common/$(ARCH): +VPATH += ../:../../tztest/el0/secure:../../tztest/el0:../../tztest EL0_S_ELF = el0_sec.elf EL0_S_IMAGE = el0_sec.bin @@ -8,7 +8,8 @@ EL0_S_OBJS = el0_sec.o \ el0.o \ builtins.o \ tztest.o \ - tztest_el0.o + tztest_el0.o \ + tztest_el0_sec.o libgcc := $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) FLATLIBS = ../../libcflat/libcflat.a $(libgcc) ../../libcflat/$(ARCH)/libeabi.a diff --git a/tztest/el0/nonsecure/tztest_el0_nsec.c b/tztest/el0/nonsecure/tztest_el0_nsec.c new file mode 100644 index 0000000..1d3e04b --- /dev/null +++ b/tztest/el0/nonsecure/tztest_el0_nsec.c @@ -0,0 +1,13 @@ +#include "tztest_internal.h" +#include "tztest_el0.h" + +tztest_t test_func[] = { + [TZTEST_SMC] = el0_check_smc, + [TZTEST_REG_ACCESS] = el0_check_register_access, +#ifdef AARCH64 + [TZTEST_CPACR_TRAP] = el0_check_cpacr_trap, + [TZTEST_WFX_TRAP] = el0_check_wfx_trap, + [TZTEST_FP_TRAP] = el0_check_fp_trap, +#endif +}; + diff --git a/tztest/el0/secure/tztest_el0_sec.c b/tztest/el0/secure/tztest_el0_sec.c new file mode 100644 index 0000000..1d3e04b --- /dev/null +++ b/tztest/el0/secure/tztest_el0_sec.c @@ -0,0 +1,13 @@ +#include "tztest_internal.h" +#include "tztest_el0.h" + +tztest_t test_func[] = { + [TZTEST_SMC] = el0_check_smc, + [TZTEST_REG_ACCESS] = el0_check_register_access, +#ifdef AARCH64 + [TZTEST_CPACR_TRAP] = el0_check_cpacr_trap, + [TZTEST_WFX_TRAP] = el0_check_wfx_trap, + [TZTEST_FP_TRAP] = el0_check_fp_trap, +#endif +}; + diff --git a/tztest/el0/tztest_el0.c b/tztest/el0/tztest_el0.c index e416c05..62e03eb 100644 --- a/tztest/el0/tztest_el0.c +++ b/tztest/el0/tztest_el0.c @@ -260,14 +260,3 @@ uint32_t el0_check_wfx_trap(uint32_t __attribute__((unused))arg) return 0; } #endif - -tztest_t test_func[] = { - [TZTEST_SMC] = el0_check_smc, - [TZTEST_REG_ACCESS] = el0_check_register_access, -#ifdef AARCH64 - [TZTEST_CPACR_TRAP] = el0_check_cpacr_trap, - [TZTEST_WFX_TRAP] = el0_check_wfx_trap, - [TZTEST_FP_TRAP] = el0_check_fp_trap, -#endif -}; - diff --git a/tztest/el0/tztest_el0.h b/tztest/el0/tztest_el0.h index 1f85648..a9c79d1 100644 --- a/tztest/el0/tztest_el0.h +++ b/tztest/el0/tztest_el0.h @@ -4,6 +4,7 @@ extern uint32_t el0_check_smc(uint32_t); extern uint32_t el0_check_register_access(uint32_t); extern uint32_t el0_check_cpacr_trap(uint32_t); +extern uint32_t el0_check_fp_trap(uint32_t); extern uint32_t el0_check_wfx_trap(uint32_t); #endif |