blob: e23dd258b2e8bfea0d9c37ee8116a7e923479f23 [file] [log] [blame]
Yatharth Kochara5f77d32016-07-04 11:26:14 +01001/*
Soby Mathew96a1c6b2018-01-15 14:45:33 +00002 * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
Yatharth Kochara5f77d32016-07-04 11:26:14 +01003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Yatharth Kochara5f77d32016-07-04 11:26:14 +01005 */
6
Yatharth Kochara5f77d32016-07-04 11:26:14 +01007#include <platform_def.h>
8
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00009#include <common/bl_common.h>
10#include <common/desc_image_load.h>
11#include <plat/common/platform.h>
Yatharth Kochara5f77d32016-07-04 11:26:14 +010012
13/*******************************************************************************
14 * Following descriptor provides BL image/ep information that gets used
15 * by BL2 to load the images and also subset of this information is
16 * passed to next BL image. The image loading sequence is managed by
17 * populating the images in required loading order. The image execution
18 * sequence is managed by populating the `next_handoff_image_id` with
19 * the next executable image id.
20 ******************************************************************************/
21static bl_mem_params_node_t bl2_mem_params_descs[] = {
22#ifdef SCP_BL2_BASE
23 /* Fill SCP_BL2 related information if it exists */
24 {
25 .image_id = SCP_BL2_IMAGE_ID,
26
27 SET_STATIC_PARAM_HEAD(ep_info, PARAM_IMAGE_BINARY,
28 VERSION_2, entry_point_info_t, SECURE | NON_EXECUTABLE),
29
30 SET_STATIC_PARAM_HEAD(image_info, PARAM_IMAGE_BINARY,
31 VERSION_2, image_info_t, 0),
32 .image_info.image_base = SCP_BL2_BASE,
33 .image_info.image_max_size = PLAT_CSS_MAX_SCP_BL2_SIZE,
34
35 .next_handoff_image_id = INVALID_IMAGE_ID,
36 },
37#endif /* SCP_BL2_BASE */
38
39 /* Fill BL32 related information */
40 {
41 .image_id = BL32_IMAGE_ID,
42
43 SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP,
44 VERSION_2, entry_point_info_t,
45 SECURE | EXECUTABLE | EP_FIRST_EXE),
46 .ep_info.pc = BL32_BASE,
47 .ep_info.spsr = SPSR_MODE32(MODE32_mon, SPSR_T_ARM,
48 SPSR_E_LITTLE, DISABLE_ALL_EXCEPTIONS),
49
50 SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
51 VERSION_2, image_info_t, IMAGE_ATTRIB_PLAT_SETUP),
52 .image_info.image_base = BL32_BASE,
53 .image_info.image_max_size = BL32_LIMIT - BL32_BASE,
54
55 .next_handoff_image_id = BL33_IMAGE_ID,
56 },
Soby Mathew96a1c6b2018-01-15 14:45:33 +000057 /* Fill HW_CONFIG related information if it exists */
58 {
59 .image_id = HW_CONFIG_ID,
60 SET_STATIC_PARAM_HEAD(ep_info, PARAM_IMAGE_BINARY,
61 VERSION_2, entry_point_info_t, NON_SECURE | NON_EXECUTABLE),
62 SET_STATIC_PARAM_HEAD(image_info, PARAM_IMAGE_BINARY,
63 VERSION_2, image_info_t, IMAGE_ATTRIB_SKIP_LOADING),
64 .next_handoff_image_id = INVALID_IMAGE_ID,
65 },
Yatharth Kochara5f77d32016-07-04 11:26:14 +010066 /* Fill BL33 related information */
67 {
68 .image_id = BL33_IMAGE_ID,
69
70 SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP,
71 VERSION_2, entry_point_info_t, NON_SECURE | EXECUTABLE),
72#ifdef PRELOADED_BL33_BASE
73 .ep_info.pc = PRELOADED_BL33_BASE,
74
75 SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
76 VERSION_2, image_info_t, IMAGE_ATTRIB_SKIP_LOADING),
77#else
78 .ep_info.pc = PLAT_ARM_NS_IMAGE_OFFSET,
79
80 SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
81 VERSION_2, image_info_t, 0),
82 .image_info.image_base = PLAT_ARM_NS_IMAGE_OFFSET,
83 .image_info.image_max_size = ARM_DRAM1_SIZE,
84#endif /* PRELOADED_BL33_BASE */
85
86 .next_handoff_image_id = INVALID_IMAGE_ID,
87 }
88};
89
90REGISTER_BL_IMAGE_DESCS(bl2_mem_params_descs)