On Wed, May 24, 2017 at 01:51:47PM +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 | 11 +++++------ 2 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/atf-build.sh b/atf-build.sh index 15168c0..5876764 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"
fiecho "PLATFORM_SFS_PAYLOAD=$PLATFORM_SFS_PAYLOAD"
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_PAYLOAD"
if [ X"$SPD" == X"none" ] && [ X"$TOS_BIN" != X"" ]; then
BL32=$EDK2_DIR/$TOS_BIN
SPD_OPTION="BL32=$BL32"
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!"
fifi
- # # 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"
fiecho "CROSS_COMPILE="$CROSS_COMPILE" make -j$NUM_THREADS PLAT="$ATF_PLATFORM" $SPD_OPTION DEBUG=$DEBUG ${PLATFORM_BUILDFLAGS} all fip"
- 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 dc1ee21..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,16 +99,17 @@ 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 EDK2_ENABLE_SMSC_91X=1 -D ARM_STANDALONE_MM_ENABLE=TRUE +BUILDFLAGS=-D EDK2_OUT_DIR=Build/ArmVExpress-FVP-AArch64-MM-Normal -D ARM_STANDALONE_MM_ENABLE=TRUE
I'm not seeing the removal of -D EDK2_ENABLE_SMSC_91X=1 mentioned anywhere, or what the purpose is?
Other than that, looks fine.
/ Leif
ARCH=AARCH64 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 +ATF_SPD=none +ATF_BUILDFLAGS=ARM_BL31_IN_DRAM=1 SPM=1 [tc2] LONGNAME=Versatile Express TC2 -- 1.9.1