Victor Chong | 2d9a42d | 2017-08-17 15:21:10 +0900 | [diff] [blame] | 1 | /* |
Lukas Hanel | 8a4de61 | 2022-03-01 14:18:22 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. |
Victor Chong | 2d9a42d | 2017-08-17 15:21:10 +0900 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Lukas Hanel | 8a4de61 | 2022-03-01 14:18:22 +0100 | [diff] [blame] | 7 | #include <assert.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | #include <common/bl_common.h> |
| 9 | #include <common/desc_image_load.h> |
| 10 | #include <plat/common/platform.h> |
Victor Chong | 2d9a42d | 2017-08-17 15:21:10 +0900 | [diff] [blame] | 11 | |
Victor Chong | 2d9a42d | 2017-08-17 15:21:10 +0900 | [diff] [blame] | 12 | /******************************************************************************* |
| 13 | * This function flushes the data structures so that they are visible |
| 14 | * in memory for the next BL image. |
| 15 | ******************************************************************************/ |
| 16 | void 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 | ******************************************************************************/ |
| 24 | bl_load_info_t *plat_get_bl_image_load_info(void) |
| 25 | { |
Victor Chong | 2d9a42d | 2017-08-17 15:21:10 +0900 | [diff] [blame] | 26 | return get_bl_load_info_from_mem_params_desc(); |
| 27 | } |
| 28 | |
Lukas Hanel | 8a4de61 | 2022-03-01 14:18:22 +0100 | [diff] [blame] | 29 | |
| 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 | ******************************************************************************/ |
| 36 | struct 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 Chong | 2d9a42d | 2017-08-17 15:21:10 +0900 | [diff] [blame] | 49 | /******************************************************************************* |
| 50 | * This function returns the list of executable images. |
| 51 | ******************************************************************************/ |
| 52 | bl_params_t *plat_get_next_bl_params(void) |
| 53 | { |
Lukas Hanel | 8a4de61 | 2022-03-01 14:18:22 +0100 | [diff] [blame] | 54 | return hikey960_get_next_bl_params(); |
Victor Chong | 2d9a42d | 2017-08-17 15:21:10 +0900 | [diff] [blame] | 55 | } |