mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
Merge "build(bl2): enable SP pkg loading for S-EL1 SPMC" into integration
This commit is contained in:
commit
5447302fee
6 changed files with 17 additions and 8 deletions
9
Makefile
9
Makefile
|
@ -529,6 +529,10 @@ ifneq (${SPD},none)
|
|||
ifneq ($(ARM_BL2_SP_LIST_DTS),)
|
||||
DTC_CPPFLAGS += -DARM_BL2_SP_LIST_DTS=$(ARM_BL2_SP_LIST_DTS)
|
||||
endif
|
||||
|
||||
ifneq ($(SP_LAYOUT_FILE),)
|
||||
BL2_ENABLE_SP_LOAD := 1
|
||||
endif
|
||||
else
|
||||
# All other SPDs in spd directory
|
||||
SPD_DIR := spd
|
||||
|
@ -902,6 +906,7 @@ endif
|
|||
$(eval $(call assert_booleans,\
|
||||
$(sort \
|
||||
ALLOW_RO_XLAT_TABLES \
|
||||
BL2_ENABLE_SP_LOAD \
|
||||
COLD_BOOT_SINGLE_CPU \
|
||||
CREATE_KEYS \
|
||||
CTX_INCLUDE_AARCH32_REGS \
|
||||
|
@ -1003,6 +1008,7 @@ $(eval $(call add_defines,\
|
|||
ALLOW_RO_XLAT_TABLES \
|
||||
ARM_ARCH_MAJOR \
|
||||
ARM_ARCH_MINOR \
|
||||
BL2_ENABLE_SP_LOAD \
|
||||
COLD_BOOT_SINGLE_CPU \
|
||||
CTX_INCLUDE_AARCH32_REGS \
|
||||
CTX_INCLUDE_FPREGS \
|
||||
|
@ -1105,9 +1111,6 @@ endif
|
|||
# Generate and include sp_gen.mk if SPD is spmd and SP_LAYOUT_FILE is defined
|
||||
ifeq (${SPD},spmd)
|
||||
ifdef SP_LAYOUT_FILE
|
||||
ifeq (${SPMD_SPM_AT_SEL2},0)
|
||||
$(error "SPMD with SPM at S-EL1 does not require SP_LAYOUT_FILE")
|
||||
endif
|
||||
-include $(BUILD_PLAT)/sp_gen.mk
|
||||
FIP_DEPS += sp
|
||||
CRT_DEPS += sp
|
||||
|
|
|
@ -55,6 +55,9 @@ Common build options
|
|||
- ``BL2_AT_EL3``: This is an optional build option that enables the use of
|
||||
BL2 at EL3 execution level.
|
||||
|
||||
- ``BL2_ENABLE_SP_LOAD``: Boolean option to enable loading SP packages from the
|
||||
FIP. Automatically enabled if ``SP_LAYOUT_FILE`` is provided.
|
||||
|
||||
- ``BL2_IN_XIP_MEM``: In some use-cases BL2 will be stored in eXecute In Place
|
||||
(XIP) memory, like BL1. In these use-cases, it is necessary to initialize
|
||||
the RW sections in RAM, while leaving the RO sections in place. This option
|
||||
|
|
|
@ -32,6 +32,9 @@ BASE_COMMIT := origin/master
|
|||
# Execute BL2 at EL3
|
||||
BL2_AT_EL3 := 0
|
||||
|
||||
# Only use SP packages if SP layout JSON is defined
|
||||
BL2_ENABLE_SP_LOAD := 0
|
||||
|
||||
# BL2 image is stored in XIP memory, for now, this option is only supported
|
||||
# when BL2_AT_EL3 is 1.
|
||||
BL2_IN_XIP_MEM := 0
|
||||
|
|
|
@ -233,7 +233,7 @@ int arm_bl2_handle_post_image_load(unsigned int image_id)
|
|||
******************************************************************************/
|
||||
int arm_bl2_plat_handle_post_image_load(unsigned int image_id)
|
||||
{
|
||||
#if defined(SPD_spmd) && SPMD_SPM_AT_SEL2
|
||||
#if defined(SPD_spmd) && BL2_ENABLE_SP_LOAD
|
||||
/* For Secure Partitions we don't need post processing */
|
||||
if ((image_id >= (MAX_NUMBER_IDS - MAX_SP_IDS)) &&
|
||||
(image_id < MAX_NUMBER_IDS)) {
|
||||
|
|
|
@ -217,7 +217,7 @@ endif
|
|||
ARM_IO_SOURCES += plat/arm/common/arm_io_storage.c \
|
||||
plat/arm/common/fconf/arm_fconf_io.c
|
||||
ifeq (${SPD},spmd)
|
||||
ifeq (${SPMD_SPM_AT_SEL2},1)
|
||||
ifeq (${BL2_ENABLE_SP_LOAD},1)
|
||||
ARM_IO_SOURCES += plat/arm/common/fconf/arm_fconf_sp.c
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2016-2021, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -32,7 +32,7 @@ void plat_flush_next_bl_params(void)
|
|||
next_bl_params_cpy_ptr);
|
||||
}
|
||||
|
||||
#if defined(SPD_spmd) && SPMD_SPM_AT_SEL2
|
||||
#if defined(SPD_spmd) && BL2_ENABLE_SP_LOAD
|
||||
/*******************************************************************************
|
||||
* This function appends Secure Partitions to list of loadable images.
|
||||
******************************************************************************/
|
||||
|
@ -76,7 +76,7 @@ static void plat_add_sp_images_load_info(struct bl_load_info *load_info)
|
|||
******************************************************************************/
|
||||
struct bl_load_info *plat_get_bl_image_load_info(void)
|
||||
{
|
||||
#if defined(SPD_spmd) && SPMD_SPM_AT_SEL2
|
||||
#if defined(SPD_spmd) && BL2_ENABLE_SP_LOAD
|
||||
bl_load_info_t *bl_load_info;
|
||||
|
||||
bl_load_info = get_bl_load_info_from_mem_params_desc();
|
||||
|
|
Loading…
Add table
Reference in a new issue