blob: 79f2bd7b876cbb8751cf44abba6a0c3e247f9aea [file] [log] [blame]
Yatharth Kochar3345a8d2016-09-12 16:08:41 +01001/*
2 * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Yatharth Kochar3345a8d2016-09-12 16:08:41 +01005 */
6#ifndef __DESC_IMAGE_LOAD_H__
7#define __DESC_IMAGE_LOAD_H__
8
9#include <bl_common.h>
10
11#if LOAD_IMAGE_V2
12/* Following structure is used to store BL ep/image info. */
13typedef struct bl_mem_params_node {
14 unsigned int image_id;
15 image_info_t image_info;
16 entry_point_info_t ep_info;
17 unsigned int next_handoff_image_id;
18 bl_load_info_node_t load_node_mem;
19 bl_params_node_t params_node_mem;
20} bl_mem_params_node_t;
21
22/*
23 * Macro to register list of BL image descriptors,
24 * defined as an array of bl_mem_params_node_t.
25 */
26#define REGISTER_BL_IMAGE_DESCS(_img_desc) \
27 bl_mem_params_node_t *bl_mem_params_desc_ptr = &_img_desc[0]; \
28 unsigned int bl_mem_params_desc_num = ARRAY_SIZE(_img_desc);
29
30/* BL image loading utility functions */
31void flush_bl_params_desc(void);
32int get_bl_params_node_index(unsigned int image_id);
33bl_mem_params_node_t *get_bl_mem_params_node(unsigned int image_id);
34bl_load_info_t *get_bl_load_info_from_mem_params_desc(void);
35bl_params_t *get_next_bl_params_from_mem_params_desc(void);
36
37
38#endif /* LOAD_IMAGE_V2 */
39#endif /* __DESC_IMAGE_LOAD_H__ */