blob: 0da93e4fa0dec3fd257466cf2d594df0c845d7a7 [file] [log] [blame]
Yann Gautier4b0c72a2018-07-16 10:54:09 +02001/*
Yann Gautiera2e2a302019-02-14 11:13:39 +01002 * Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
Yann Gautier4b0c72a2018-07-16 10:54:09 +02003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Yann Gautier4b0c72a2018-07-16 10:54:09 +02007#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>
12
Yann Gautier4b0c72a2018-07-16 10:54:09 +020013/*******************************************************************************
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 /* Fill BL32 related information */
23 {
24 .image_id = BL32_IMAGE_ID,
25
26 SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP,
27 VERSION_2, entry_point_info_t,
28 SECURE | EXECUTABLE | EP_FIRST_EXE),
29
30 .ep_info.pc = BL32_BASE,
31 .ep_info.spsr = SPSR_MODE32(MODE32_svc, SPSR_T_ARM,
32 SPSR_E_LITTLE,
33 DISABLE_ALL_EXCEPTIONS),
34
35 SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
36 VERSION_2, image_info_t,
37 IMAGE_ATTRIB_PLAT_SETUP),
38
39 .image_info.image_base = BL32_BASE,
40 .image_info.image_max_size = BL32_LIMIT - BL32_BASE,
41
42 .next_handoff_image_id = BL33_IMAGE_ID,
43 },
44
45 /* Fill BL33 related information */
46 {
47 .image_id = BL33_IMAGE_ID,
48
49 SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP,
50 VERSION_2, entry_point_info_t,
51 NON_SECURE | EXECUTABLE),
52
Yann Gautiera2e2a302019-02-14 11:13:39 +010053 .ep_info.pc = PLAT_STM32MP_NS_IMAGE_OFFSET,
Yann Gautier4b0c72a2018-07-16 10:54:09 +020054 .ep_info.spsr = SPSR_MODE32(MODE32_svc, SPSR_T_ARM,
55 SPSR_E_LITTLE,
56 DISABLE_ALL_EXCEPTIONS),
57
58 SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
59 VERSION_2, image_info_t, 0),
60
Yann Gautiera2e2a302019-02-14 11:13:39 +010061 .image_info.image_base = PLAT_STM32MP_NS_IMAGE_OFFSET,
62 .image_info.image_max_size = STM32MP_DDR_MAX_SIZE -
63 (PLAT_STM32MP_NS_IMAGE_OFFSET - STM32MP_DDR_BASE),
Yann Gautier4b0c72a2018-07-16 10:54:09 +020064
65 .next_handoff_image_id = INVALID_IMAGE_ID,
66 }
67};
68
69REGISTER_BL_IMAGE_DESCS(bl2_mem_params_descs)