2 * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
9 #include <platform_def.h>
12 #include <common/desc_image_load.h>
16 static struct bl_mem_params_node uniphier_image_descs
[] = {
18 .image_id
= SCP_BL2_IMAGE_ID
,
20 SET_STATIC_PARAM_HEAD(image_info
, PARAM_EP
,
21 VERSION_2
, image_info_t
, 0),
22 .image_info
.image_base
= UNIPHIER_SCP_BASE
,
23 .image_info
.image_max_size
= UNIPHIER_SCP_MAX_SIZE
,
25 SET_STATIC_PARAM_HEAD(ep_info
, PARAM_EP
,
26 VERSION_2
, entry_point_info_t
,
27 NON_SECURE
| NON_EXECUTABLE
),
29 .next_handoff_image_id
= INVALID_IMAGE_ID
,
32 .image_id
= BL31_IMAGE_ID
,
34 SET_STATIC_PARAM_HEAD(image_info
, PARAM_EP
,
35 VERSION_2
, image_info_t
, 0),
36 .image_info
.image_base
= BL31_BASE
,
37 .image_info
.image_max_size
= BL31_LIMIT
- BL31_BASE
,
39 SET_STATIC_PARAM_HEAD(ep_info
, PARAM_EP
,
40 VERSION_2
, entry_point_info_t
,
41 SECURE
| EXECUTABLE
| EP_FIRST_EXE
),
42 .ep_info
.pc
= BL31_BASE
,
43 .ep_info
.spsr
= SPSR_64(MODE_EL3
, MODE_SP_ELX
,
44 DISABLE_ALL_EXCEPTIONS
),
46 #ifdef UNIPHIER_LOAD_BL32
47 .next_handoff_image_id
= BL32_IMAGE_ID
,
49 .next_handoff_image_id
= BL33_IMAGE_ID
,
52 #ifdef UNIPHIER_LOAD_BL32
54 .image_id
= BL32_IMAGE_ID
,
56 SET_STATIC_PARAM_HEAD(image_info
, PARAM_EP
,
57 VERSION_2
, image_info_t
, 0),
58 .image_info
.image_base
= BL32_BASE
,
59 .image_info
.image_max_size
= BL32_LIMIT
- BL32_BASE
,
61 SET_STATIC_PARAM_HEAD(ep_info
, PARAM_EP
,
62 VERSION_2
, entry_point_info_t
,
64 .ep_info
.pc
= BL32_BASE
,
65 .ep_info
.spsr
= SPSR_64(MODE_EL3
, MODE_SP_ELX
,
66 DISABLE_ALL_EXCEPTIONS
),
68 .next_handoff_image_id
= BL33_IMAGE_ID
,
72 .image_id
= BL33_IMAGE_ID
,
74 SET_STATIC_PARAM_HEAD(image_info
, PARAM_EP
,
75 VERSION_2
, image_info_t
, 0),
76 .image_info
.image_base
= UNIPHIER_BL33_BASE
,
77 .image_info
.image_max_size
= UNIPHIER_BL33_MAX_SIZE
,
79 SET_STATIC_PARAM_HEAD(ep_info
, PARAM_EP
,
80 VERSION_2
, entry_point_info_t
,
81 NON_SECURE
| EXECUTABLE
),
82 .ep_info
.pc
= UNIPHIER_BL33_BASE
,
83 .ep_info
.spsr
= SPSR_64(MODE_EL1
, MODE_SP_ELX
,
84 DISABLE_ALL_EXCEPTIONS
),
86 .next_handoff_image_id
= INVALID_IMAGE_ID
,
89 REGISTER_BL_IMAGE_DESCS(uniphier_image_descs
)
91 struct image_info
*uniphier_get_image_info(unsigned int image_id
)
93 struct bl_mem_params_node
*desc
;
95 desc
= get_bl_mem_params_node(image_id
);
97 return &desc
->image_info
;