blob: 5fe125b5669e673b9b187a49f23c9d55eabec685 [file] [log] [blame]
Jassi Brar2244bf12022-03-03 15:24:31 -06001/*
2 * Copyright (c) 2022, Socionext Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <assert.h>
8
9#include <arch.h>
10#include <common/desc_image_load.h>
11
12#include <platform_def.h>
13
14static struct bl_mem_params_node sq_image_descs[] = {
15 {
16 .image_id = BL31_IMAGE_ID,
17
18 SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
19 VERSION_2, image_info_t, 0),
20 .image_info.image_base = BL31_BASE,
21 .image_info.image_max_size = BL31_SIZE,
22
23 SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP,
24 VERSION_2, entry_point_info_t,
25 SECURE | EXECUTABLE | EP_FIRST_EXE),
26 .ep_info.pc = BL31_BASE,
27 .ep_info.spsr = SPSR_64(MODE_EL3, MODE_SP_ELX,
28 DISABLE_ALL_EXCEPTIONS),
29
30 .next_handoff_image_id = BL32_IMAGE_ID,
31 },
32 {
33 .image_id = BL32_IMAGE_ID,
34
35 SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
36 VERSION_2, image_info_t, 0),
37 .image_info.image_base = BL32_BASE,
38 .image_info.image_max_size = BL32_SIZE,
39
40 SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP,
41 VERSION_2, entry_point_info_t,
42 SECURE | EXECUTABLE),
43 .ep_info.pc = BL32_BASE,
44 .ep_info.spsr = SPSR_64(MODE_EL3, MODE_SP_ELX,
45 DISABLE_ALL_EXCEPTIONS),
46
47 .next_handoff_image_id = BL33_IMAGE_ID,
48 },
49 {
50 .image_id = BL33_IMAGE_ID,
51
52 SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
53 VERSION_2, image_info_t, 0),
54 .image_info.image_base = PLAT_SQ_BL33_BASE,
55 .image_info.image_max_size = PLAT_SQ_BL33_SIZE,
56
57 SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP,
58 VERSION_2, entry_point_info_t,
59 NON_SECURE | EXECUTABLE),
60 .ep_info.pc = PLAT_SQ_BL33_BASE,
61 .ep_info.spsr = SPSR_64(MODE_EL2, MODE_SP_ELX,
62 DISABLE_ALL_EXCEPTIONS),
63
64 .next_handoff_image_id = INVALID_IMAGE_ID,
65 },
66};
67REGISTER_BL_IMAGE_DESCS(sq_image_descs)
68
69struct image_info *sq_get_image_info(unsigned int image_id)
70{
71 struct bl_mem_params_node *desc;
72
73 desc = get_bl_mem_params_node(image_id);
74 assert(desc);
75 return &desc->image_info;
76}