Commit 5c0bda71 authored by Victor Chong's avatar Victor Chong
Browse files

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: default avatarVictor Chong <victor.chong@linaro.org>
parent 5b75b4a7
...@@ -140,6 +140,15 @@ int parse_optee_header(entry_point_info_t *header_ep, ...@@ -140,6 +140,15 @@ int parse_optee_header(entry_point_info_t *header_ep,
optee_header = (optee_header_t *)header_ep->pc; optee_header = (optee_header_t *)header_ep->pc;
assert(optee_header); 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: * OPTEE image has 3 types:
* *
...@@ -167,15 +176,6 @@ int parse_optee_header(entry_point_info_t *header_ep, ...@@ -167,15 +176,6 @@ int parse_optee_header(entry_point_info_t *header_ep,
return 0; 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 */ /* Parse OPTEE image */
for (num = 0; num < optee_header->nb_images; num++) { for (num = 0; num < optee_header->nb_images; num++) {
if (optee_header->optee_image[num].image_id == if (optee_header->optee_image[num].image_id ==
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment