blob: 9a5b74ee1b3b6e3bc9050dda49002471c24fd729 [file] [log] [blame]
Victor Chong2d9a42d2017-08-17 15:21:10 +09001/*
Lukas Hanel8a4de612022-03-01 14:18:22 +01002 * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved.
Victor Chong2d9a42d2017-08-17 15:21:10 +09003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Lukas Hanel8a4de612022-03-01 14:18:22 +01007#include <assert.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00008#include <common/bl_common.h>
9#include <common/desc_image_load.h>
10#include <plat/common/platform.h>
Victor Chong2d9a42d2017-08-17 15:21:10 +090011
Victor Chong2d9a42d2017-08-17 15:21:10 +090012/*******************************************************************************
13 * This function flushes the data structures so that they are visible
14 * in memory for the next BL image.
15 ******************************************************************************/
16void plat_flush_next_bl_params(void)
17{
18 flush_bl_params_desc();
19}
20
21/*******************************************************************************
22 * This function returns the list of loadable images.
23 ******************************************************************************/
24bl_load_info_t *plat_get_bl_image_load_info(void)
25{
Victor Chong2d9a42d2017-08-17 15:21:10 +090026 return get_bl_load_info_from_mem_params_desc();
27}
28
Lukas Hanel8a4de612022-03-01 14:18:22 +010029
30/*******************************************************************************
31 * ARM helper function to return the list of executable images. Since the default
32 * descriptors are allocated within BL2 RW memory, this prevents BL31/BL32
33 * overlay of BL2 memory. Hence this function also copies the descriptors to a
34 * pre-allocated memory indicated by ARM_BL2_MEM_DESC_BASE.
35 ******************************************************************************/
36struct bl_params *hikey960_get_next_bl_params(void)
37{
38 bl_params_t *next_bl_params;
39
40 next_bl_params = get_next_bl_params_from_mem_params_desc();
41 assert(next_bl_params != NULL);
42
43 populate_next_bl_params_config(next_bl_params);
44
45 return next_bl_params;
46}
47
48
Victor Chong2d9a42d2017-08-17 15:21:10 +090049/*******************************************************************************
50 * This function returns the list of executable images.
51 ******************************************************************************/
52bl_params_t *plat_get_next_bl_params(void)
53{
Lukas Hanel8a4de612022-03-01 14:18:22 +010054 return hikey960_get_next_bl_params();
Victor Chong2d9a42d2017-08-17 15:21:10 +090055}