Lines Matching refs:desc
166 const image_desc_t *desc, *checked_desc; in bl1_fwu_image_check_overlaps() local
189 desc = bl1_plat_get_image_desc(bl1_fwu_loaded_ids[i]); in bl1_fwu_image_check_overlaps()
192 assert ((desc != NULL) && (desc->state != IMAGE_STATE_RESET)); in bl1_fwu_image_check_overlaps()
194 info = &desc->image_info; in bl1_fwu_image_check_overlaps()
213 checked_desc->image_id, desc->image_id); in bl1_fwu_image_check_overlaps()
232 image_desc_t *desc; in bl1_fwu_image_copy() local
235 desc = bl1_plat_get_image_desc(image_id); in bl1_fwu_image_copy()
236 if (desc == NULL) { in bl1_fwu_image_copy()
249 if (GET_SECURITY_STATE(desc->ep_info.h.attr) == NON_SECURE) { in bl1_fwu_image_copy()
255 if ((desc->state != IMAGE_STATE_RESET) && in bl1_fwu_image_copy()
256 (desc->state != IMAGE_STATE_COPYING)) { in bl1_fwu_image_copy()
269 if (desc->state == IMAGE_STATE_COPYING) { in bl1_fwu_image_copy()
274 assert(desc->copied_size != 0U); in bl1_fwu_image_copy()
279 image_size = desc->image_info.image_size; in bl1_fwu_image_copy()
281 assert(desc->copied_size < image_size); in bl1_fwu_image_copy()
298 if (image_size > desc->image_info.image_max_size) { in bl1_fwu_image_copy()
304 desc->image_info.image_size = image_size; in bl1_fwu_image_copy()
308 desc->image_info.image_size = 0; in bl1_fwu_image_copy()
318 desc->copied_size = 0; in bl1_fwu_image_copy()
325 remaining = image_size - desc->copied_size; in bl1_fwu_image_copy()
343 if (desc->state == IMAGE_STATE_RESET) { in bl1_fwu_image_copy()
352 dest_addr = desc->image_info.image_base + desc->copied_size; in bl1_fwu_image_copy()
356 desc->copied_size += block_size; in bl1_fwu_image_copy()
357 desc->state = (block_size == remaining) ? in bl1_fwu_image_copy()
375 image_desc_t *desc; in bl1_fwu_image_auth() local
378 desc = bl1_plat_get_image_desc(image_id); in bl1_fwu_image_auth()
379 if (desc == NULL) in bl1_fwu_image_auth()
383 if (desc->state != IMAGE_STATE_RESET) { in bl1_fwu_image_auth()
389 if (GET_SECURITY_STATE(desc->ep_info.h.attr) == SECURE) { in bl1_fwu_image_auth()
390 if (desc->state != IMAGE_STATE_COPIED) { in bl1_fwu_image_auth()
396 if (desc->state != IMAGE_STATE_RESET) { in bl1_fwu_image_auth()
404 if (desc->state == IMAGE_STATE_COPIED) { in bl1_fwu_image_auth()
409 base_addr = desc->image_info.image_base; in bl1_fwu_image_auth()
410 total_size = desc->image_info.image_size; in bl1_fwu_image_auth()
424 desc->ep_info.h.attr) != 0) { in bl1_fwu_image_auth()
438 desc->image_info.image_size = total_size; in bl1_fwu_image_auth()
455 if (desc->state == IMAGE_STATE_COPIED) { in bl1_fwu_image_auth()
461 desc->state = IMAGE_STATE_RESET; in bl1_fwu_image_auth()
474 desc->state = IMAGE_STATE_AUTHENTICATED; in bl1_fwu_image_auth()
492 flush_dcache_range((uintptr_t)&desc->image_info, in bl1_fwu_image_auth()
508 image_desc_t *desc = bl1_plat_get_image_desc(image_id); in bl1_fwu_image_execute() local
518 if ((desc == NULL) || in bl1_fwu_image_execute()
520 (GET_SECURITY_STATE(desc->ep_info.h.attr) == NON_SECURE) || in bl1_fwu_image_execute()
521 (EP_GET_EXE(desc->ep_info.h.attr) == NON_EXECUTABLE) || in bl1_fwu_image_execute()
522 (desc->state != IMAGE_STATE_AUTHENTICATED)) { in bl1_fwu_image_execute()
556 image_desc_t *desc; in bl1_fwu_image_resume() local
561 desc = bl1_plat_get_image_desc(sec_exec_image_id); in bl1_fwu_image_resume()
563 if (desc == NULL) { in bl1_fwu_image_resume()
570 assert(desc != NULL); in bl1_fwu_image_resume()
573 assert(GET_SECURITY_STATE(desc->ep_info.h.attr) == SECURE); in bl1_fwu_image_resume()
574 assert(EP_GET_EXE(desc->ep_info.h.attr) == EXECUTABLE); in bl1_fwu_image_resume()
577 assert(desc->state == IMAGE_STATE_EXECUTED); in bl1_fwu_image_resume()
580 desc->state = IMAGE_STATE_INTERRUPTED; in bl1_fwu_image_resume()
583 assert(desc->state == IMAGE_STATE_INTERRUPTED); in bl1_fwu_image_resume()
586 desc->state = IMAGE_STATE_EXECUTED; in bl1_fwu_image_resume()
621 image_desc_t *desc; in bl1_fwu_sec_image_done() local
630 desc = bl1_plat_get_image_desc(sec_exec_image_id); in bl1_fwu_sec_image_done()
633 assert(desc != NULL); in bl1_fwu_sec_image_done()
634 assert(GET_SECURITY_STATE(desc->ep_info.h.attr) == SECURE); in bl1_fwu_sec_image_done()
635 assert(EP_GET_EXE(desc->ep_info.h.attr) == EXECUTABLE); in bl1_fwu_sec_image_done()
636 assert(desc->state == IMAGE_STATE_EXECUTED); in bl1_fwu_sec_image_done()
646 desc->state = IMAGE_STATE_RESET; in bl1_fwu_sec_image_done()
694 image_desc_t *desc = bl1_plat_get_image_desc(image_id); in bl1_fwu_image_reset() local
696 if ((desc == NULL) || (GET_SECURITY_STATE(flags) == SECURE)) { in bl1_fwu_image_reset()
701 switch (desc->state) { in bl1_fwu_image_reset()
717 if (desc->copied_size != 0U) { in bl1_fwu_image_reset()
719 assert(GET_SECURITY_STATE(desc->ep_info.h.attr) in bl1_fwu_image_reset()
722 zero_normalmem((void *)desc->image_info.image_base, in bl1_fwu_image_reset()
723 desc->copied_size); in bl1_fwu_image_reset()
724 flush_dcache_range(desc->image_info.image_base, in bl1_fwu_image_reset()
725 desc->copied_size); in bl1_fwu_image_reset()
729 desc->copied_size = 0; in bl1_fwu_image_reset()
730 desc->image_info.image_size = 0; in bl1_fwu_image_reset()
731 desc->state = IMAGE_STATE_RESET; in bl1_fwu_image_reset()