diff options
author | Greg Bellows <greg.bellows@linaro.org> | 2015-03-23 17:13:03 -0500 |
---|---|---|
committer | Greg Bellows <greg.bellows@linaro.org> | 2015-03-23 17:13:03 -0500 |
commit | 034698e46b466ea4880f8aa6d82cb02b3e94c085 (patch) | |
tree | 6386e09f3520302d9facdb1d070536d3aae7ee95 | |
parent | b5d2b537305405a867b8af0f471204e91c0229dc (diff) |
Add test dispatch and secure EL0 tests
Added dispatch infrastructure for remote dispatching tests in the secure world.
Also added EL0 symbols for GDB base address location.
Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
-rw-r--r-- | .gdbinit64 | 6 | ||||
-rw-r--r-- | aarch64/Makefile | 4 | ||||
-rw-r--r-- | aarch64/common/interop.h | 2 | ||||
-rw-r--r-- | aarch64/common/smc.h | 4 | ||||
-rw-r--r-- | aarch64/common/svc.h | 2 | ||||
-rw-r--r-- | aarch64/el0_common/el0.c | 26 | ||||
-rw-r--r-- | aarch64/el0_common/el0_common.h | 14 | ||||
-rw-r--r-- | aarch64/el0_common/tztest.c | 44 | ||||
-rw-r--r-- | aarch64/el0_common/tztest.h | 19 | ||||
-rw-r--r-- | aarch64/el0_ns/Makefile | 9 | ||||
-rw-r--r-- | aarch64/el0_ns/el0_nsec.lds.S (renamed from aarch64/el0_ns/tztest.lds.S) | 1 | ||||
-rw-r--r-- | aarch64/el0_ns/tztest_nsec.c | 20 | ||||
-rw-r--r-- | aarch64/el0_s/Makefile | 9 | ||||
-rw-r--r-- | aarch64/el0_s/el0_sec.lds.S (renamed from aarch64/el0_s/tztest.lds.S) | 5 | ||||
-rw-r--r-- | aarch64/el0_s/tztest_sec.c | 33 | ||||
-rw-r--r-- | aarch64/el1_common/el1.c | 5 | ||||
-rw-r--r-- | aarch64/el1_common/svc.c | 3 | ||||
-rw-r--r-- | aarch64/el3/el3.c | 14 | ||||
-rw-r--r-- | platform/virt/platform.h | 4 |
19 files changed, 140 insertions, 84 deletions
@@ -18,10 +18,12 @@ add-symbol-file aarch64/el1_ns/el1_nsec.elf &_EL1_NS_TEXT_BASE end define load_el0ns -add-symbol-file aarch64/el0_ns/tztest.elf 0x10000 +file aarch64/el0_ns/el0_nsec.elf +add-symbol-file aarch64/el0_ns/el0_nsec.elf &_EL0_NS_TEXT_BASE end define load_el0s -add-symbol-file aarch64/el0_s/tztest.elf 0x10000 +file aarch64/el0_s/el0_sec.elf +add-symbol-file aarch64/el0_s/el0_sec.elf &_EL0_S_TEXT_BASE end diff --git a/aarch64/Makefile b/aarch64/Makefile index 12cf91f..75f23e1 100644 --- a/aarch64/Makefile +++ b/aarch64/Makefile @@ -2,8 +2,8 @@ BIOS_IMAGE = tztest.img EL3_IMAGE = el3/el3.bin EL1_S_IMAGE = el1_s/el1_sec.bin EL1_NS_IMAGE = el1_ns/el1_nsec.bin -TZTEST_NS_IMAGE = el0_ns/tztest.elf -TZTEST_S_IMAGE = el0_s/tztest.elf +TZTEST_NS_IMAGE = el0_ns/el0_nsec.elf +TZTEST_S_IMAGE = el0_s/el0_sec.elf CFLAGS += -I../../platform/$(PLAT) -I../../libcflat/include -I../common diff --git a/aarch64/common/interop.h b/aarch64/common/interop.h index 7bb1484..2fe8285 100644 --- a/aarch64/common/interop.h +++ b/aarch64/common/interop.h @@ -25,7 +25,7 @@ typedef struct { } op_map_mem_t; typedef struct { - uintptr_t (*func)(uintptr_t); + uintptr_t func_id; uintptr_t arg; uintptr_t ret; } op_dispatch_t; diff --git a/aarch64/common/smc.h b/aarch64/common/smc.h index 3896cf2..5b16b5e 100644 --- a/aarch64/common/smc.h +++ b/aarch64/common/smc.h @@ -12,6 +12,7 @@ #define SMC_OP_GET_REG 11 #define SMC_OP_SET_REG 12 #define SMC_OP_TEST 13 +#define SMC_OP_DISPATCH 14 #ifndef __ASSEMBLY__ #include "interop.h" @@ -26,7 +27,8 @@ const char *smc_op_name[] = { [SMC_OP_MAP] = "SMC_OP_MAP", [SMC_OP_GET_REG] = "SMC_OP_GET_REG", [SMC_OP_SET_REG] = "SMC_OP_SET_REG", - [SMC_OP_TEST] = "SMC_OP_TEST" + [SMC_OP_TEST] = "SMC_OP_TEST", + [SMC_OP_DISPATCH] = "SMC_OP_DISPATCH", }; typedef union { diff --git a/aarch64/common/svc.h b/aarch64/common/svc.h index 19379d8..670b0cb 100644 --- a/aarch64/common/svc.h +++ b/aarch64/common/svc.h @@ -9,6 +9,7 @@ #define SVC_OP_GET_REG 11 #define SVC_OP_SET_REG 12 #define SVC_OP_TEST 13 +#define SVC_OP_DISPATCH 14 #ifndef __ASSEMBLY__ #include "interop.h" @@ -21,6 +22,7 @@ typedef union { op_data_t get; op_data_t set; op_test_t test; + op_dispatch_t disp; } svc_op_desc_t; extern uint32_t __svc(uint32_t, const svc_op_desc_t *); diff --git a/aarch64/el0_common/el0.c b/aarch64/el0_common/el0.c new file mode 100644 index 0000000..de6f7c2 --- /dev/null +++ b/aarch64/el0_common/el0.c @@ -0,0 +1,26 @@ +#include <stddef.h> +#include <stdint.h> +#include "interop.h" +#include "svc.h" + +void *alloc_mem(int type, size_t len) +{ + svc_op_desc_t op; + op.alloc.type = type; + op.alloc.len = len; + op.alloc.addr = NULL; + __svc(SVC_OP_ALLOC, &op); + + return op.alloc.addr; +} + +void map_va(void *va, size_t len, int type) +{ + svc_op_desc_t op; + op.map.va = va; + op.map.len = len; + op.map.type = type; + + __svc(SVC_OP_MAP, &op); +} + diff --git a/aarch64/el0_common/el0_common.h b/aarch64/el0_common/el0_common.h index 58ad537..ae9bca7 100644 --- a/aarch64/el0_common/el0_common.h +++ b/aarch64/el0_common/el0_common.h @@ -8,14 +8,15 @@ #include "arm_builtins.h" #include "el0.h" #include "debug.h" +#include "tztest.h" + +extern sys_control_t *syscntl; /* Make the below globals volatile as found that the compiler uses the * register value ratherh than the memory value making it look like the writes * actually happened. */ -extern sys_control_t *syscntl; - #define INC_TEST_COUNT() (syscntl->test_cntl->test_count += 1) #define INC_FAIL_COUNT() (syscntl->test_cntl->fail_count += 1) @@ -49,16 +50,11 @@ extern sys_control_t *syscntl; syscntl->_el.ec = 0; \ } while (0) -#define TEST_EL1S_EXCEPTION(_fn, _excp) \ - TEST_EXCEPTION(_fn, _excp, el1_excp[SEC]) -#define TEST_EL1NS_EXCEPTION(_fn, _excp) \ - TEST_EXCEPTION(_fn, _excp, el1_excp[NSEC]) +#define TEST_EL1_EXCEPTION(_fn, _excp) \ + TEST_EXCEPTION(_fn, _excp, el1_excp[SEC_STATE]) #define TEST_EL3_EXCEPTION(_fn, _excp) \ TEST_EXCEPTION(_fn, _excp, el3_excp) -extern uint32_t P0_nonsecure_check_smc(); -extern uint32_t P0_check_register_access(); -extern uint32_t P0_check_trap_to_EL3(); extern void *alloc_mem(int type, size_t len); extern void map_va(void *va, size_t len, int type); diff --git a/aarch64/el0_common/tztest.c b/aarch64/el0_common/tztest.c index 51a4466..a270959 100644 --- a/aarch64/el0_common/tztest.c +++ b/aarch64/el0_common/tztest.c @@ -9,12 +9,12 @@ sys_control_t *syscntl = NULL; -uint32_t P0_nonsecure_check_smc() +uint32_t P0_check_smc() { printf("\nValidating %s P0 smc behavior:\n", SEC_STATE_STR); printf("\tUnprivileged P0 smc call ... "); - TEST_EL1NS_EXCEPTION(asm volatile("smc #0\n"), EC_UNKNOWN); + TEST_EL1_EXCEPTION(asm volatile("smc #0\n"), EC_UNKNOWN); return 0; } @@ -25,33 +25,33 @@ uint32_t P0_check_register_access() printf("\nValidating %s P0 restricted register access:\n", SEC_STATE_STR); printf("\t%s P0 SCR read ... ", SEC_STATE_STR); - TEST_EL1NS_EXCEPTION(read_scr_el3(), EC_UNKNOWN); + TEST_EL1_EXCEPTION(read_scr_el3(), EC_UNKNOWN); printf("\t%s P0 SCR write ... ", SEC_STATE_STR); - TEST_EL1NS_EXCEPTION(write_scr_el3(0), EC_UNKNOWN); + TEST_EL1_EXCEPTION(write_scr_el3(0), EC_UNKNOWN); printf("\t%s P0 SDER read ... ", SEC_STATE_STR); - TEST_EL1NS_EXCEPTION(read_sder32_el3(), EC_UNKNOWN); + TEST_EL1_EXCEPTION(read_sder32_el3(), EC_UNKNOWN); printf("\t%s P0 SDER write ... ", SEC_STATE_STR); - TEST_EL1NS_EXCEPTION(write_sder32_el3(0), EC_UNKNOWN); + TEST_EL1_EXCEPTION(write_sder32_el3(0), EC_UNKNOWN); /* printf("\t%s P0 MVBAR read ... ", SEC_STATE_STR); - TEST_EL1NS_EXCEPTION(read_mvbar(), EC_UNKNOWN); + TEST_EL1_EXCEPTION(read_mvbar(), EC_UNKNOWN); printf("\t%s P0 MVBAR write ... ", SEC_STATE_STR); - TEST_EL1NS_EXCEPTION(write_mvbar(0), EC_UNKNOWN); + TEST_EL1_EXCEPTION(write_mvbar(0), EC_UNKNOWN); printf("\t%s P0 NSACR write ... ", SEC_STATE_STR); - TEST_EL1NS_EXCEPTION(write_nsacr(0), EC_UNKNOWN); + TEST_EL1_EXCEPTION(write_nsacr(0), EC_UNKNOWN); */ printf("\t%s P0 CPTR_EL3 read ... ", SEC_STATE_STR); - TEST_EL1NS_EXCEPTION(read_cptr_el3(), EC_UNKNOWN); + TEST_EL1_EXCEPTION(read_cptr_el3(), EC_UNKNOWN); printf("\t%s P0 CPTR_EL3 write ... ", SEC_STATE_STR); - TEST_EL1NS_EXCEPTION(write_cptr_el3(0), EC_UNKNOWN); + TEST_EL1_EXCEPTION(write_cptr_el3(0), EC_UNKNOWN); return 0; } @@ -94,24 +94,10 @@ uint32_t P0_check_trap_to_EL3() return 0; } -void *alloc_mem(int type, size_t len) +void tztest_init() { - svc_op_desc_t op; - op.alloc.type = type; - op.alloc.len = len; - op.alloc.addr = NULL; - __svc(SVC_OP_ALLOC, &op); - - return op.alloc.addr; -} - -void map_va(void *va, size_t len, int type) -{ - svc_op_desc_t op; - op.map.va = va; - op.map.len = len; - op.map.type = type; - - __svc(SVC_OP_MAP, &op); + tztest[TZTEST_P0_SMC] = P0_check_smc; + tztest[TZTEST_REG_ACCESS] = P0_check_register_access; + tztest[TZTEST_TRAP_TO_EL3] = P0_check_trap_to_EL3; } diff --git a/aarch64/el0_common/tztest.h b/aarch64/el0_common/tztest.h new file mode 100644 index 0000000..f2e2af7 --- /dev/null +++ b/aarch64/el0_common/tztest.h @@ -0,0 +1,19 @@ +#ifndef _TZTEST_H +#define _TZTEST_H + +typedef uint32_t (*tztest_t)(); +extern tztest_t tztest[]; + +extern void tztest_init(); +extern uint32_t P0_check_smc(); +extern uint32_t P0_check_register_access(); +extern uint32_t P0_check_trap_to_EL3(); + +typedef enum { + TZTEST_P0_SMC = 0, + TZTEST_REG_ACCESS, + TZTEST_TRAP_TO_EL3, + TZTEST_COUNT +} tztest_func_id_t; + +#endif diff --git a/aarch64/el0_ns/Makefile b/aarch64/el0_ns/Makefile index 2f144ac..de1a76b 100644 --- a/aarch64/el0_ns/Makefile +++ b/aarch64/el0_ns/Makefile @@ -1,10 +1,11 @@ VPATH = ../el0_common:../common -EL0_NS_ELF = tztest.elf -EL0_NS_IMAGE = tztest.bin -EL0_NS_LOAD = tztest.lds +EL0_NS_ELF = el0_nsec.elf +EL0_NS_IMAGE = el0_nsec.bin +EL0_NS_LOAD = el0_nsec.lds EL0_NS_OBJS = tztest_nsec.o \ tztest.o \ + el0.o \ builtins.o -include .*.d @@ -19,7 +20,7 @@ $(EL0_NS_ELF): $(EL0_NS_OBJS) $(EL0_NS_LOAD) $(EL0_NS_IMAGE): $(EL0_NS_ELF) $(OBJCOPY) -O binary $< $@ -$(EL0_NS_LOAD): tztest.lds.S Makefile ../../platform/$(PLAT)/ +$(EL0_NS_LOAD): el0_nsec.lds.S Makefile ../../platform/$(PLAT)/ $(CC) $(CFLAGS) -fpic -pie -E -P -C -o $@ $< %.o: %.S diff --git a/aarch64/el0_ns/tztest.lds.S b/aarch64/el0_ns/el0_nsec.lds.S index 35eeb67..1bebbea 100644 --- a/aarch64/el0_ns/tztest.lds.S +++ b/aarch64/el0_ns/el0_nsec.lds.S @@ -10,6 +10,7 @@ SECTIONS . = 0x0; .text . : { *(.text); + _EL0_NS_TEXT_BASE = EL0_NS_BASE_VA; _EL0_NS_TEXT_SIZE = SIZEOF(.text); } diff --git a/aarch64/el0_ns/tztest_nsec.c b/aarch64/el0_ns/tztest_nsec.c index 37b2439..b263cfc 100644 --- a/aarch64/el0_ns/tztest_nsec.c +++ b/aarch64/el0_ns/tztest_nsec.c @@ -1,5 +1,7 @@ #include "el0_common.h" +tztest_t tztest[TZTEST_COUNT]; + void interop_test() { op_test_t test; @@ -12,12 +14,24 @@ void interop_test() TEST_CONDITION(!test.fail && test.val == (test.orig >> test.count)); } +void run_test(tztest_func_id_t fid) +{ + op_dispatch_t disp; + + tztest[fid](); + + disp.func_id = fid; + __svc(SVC_OP_DISPATCH, (svc_op_desc_t *)&disp); +} + int main() { svc_op_desc_t desc; printf("Starting TZ test ...\n"); + tztest_init(); + /* Fetch the system-wide control structure */ __svc(SVC_OP_GET_SYSCNTL, &desc); syscntl = ((sys_control_t *)desc.get.data); @@ -37,9 +51,9 @@ int main() __svc(SVC_OP_EXIT, &desc); } - P0_nonsecure_check_smc(); - P0_check_register_access(); - P0_check_trap_to_EL3(); + run_test(TZTEST_P0_SMC); + run_test(TZTEST_REG_ACCESS); + run_test(TZTEST_TRAP_TO_EL3); printf("\nValidation complete. Passed %d of %d tests\n", syscntl->test_cntl->test_count - syscntl->test_cntl->fail_count, diff --git a/aarch64/el0_s/Makefile b/aarch64/el0_s/Makefile index 5a82239..fcf36be 100644 --- a/aarch64/el0_s/Makefile +++ b/aarch64/el0_s/Makefile @@ -1,10 +1,11 @@ VPATH = ../el0_common:../common -EL0_S_ELF = tztest.elf -EL0_S_IMAGE = tztest.bin -EL0_S_LOAD = tztest.lds +EL0_S_ELF = el0_sec.elf +EL0_S_IMAGE = el0_sec.bin +EL0_S_LOAD = el0_sec.lds EL0_S_OBJS = tztest_sec.o \ tztest.o \ + el0.o \ builtins.o -include .*.d @@ -19,7 +20,7 @@ $(EL0_S_ELF): $(EL0_S_OBJS) $(EL0_S_LOAD) $(EL0_S_IMAGE): $(EL0_S_ELF) $(OBJCOPY) -O binary $< $@ -$(EL0_S_LOAD): tztest.lds.S Makefile ../../platform/$(PLAT)/ +$(EL0_S_LOAD): el0_sec.lds.S Makefile ../../platform/$(PLAT)/ $(CC) $(CFLAGS) -fpic -pie -E -P -C -o $@ $< %.o: %.S diff --git a/aarch64/el0_s/tztest.lds.S b/aarch64/el0_s/el0_sec.lds.S index 35eeb67..24dbb9d 100644 --- a/aarch64/el0_s/tztest.lds.S +++ b/aarch64/el0_s/el0_sec.lds.S @@ -10,13 +10,14 @@ SECTIONS . = 0x0; .text . : { *(.text); - _EL0_NS_TEXT_SIZE = SIZEOF(.text); + _EL0_S_TEXT_BASE = EL0_S_BASE_VA; + _EL0_S_TEXT_SIZE = SIZEOF(.text); } . = ALIGN(4k); .data . : { *(.*data); *(.*bss); - _EL0_NS_DATA_SIZE = SIZEOF(.data); + _EL0_S_DATA_SIZE = SIZEOF(.data); } } diff --git a/aarch64/el0_s/tztest_sec.c b/aarch64/el0_s/tztest_sec.c index a7ee3b7..42e202e 100644 --- a/aarch64/el0_s/tztest_sec.c +++ b/aarch64/el0_s/tztest_sec.c @@ -1,29 +1,35 @@ #include "el0_common.h" +tztest_t tztest[TZTEST_COUNT]; + void el0_sec_loop() { - svc_op_desc_t desc; - op_test_t *test = (op_test_t *)&desc; + svc_op_desc_t _desc , *desc = &_desc; uint32_t op = SVC_OP_YIELD; - DEBUG_MSG("Starting loop - desc = %p test = %p\n", &desc, test); + DEBUG_MSG("Starting loop - desc = %p\n", desc); while (op != SVC_OP_EXIT) { switch (op) { case SVC_OP_MAP: - DEBUG_MSG("Handling a SVC_OP_MAP - desc = %p\n", &desc); + DEBUG_MSG("Handling a SVC_OP_MAP - desc = %p\n", desc); op = SVC_OP_MAP; break; case SVC_OP_YIELD: - DEBUG_MSG("Handling a SVC_OP_YIELD - desc = %p\n", &desc); + DEBUG_MSG("Handling a SVC_OP_YIELD - desc = %p\n", desc); break; case SVC_OP_TEST: - DEBUG_MSG("Handling a SVC_OP_TEST - desc = %p\n", &desc); - if (test->val != test->orig >> test->count) { - test->fail++; + DEBUG_MSG("Handling a SVC_OP_TEST - desc = %p\n", desc); + if (desc->test.val != desc->test.orig >> desc->test.count) { + desc->test.fail++; } - test->val >>= 1; - test->count++; + desc->test.val >>= 1; + desc->test.count++; + op = SVC_OP_YIELD; + break; + case SVC_OP_DISPATCH: + tztest[desc->disp.func_id](); + op = SVC_OP_YIELD; break; case 0: op = SVC_OP_YIELD; @@ -34,9 +40,9 @@ void el0_sec_loop() break; } - DEBUG_MSG("Calling svc(%d, %p)\n", op, &desc); - op = __svc(op, &desc); - DEBUG_MSG("Returned from svc - op = %d &desc = %p\n", op, &desc); + DEBUG_MSG("Calling svc(%d, %p)\n", op, desc); + op = __svc(op, desc); + DEBUG_MSG("Returned from svc - op = %d &desc = %p\n", op, desc); } __svc(SVC_OP_EXIT, NULL); @@ -47,6 +53,7 @@ int main() svc_op_desc_t desc; printf("Starting secure-side EL0 ...\n"); + tztest_init(); /* Fetch the system-wide control structure */ __svc(SVC_OP_GET_SYSCNTL, &desc); diff --git a/aarch64/el1_common/el1.c b/aarch64/el1_common/el1.c index 5d5fe4a..e9dc31a 100644 --- a/aarch64/el1_common/el1.c +++ b/aarch64/el1_common/el1.c @@ -249,6 +249,11 @@ int el1_handle_svc(uint32_t op, svc_op_desc_t *desc) case SVC_OP_TEST: el1_interop_test((op_test_t *)desc); break; + case SVC_OP_DISPATCH: + memcpy(smc_interop_buf, desc, sizeof(smc_op_desc_t)); + __smc(SMC_OP_DISPATCH, smc_interop_buf); + memcpy(desc, smc_interop_buf, sizeof(smc_op_desc_t)); + break; default: DEBUG_MSG("Unrecognized AArch64 SVC opcode: op = %d\n", op); break; diff --git a/aarch64/el1_common/svc.c b/aarch64/el1_common/svc.c index cbe2488..3118702 100644 --- a/aarch64/el1_common/svc.c +++ b/aarch64/el1_common/svc.c @@ -8,6 +8,7 @@ const char *svc_op_name[] = { [SVC_OP_GET_SYSCNTL] = "SVC_OP_GET_SYSCNTL", [SVC_OP_GET_REG] = "SVC_OP_GET_REG", [SVC_OP_SET_REG] = "SVC_OP_SET_REG", - [SVC_OP_TEST] = "SVC_OP_TEST" + [SVC_OP_TEST] = "SVC_OP_TEST", + [SVC_OP_DISPATCH] = "SVC_OP_DISPATCH" }; diff --git a/aarch64/el3/el3.c b/aarch64/el3/el3.c index 23112f9..57a42c2 100644 --- a/aarch64/el3/el3.c +++ b/aarch64/el3/el3.c @@ -24,14 +24,6 @@ smc_op_desc_t *smc_interop_buf; uint64_t el3_next_pa = 0; uint64_t el3_heap_pool = 0xF800000000; -void el3_dispatch(op_dispatch_t *disp) -{ - uintptr_t (*func)(uintptr_t) = disp->func; - DEBUG_MSG("Entered\n"); - disp->ret = func(disp->arg); - DEBUG_MSG("Exiting\n"); -} - void el3_shutdown() { uintptr_t *sysreg_cfgctrl = (uintptr_t *)(SYSREG_BASE + SYSREG_CFGCTRL); @@ -197,9 +189,6 @@ int el3_handle_smc(uint64_t op, smc_op_desc_t *desc) case SMC_OP_YIELD: return SVC_OP_YIELD; break; - case SMC_OP_DISPATCH_MONITOR: - el3_dispatch((op_dispatch_t *)desc); - break; case SMC_OP_MAP: return el3_map_mem((op_map_mem_t *)desc); break; @@ -208,6 +197,9 @@ int el3_handle_smc(uint64_t op, smc_op_desc_t *desc) case SMC_OP_EXIT: el3_shutdown(); break; + case SMC_OP_DISPATCH: + return SVC_OP_DISPATCH; + break; case SMC_OP_TEST: if (test->val != test->orig >> test->count) { test->fail++; diff --git a/platform/virt/platform.h b/platform/virt/platform.h index 665c5f8..9c8a30a 100644 --- a/platform/virt/platform.h +++ b/platform/virt/platform.h @@ -18,8 +18,8 @@ #define EL3_BASE_VA 0xF000000000 #define EL1_S_BASE_VA 0xC000000000 #define EL1_NS_BASE_VA 0x80000000 -#define EL0_S_BASE_VA 0x00080000 -#define EL0_NS_BASE_VA 0x00010000 +#define EL0_S_BASE_VA 0x000C0000 +#define EL0_NS_BASE_VA 0x00080000 #define EL3_RAM_BASE RAM_BASE #define EL3_RAM_SIZE (512*1024) #define EL1_S_RAM_BASE (RAM_BASE+0x1000000) |