Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 1 | /* |
Yann Gautier | a55169b | 2020-01-10 18:18:59 +0100 | [diff] [blame] | 2 | * Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved. |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Yann Gautier | a55169b | 2020-01-10 18:18:59 +0100 | [diff] [blame] | 7 | #include <platform_def.h> |
| 8 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 9 | #include <common/desc_image_load.h> |
| 10 | #include <plat/common/platform.h> |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 11 | |
| 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 | { |
Yann Gautier | a55169b | 2020-01-10 18:18:59 +0100 | [diff] [blame] | 26 | bl_mem_params_node_t *bl33 = get_bl_mem_params_node(BL33_IMAGE_ID); |
| 27 | uint32_t ddr_ns_size = stm32mp_get_ddr_ns_size(); |
| 28 | |
| 29 | /* Max size is non-secure DDR end address minus image_base */ |
| 30 | bl33->image_info.image_max_size = STM32MP_DDR_BASE + ddr_ns_size - |
| 31 | bl33->image_info.image_base; |
| 32 | |
Yann Gautier | 4b0c72a | 2018-07-16 10:54:09 +0200 | [diff] [blame] | 33 | return get_bl_load_info_from_mem_params_desc(); |
| 34 | } |
| 35 | |
| 36 | /******************************************************************************* |
| 37 | * This function returns the list of executable images. |
| 38 | ******************************************************************************/ |
| 39 | bl_params_t *plat_get_next_bl_params(void) |
| 40 | { |
| 41 | return get_next_bl_params_from_mem_params_desc(); |
| 42 | } |