diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cpus/aarch32/cpu_helpers.S | 5 | ||||
-rw-r--r-- | lib/optee/optee_utils.c | 18 |
2 files changed, 12 insertions, 11 deletions
diff --git a/lib/cpus/aarch32/cpu_helpers.S b/lib/cpus/aarch32/cpu_helpers.S index 72e42c67..ddc08084 100644 --- a/lib/cpus/aarch32/cpu_helpers.S +++ b/lib/cpus/aarch32/cpu_helpers.S @@ -206,7 +206,8 @@ endfunc cpu_rev_var_hs */ .globl print_errata_status func print_errata_status - push {r4, lr} + /* r12 is pushed only for the sake of 8-byte stack alignment */ + push {r4, r5, r12, lr} #ifdef IMAGE_BL1 /* * BL1 doesn't have per-CPU data. So retrieve the CPU operations @@ -241,6 +242,6 @@ func print_errata_status blxne r4 1: #endif - pop {r4, pc} + pop {r4, r5, r12, pc} endfunc print_errata_status #endif diff --git a/lib/optee/optee_utils.c b/lib/optee/optee_utils.c index 87e52bd1..ac51265e 100644 --- a/lib/optee/optee_utils.c +++ b/lib/optee/optee_utils.c @@ -140,6 +140,15 @@ int parse_optee_header(entry_point_info_t *header_ep, optee_header = (optee_header_t *)header_ep->pc; assert(optee_header); + /* Print the OPTEE header information */ + INFO("OPTEE ep=0x%x\n", (unsigned int)header_ep->pc); + INFO("OPTEE header info:\n"); + INFO(" magic=0x%x\n", optee_header->magic); + INFO(" version=0x%x\n", optee_header->version); + INFO(" arch=0x%x\n", optee_header->arch); + INFO(" flags=0x%x\n", optee_header->flags); + INFO(" nb_images=0x%x\n", optee_header->nb_images); + /* * OPTEE image has 3 types: * @@ -167,15 +176,6 @@ int parse_optee_header(entry_point_info_t *header_ep, return 0; } - /* Print the OPTEE header information */ - INFO("OPTEE ep=0x%x\n", (unsigned int)header_ep->pc); - INFO("OPTEE header info:\n"); - INFO(" magic=0x%x\n", optee_header->magic); - INFO(" version=0x%x\n", optee_header->version); - INFO(" arch=0x%x\n", optee_header->arch); - INFO(" flags=0x%x\n", optee_header->flags); - INFO(" nb_images=0x%x\n", optee_header->nb_images); - /* Parse OPTEE image */ for (num = 0; num < optee_header->nb_images; num++) { if (optee_header->optee_image[num].image_id == |