On Wed, 2017-05-24 at 17:38 +0100, achin.gupta@arm.com wrote:
From: Achin Gupta achin.gupta@arm.com
The build options for including the Standalone MM image in a FIP during an ARM TF build have changed. The MM image is now included as a pre-built BL32 image instead of an SFS_PAYLOAD image. Also, the option to include the MM Dispatcher component has changed from SFSD=mmd to SPM=1. This patch implements these changes to match the latest ARM TF patchset for MM support.
Signed-off-by: Achin Gupta achin.gupta@arm.com
atf-build.sh | 31 ++++++++++++++++++++----------- platforms.config | 9 ++++----- 2 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/atf-build.sh b/atf-build.sh index 8df1a11..5c45708 100755 --- a/atf-build.sh +++ b/atf-build.sh @@ -60,14 +60,12 @@ function build_platform PLATFORM_ARCH="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG -p $1 get -o arch`" PLATFORM_IMAGE_DIR="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG -p $1 get -o uefi_image_dir`" PLATFORM_BUILDFLAGS="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG -p $1 get -o atf_buildflags`"
- PLATFORM_SFS_PAYLOAD="`$TOOLS_DIR/parse-platforms.py
$PLATFORM_CONFIG -p $1 get -o atf_sfs_payload`" if [ $VERBOSE -eq 1 ]; then echo "PLATFORM_NAME=$PLATFORM_NAME" echo "PLATFORM_ARCH=$PLATFORM_ARCH" echo "PLATFORM_IMAGE_DIR=$PLATFORM_IMAGE_DIR" echo "PLATFORM_BUILDFLAGS=$PLATFORM_BUILDFLAGS"
echo "PLATFORM_SFS_PAYLOAD=$PLATFORM_SFS_PAYLOAD"
fi unset BL30 BL31 BL32 BL33 @@ -118,16 +116,27 @@ function build_platform echo " Please specify both ATF_SPD and TOS_BIN" echo " if you wish to use a Trusted OS!" fi
- fi
- else
- #
- # BL32 could be the secure partition.
- # If TOS_DIR is not set and the SPD is none then include
BL32 as a
- # prebuilt secure partition.
- #
SPD="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG
-p $1 get -o atf_spd`"
TOS_BIN="`$TOOLS_DIR/parse-platforms.py
$PLATFORM_CONFIG -p $1 get -o tos_bin`"
- if [ X"$PLATFORM_SFS_PAYLOAD" != X"" ]; then
#
# Since SFS cannot be exported or undefined,
# we parametrise it here
#
SFS_OPTION="SFS_PAYLOAD=$EDK2_DIR/$PLATFORM_SFS_PAYL
OAD"
if [ X"$SPD" == X"none" ] && [ X"$TOS_BIN" != X"" ];
then
BL32=$EDK2_DIR/$TOS_BIN
SPD_OPTION="BL32=$BL32"
Here, we need to set SPD_OPTION="SPM=1" as BL32 is set in the previous statement already.
else
echo "WARNING: Proceeding without
Secure Partition!"
echo " Please specify both
ATF_SPD=none and TOS_BIN"
echo " if you wish to use a
Secure Partition!"
fi
fi
# # Debug extraction handling # @@ -167,9 +176,9 @@ function build_platform # if [ $VERBOSE -eq 1 ]; then echo "Calling ARM Trusted Firmware build:"
echo "CROSS_COMPILE="$CROSS_COMPILE" make
-j$NUM_THREADS PLAT="$ATF_PLATFORM" $SPD_OPTION $SFS_OPTION DEBUG=$DEBUG ${PLATFORM_BUILDFLAGS} all fip"
echo "CROSS_COMPILE="$CROSS_COMPILE" make
-j$NUM_THREADS PLAT="$ATF_PLATFORM" $SPD_OPTION DEBUG=$DEBUG ${PLATFORM_BUILDFLAGS} all fip" fi
- CROSS_COMPILE="$CROSS_COMPILE" make -j$NUM_THREADS
PLAT="$ATF_PLATFORM" $SPD_OPTION $SFS_OPTION DEBUG=$DEBUG ${PLATFORM_BUILDFLAGS} all fip
- CROSS_COMPILE="$CROSS_COMPILE" make -j$NUM_THREADS
PLAT="$ATF_PLATFORM" $SPD_OPTION DEBUG=$DEBUG ${PLATFORM_BUILDFLAGS} all fip if [ $? -eq 0 ]; then # # Copy resulting images to UEFI image dir diff --git a/platforms.config b/platforms.config index 5455477..5332e0f 100644 --- a/platforms.config +++ b/platforms.config @@ -51,8 +51,6 @@ # - BUILDFLAGS Any special flags you want to pass to the build command. # - ATF_BUILDFLAGS Any special flags you want to pass to the ARM Trusted # Firmware build command. -# - ATF_SFS_PAYLOAD Any special secure firmware service payload you want -# to pass to the ARM trusted Firmware build command. # - TOS_BUILDFLAGS Any special flags you want to pass to the Trusted OS # build command. # - EXTRA_FILES Any additional files to be copied to output dir. @@ -101,7 +99,7 @@ UEFI_BIN=FVP_AARCH64_EFI_MM_STANDALONE.fd UEFI_IMAGE_DIR=ArmVExpress-FVP-AArch64-MM-Standalone [fvp_mm_normal] -LONGNAME=FVP Base for UEFI image with MM support in normal world" +LONGNAME=FVP Base for UEFI image with MM support in normal world DSC=OpenPlatformPkg/Platforms/ARM/VExpress/ArmVExpress-FVP- AArch64.dsc BUILDFLAGS=-D EDK2_OUT_DIR=Build/ArmVExpress-FVP-AArch64-MM-Normal -D ARM_STANDALONE_MM_ENABLE=TRUE ARCH=AARCH64 @@ -109,8 +107,9 @@ BUILD_ATF=debug UEFI_BIN=FVP_AARCH64_EFI.fd UEFI_IMAGE_DIR=ArmVExpress-FVP-AArch64-MM-Normal ATF_PLATFORM=fvp -ATF_SFS_PAYLOAD=Build/StandaloneSmmPkg/DEBUG_GCC49/FV/STANDALONESMM. fd -ATF_BUILDFLAGS=ARM_TSP_RAM_LOCATION=dram SFSD=mmd +TOS_BIN=Build/StandaloneSmmPkg/DEBUG_GCC49/FV/STANDALONESMM.fd
It should be "Build/StandaloneSmmPkg/DEBUG_GCC5/FV/STANDALONESMM.fd"
+ATF_SPD=none +ATF_BUILDFLAGS=ARM_BL31_IN_DRAM=1 SPM=1
SPM=1 should be set TOS_BIN is available and ATF_SPD=none, so better to remove it from here.
[tc2] LONGNAME=Versatile Express TC2