From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.web10.69.1628613653886801849 for ; Tue, 10 Aug 2021 09:40:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=Ah8PF6VJ; spf=pass (domain: linaro.org, ip: 209.85.128.42, mailfrom: etienne.carriere@linaro.org) Received: by mail-wm1-f42.google.com with SMTP id g138so1677205wmg.4 for ; Tue, 10 Aug 2021 09:40:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=p4D72kKkC2fT4Xp1114X/ppKzNUaZGbZ/yllq/Ogi+I=; b=Ah8PF6VJcfdQRQKUIYRMmTaT66L52CohJ00KKqg7ZNH15i0Zo+gYZ7j2pvbEQ4CVA7 UlRIh1KzSZrCABxN/bRSk5AwG8MzRHr4fPTC/JvX3Xh/K13c4rwifG22I+X9Nm53O7Go dfq9j3neQwFvL0oViZrkPRvwweEdT7sG7vGk6wySrUokt4q8wNFIlADcDUniFCWuPYiN tVXqKGaIKWQBMREHP7CwDqI9PINvePA4oxpM0I54HNGJD+knwFJqkiEU/WGaWlkOid1g +eQy3vmJIK2BJfemUSB+6gJg1bMkmHN07vnCdUwNzZjTMouQa3L79EQy+e+x/NidvEiA OSHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=p4D72kKkC2fT4Xp1114X/ppKzNUaZGbZ/yllq/Ogi+I=; b=Q9zmwt2f1C0DGdhF36LCgdLd3jSaAk839CsDRD4sXTTMjM+mtZjSOIFFTQL8u0QDN9 Czddp6Kr0cb0z7PB4lWGvmjE+npAFPAT2RC1HWHvQ1cwxog4NaYJy1l9ktUD3mErTwTr otm6fseZz8lQsuKuev+dLy38Jgmp5WAwHDOGo+k5Pv7bHFL1urbV7luEGAU+G0q9R4WP vmHxVwxTxmi/mZAjM5BsBT688LS5sq3tiWCgNx5NJ18PR5oyet91wjWcEULnmJRGkEgC sjGsnWOMznJiQIvzv+o5GzMB3vze0qShbEp48zKiWctqTfn4Th1bXcNCG+r/sRK70X9r Ha8g== X-Gm-Message-State: AOAM530Sd6rp1ASR7E5J0xNbHKlvmFguv7pbpufMtMqSzEg9nSuLsucF fF6dt2zBIxOKWyUNK2RhTR9yKG7S4jKwnQ== X-Google-Smtp-Source: ABdhPJwQJyCqqd3rxCqlYQlpR0oKDJ16AfkYgKoareFdj8+f8VvTUn8bhNFl6AVaTfG8STRCi254UA== X-Received: by 2002:a1c:f206:: with SMTP id s6mr22818179wmc.102.1628613652422; Tue, 10 Aug 2021 09:40:52 -0700 (PDT) Return-Path: Received: from lmecxl0524.lme.st.com ([2a04:cec0:10c1:ef71:f5e6:d24:9eea:1973]) by smtp.gmail.com with ESMTPSA id i3sm3196261wmb.17.2021.08.10.09.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 09:40:52 -0700 (PDT) From: "Etienne Carriere" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Ilias Apalodimas , Leif Lindholm , Sami Mujawar , Sughosh Ganu , Thomas Abraham , Etienne Carriere Subject: [PATCH v3 6/6] Platform/StandaloneMm: build StandaloneMmRpmb for 32bit architectures Date: Tue, 10 Aug 2021 18:40:36 +0200 Message-Id: <20210810164036.15199-7-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210810164036.15199-1-etienne.carriere@linaro.org> References: <20210810164036.15199-1-etienne.carriere@linaro.org> Build PlatformStandaloneMmRpmb for ARM architecture (32bit arm machine). The generated image targets an execution environment similar to AArch64 StMM secure partition in OP-TEE but in 32bit mode. GCC flag -fno-stack-protector added. The stack protection code bring GOT dependencies we prefer avoid when StMM runs in OP-TEE. Cc: Ard Biesheuvel Cc: Ilias Apalodimas Cc: Leif Lindholm Cc: Sami Mujawar Signed-off-by: Etienne Carriere --- No change since v2 Changes since v1: - Remove useless duplication of ArmSvcLib loading. - Move BaseStackCheckLib to generic library classes instead of ARM only. - include MdePkg/MdeLibs.dsc.inc instead of loading RegisterFilterLibNull.inf for ARM architecture. --- Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc index cb3f1ddf52..33364deb1e 100644 --- a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc +++ b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc @@ -16,12 +16,14 @@ PLATFORM_VERSION = 1.0 DSC_SPECIFICATION = 0x0001001C OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME) - SUPPORTED_ARCHITECTURES = AARCH64 + SUPPORTED_ARCHITECTURES = ARM|AARCH64 BUILD_TARGETS = DEBUG|RELEASE|NOOPT SKUID_IDENTIFIER = DEFAULT FLASH_DEFINITION = Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.fdf DEFINE DEBUG_MESSAGE = TRUE +!include MdePkg/MdeLibs.dsc.inc + ################################################################################ # # Library Class section - list of all Library Classes needed by this Platform. @@ -39,6 +41,7 @@ FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf @@ -68,6 +71,9 @@ # NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf +[LibraryClasses.ARM] + ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf + [LibraryClasses.common.MM_STANDALONE] HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf @@ -160,3 +166,7 @@ [BuildOptions.AARCH64] GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 -march=armv8-a+nofp GCC:*_*_*_CC_FLAGS = -mstrict-align + +[BuildOptions.ARM] +GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 -march=armv7-a +GCC:*_*_*_CC_FLAGS = -fno-stack-protector -- 2.17.1