Merge changes from topic "ns/spmc_at_el3" into integration

* changes:
  feat(sgi): increase sp memmap size
  feat(build): include plat header in fdt build
  feat(docs): save BL32 image base and size in entry point info
  feat(arm): save BL32 image base and size in entry point info
This commit is contained in:
Manish V Badarkhe 2023-11-07 15:47:44 +01:00 committed by TrustedFirmware Code Review
commit c1701c8ec9
4 changed files with 32 additions and 8 deletions

View file

@ -399,10 +399,6 @@ else
endif #(LD = armlink)
DTC_FLAGS += -I dts -O dtb
DTC_CPPFLAGS += -P -nostdinc -Iinclude -Ifdts -undef \
-x assembler-with-cpp $(DEFINES)
################################################################################
# Setup ARCH_MAJOR/MINOR before parsing arch_features.
################################################################################
@ -444,6 +440,10 @@ INCLUDES += -Iinclude \
${PLAT_INCLUDES} \
${SPD_INCLUDES}
DTC_FLAGS += -I dts -O dtb
DTC_CPPFLAGS += -P -nostdinc $(INCLUDES) -Ifdts -undef \
-x assembler-with-cpp $(DEFINES)
include common/backtrace/backtrace.mk
################################################################################

View file

@ -130,6 +130,12 @@ convention:
- For other BL3x images, if the firmware configuration file is loaded by
BL2, then its address is passed in ``arg0`` and if HW_CONFIG is loaded
then its address is passed in ``arg1``.
- In case SPMC_AT_EL3 is enabled, populate the BL32 image base, size and max
limit in the entry point information, since there is no platform function
to retrieve these in generic code. We choose ``arg2``, ``arg3`` and
``arg4`` since the generic code uses ``arg1`` for stashing the SP manifest
size. The SPMC setup uses these arguments to update SP manifest with
actual SP's base address and it size.
- In case of the Arm FVP platform, FW_CONFIG address passed in ``arg1`` to
BL31/SP_MIN, and the SOC_FW_CONFIG and HW_CONFIG details are retrieved
from FW_CONFIG device tree.

View file

@ -198,6 +198,24 @@ void __init arm_bl31_early_platform_setup(void *from_bl2, uintptr_t soc_fw_confi
while (bl_params != NULL) {
if (bl_params->image_id == BL32_IMAGE_ID) {
bl32_image_ep_info = *bl_params->ep_info;
#if defined(SPMC_AT_EL3)
/*
* Populate the BL32 image base, size and max limit in
* the entry point information, since there is no
* platform function to retrieve them in generic
* code. We choose arg2, arg3 and arg4 since the generic
* code uses arg1 for stashing the SP manifest size. The
* SPMC setup uses these arguments to update SP manifest
* with actual SP's base address and it size.
*/
bl32_image_ep_info.args.arg2 =
bl_params->image_info->image_base;
bl32_image_ep_info.args.arg3 =
bl_params->image_info->image_size;
bl32_image_ep_info.args.arg4 =
bl_params->image_info->image_base +
bl_params->image_info->image_max_size;
#endif
}
#if ENABLE_RME
else if (bl_params->image_id == RMM_IMAGE_ID) {

View file

@ -34,10 +34,10 @@
*/
#if defined(IMAGE_BL31)
# if SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP)
# define PLAT_ARM_MMAP_ENTRIES (9 + ((CSS_SGI_CHIP_COUNT - 1) * 3))
# define MAX_XLAT_TABLES (7 + ((CSS_SGI_CHIP_COUNT - 1) * 3))
# define PLAT_SP_IMAGE_MMAP_REGIONS 10
# define PLAT_SP_IMAGE_MAX_XLAT_TABLES 12
# define PLAT_ARM_MMAP_ENTRIES (10 + ((CSS_SGI_CHIP_COUNT - 1) * 3))
# define MAX_XLAT_TABLES (8 + ((CSS_SGI_CHIP_COUNT - 1) * 3))
# define PLAT_SP_IMAGE_MMAP_REGIONS 12
# define PLAT_SP_IMAGE_MAX_XLAT_TABLES 14
# else
# define PLAT_ARM_MMAP_ENTRIES (5 + ((CSS_SGI_CHIP_COUNT - 1) * 3))
# define MAX_XLAT_TABLES (6 + ((CSS_SGI_CHIP_COUNT - 1) * 3))