This patch adds support for building Standalone Management Mode (MM)
image in Secure World on AARCH64 FVP which is used as BL32 image when
generating Firmware Image Package (FIP) using fiptool and it also adds
support for building uefi image with standalone MM support in normal
world on AARCH64 FVP which is used as BL33 image while generating
Firmware Image Package (FIP) using fiptool.
Standalone Management Mode (MM) image in Secure World on AARCH64 FVP
will be built using this command.
./uefi-tools/edk2-build.sh -b DEBUG fvp_mm_standalone
Uefi image with standalone MM support in normal world on AARCH64 FVP
will be built using this command.
./uefi-tools/edk2-build.sh -a ../arm-tf -b DEBUG fvp_mm_normal
Further, this patch modifies arm-tf build argument to build Secure
Partition Manager from "SPM=1" to "ENABLE_SPM=1". This change is
necessitated by the change in arm-tf upstream code.
Reference: https://github.com/ARM-software/arm-trusted-
firmware/blob/master/docs/secure-partition-manager-design.rst#id4
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh(a)arm.com>
---
atf-build.sh | 4 ++--
edk2-platforms.config | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/atf-build.sh b/atf-build.sh
index fb80ad0..a9b6358 100755
--- a/atf-build.sh
+++ b/atf-build.sh
@@ -134,8 +134,8 @@ function build_platform
SPM_BIN="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG -p $1 get -o spm_bin`"
if [ X"$SPM_BIN" != X"" ]; then
- BL32=$WORKSPACE/Build/StandaloneSmmPkg/$BUILD_PROFILE/FV/$SPM_BIN
- PLATFORM_BUILDFLAGS="$PLATFORM_BUILDFLAGS SPM=1"
+ BL32=$WORKSPACE/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/$SPM_BIN
+ PLATFORM_BUILDFLAGS="$PLATFORM_BUILDFLAGS ENABLE_SPM=1"
fi
# We assume that user does not want secure partition either.
# Todo: Revisit if either one of Trusted OS or Secure Partition Image is Mandatory.
diff --git a/edk2-platforms.config b/edk2-platforms.config
index 9cb6629..8c75f61 100644
--- a/edk2-platforms.config
+++ b/edk2-platforms.config
@@ -83,6 +83,27 @@ BUILD_ATF=yes
UEFI_BIN=FVP_AARCH64_EFI.fd
UEFI_IMAGE_DIR=ArmVExpress-FVP-AArch64
+# ARM FVP BASE AEMv8-A model
+[fvp_mm_standalone]
+LONGNAME=FVP Base for MM Standalone image in secure world
+DSC=Platform/ARM/VExpressPkg/ArmVExpress-StandaloneMm-FVP-AArch64.dsc
+BUILDFLAGS=-D EDK2_OUT_DIR=Build/ArmVExpress-FVP-AArch64-MM -D ARM_STANDALONE_MM_ENABLE
+ARCH=AARCH64
+UEFI_BIN=FVP_AARCH64_EFI_MM_STANDALONE.fd
+UEFI_IMAGE_DIR=ArmVExpress-FVP-AArch64-MM
+
+[fvp_mm_normal]
+LONGNAME=FVP Base for UEFI image with MM support in normal world
+DSC=Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
+BUILDFLAGS=-D EDK2_OUT_DIR=Build/ArmVExpress-FVP-AArch64-MM -D ARM_STANDALONE_MM_ENABLE=TRUE
+ARCH=AARCH64
+BUILD_ATF=debug
+UEFI_BIN=FVP_AARCH64_EFI.fd
+UEFI_IMAGE_DIR=ArmVExpress-FVP-AArch64-MM
+ATF_PLATFORM=fvp
+SPM_BIN=ARMVEXPRESS-STANDALONEMM-FVP-AARCH64.fd
+ATF_BUILDFLAGS=ARM_BL31_IN_DRAM=1
+
[tc2]
LONGNAME=Versatile Express TC2
BUILDFLAGS=-D ARM_BIGLITTLE_TC2=1
--
2.16.2