2 * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
9 #include <desc_image_load.h>
10 #include <platform_def.h>
14 static struct bl_mem_params_node uniphier_image_descs
[] = {
16 .image_id
= SCP_BL2_IMAGE_ID
,
18 SET_STATIC_PARAM_HEAD(image_info
, PARAM_EP
,
19 VERSION_2
, image_info_t
, 0),
20 .image_info
.image_base
= UNIPHIER_SCP_BASE
,
21 .image_info
.image_max_size
= UNIPHIER_SCP_MAX_SIZE
,
23 SET_STATIC_PARAM_HEAD(ep_info
, PARAM_EP
,
24 VERSION_2
, entry_point_info_t
,
25 NON_SECURE
| NON_EXECUTABLE
),
27 .next_handoff_image_id
= INVALID_IMAGE_ID
,
30 .image_id
= BL31_IMAGE_ID
,
32 SET_STATIC_PARAM_HEAD(image_info
, PARAM_EP
,
33 VERSION_2
, image_info_t
, 0),
34 .image_info
.image_base
= BL31_BASE
,
35 .image_info
.image_max_size
= BL31_LIMIT
- BL31_BASE
,
37 SET_STATIC_PARAM_HEAD(ep_info
, PARAM_EP
,
38 VERSION_2
, entry_point_info_t
,
39 SECURE
| EXECUTABLE
| EP_FIRST_EXE
),
40 .ep_info
.pc
= BL31_BASE
,
41 .ep_info
.spsr
= SPSR_64(MODE_EL3
, MODE_SP_ELX
,
42 DISABLE_ALL_EXCEPTIONS
),
44 #ifdef UNIPHIER_LOAD_BL32
45 .next_handoff_image_id
= BL32_IMAGE_ID
,
47 .next_handoff_image_id
= BL33_IMAGE_ID
,
50 #ifdef UNIPHIER_LOAD_BL32
52 .image_id
= BL32_IMAGE_ID
,
54 SET_STATIC_PARAM_HEAD(image_info
, PARAM_EP
,
55 VERSION_2
, image_info_t
, 0),
56 .image_info
.image_base
= BL32_BASE
,
57 .image_info
.image_max_size
= BL32_LIMIT
- BL32_BASE
,
59 SET_STATIC_PARAM_HEAD(ep_info
, PARAM_EP
,
60 VERSION_2
, entry_point_info_t
,
62 .ep_info
.pc
= BL32_BASE
,
63 .ep_info
.spsr
= SPSR_64(MODE_EL3
, MODE_SP_ELX
,
64 DISABLE_ALL_EXCEPTIONS
),
66 .next_handoff_image_id
= BL33_IMAGE_ID
,
70 .image_id
= BL33_IMAGE_ID
,
72 SET_STATIC_PARAM_HEAD(image_info
, PARAM_EP
,
73 VERSION_2
, image_info_t
, 0),
74 .image_info
.image_base
= UNIPHIER_BL33_BASE
,
75 .image_info
.image_max_size
= UNIPHIER_BL33_MAX_SIZE
,
77 SET_STATIC_PARAM_HEAD(ep_info
, PARAM_EP
,
78 VERSION_2
, entry_point_info_t
,
79 NON_SECURE
| EXECUTABLE
),
80 .ep_info
.pc
= UNIPHIER_BL33_BASE
,
81 .ep_info
.spsr
= SPSR_64(MODE_EL1
, MODE_SP_ELX
,
82 DISABLE_ALL_EXCEPTIONS
),
84 .next_handoff_image_id
= INVALID_IMAGE_ID
,
87 REGISTER_BL_IMAGE_DESCS(uniphier_image_descs
)
89 struct image_info
*uniphier_get_image_info(unsigned int image_id
)
91 struct bl_mem_params_node
*desc
;
93 desc
= get_bl_mem_params_node(image_id
);
95 return &desc
->image_info
;