summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVictor Chong <victor.chong@linaro.org>2018-01-26 16:10:07 +0900
committerVictor Chong <victor.chong@linaro.org>2018-02-08 02:17:24 +0900
commit5c0bda714bd3470ccfd0d8e5c2cbdead67aab81b (patch)
tree81e9a7ebe8466687e5a581fe47d5f01e8ef630b6 /lib
parent5b75b4a725d062bd593856a665bfda0e1b23a04b (diff)
optee: print header info before validate
Currently optee header info is only printed after it is validated, but this does not help with debugging in case of error, so print it before. Signed-off-by: Victor Chong <victor.chong@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/optee/optee_utils.c18
1 files changed, 9 insertions, 9 deletions
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 ==