Lines Matching defs:header
15 * Check if it is a valid tee header
19 static bool tee_validate_header(optee_header_t *header)
21 if ((header->magic == TEE_MAGIC_NUM_OPTEE) &&
22 (header->version == 2u) &&
23 (header->nb_images > 0u) &&
24 (header->nb_images <= OPTEE_MAX_NUM_IMAGES)) {
76 WARN("The load address in optee header %p - %p is not in reserved area: %p - %p.\n",
88 * mean the image will not be loaded. Here, we parse the header image to
101 * Parse the OPTEE header
109 optee_header_t *header;
114 header = (optee_header_t *)header_ep->pc;
115 assert(header);
117 /* Print the OPTEE header information */
119 INFO("OPTEE header info:\n");
120 INFO(" magic=0x%x\n", header->magic);
121 INFO(" version=0x%x\n", header->version);
122 INFO(" arch=0x%x\n", header->arch);
123 INFO(" flags=0x%x\n", header->flags);
124 INFO(" nb_images=0x%x\n", header->nb_images);
129 * 1. Plain OPTEE bin without header.
130 * Original bin without header, return directly,
133 * 2. OPTEE bin with header bin, but no paging.
139 * Header available and nb_images = 2, there are 3 bins: header,
143 if (!tee_validate_header(header)) {
144 INFO("Invalid OPTEE header, set legacy mode.\n");
154 for (num = 0U; num < header->nb_images; num++) {
155 if (header->optee_image_list[num].image_id ==
158 &header->optee_image_list[num]);
159 } else if (header->optee_image_list[num].image_id ==
162 if (header->optee_image_list[num].size != 0U) {
170 &header->optee_image_list[num]);
183 * header image is parsed, it will be useless, and the actual
190 * header image arguments so that can be read by the
199 if (header->arch == 0) {