From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web12.28946.1620633212064373501 for ; Mon, 10 May 2021 00:53:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=WzegdyMR; spf=pass (domain: linaro.org, ip: 209.85.221.43, mailfrom: etienne.carriere@linaro.org) Received: by mail-wr1-f43.google.com with SMTP id l13so15504972wru.11 for ; Mon, 10 May 2021 00:53:31 -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=iNYvcipGuTlrIw4Y4yiOL1ob9XxYM8UZ7IXv8hpfcrI=; b=WzegdyMRImEmnbcIwbmvsKMvHLGjRE3MN2Neu+P7kGNFcpmIu6Q4sk2sGIxjS9yL8q MRQiG22enoJi1nQ31wq3G7/hfnyL1tuWKYqTNZeEEIPgy41ES4orbPgDTrxxRXgJEw4z 2ngQ6UOZGDM1aC9dQCVv9gGX0fdB8JV1h7feGstPiULp6Pz2yphbQv22M382mXk/0nD+ tiu1HxD5UUNucENguqBPdm0RaKe0mZgCLMJjlRo4cZGbO0MuiKiS1A1APhj3Nwd1PLuG sCxsuZAqhZ0BGnmo3rRs7awxGlVrRzJKCaIBNFx9Q62diGUPdNvQtg7fELIPqaZEXmlZ 4iVA== 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=iNYvcipGuTlrIw4Y4yiOL1ob9XxYM8UZ7IXv8hpfcrI=; b=j5riy5e59Ld1waMUuNrx3EiFuaxDQq9ChlJCvG3UhojNhn9DfiR8Oq380d4XxkvMn4 BOpRAAI9WEVLy2EZjs2V55LtJoG7m/LLf3/1FkgyOSOD9SVQs2WGYYRUTLlL/lEi4MDG eYjwhp5UnFqp8T/AeEeXIXz8o7h3YqINquGhMqdvnvDMQrWJJRbHPQxDFjimqV98LaHT ECLwHNKMUIHpf2YO2ZWt6IUMIby0m+5KTcdLcDN5/0n3tGkJwkXP4dRuYcd9FS/AQC+d yUzxmfoNHM/CiNr51G3T2CtkuLOl+ZXeLFZbm0MH7TfQLnpVyeyKcIr4Tkhste8A3Yco LkhA== X-Gm-Message-State: AOAM530BzwdahmJW47fYQICkaVBUmK/HD1JnXUJIqtrME2fYntMtybq+ 3PZk7/pL+iEt+NDGTHjnKox3v9XLNwhJsah7 X-Google-Smtp-Source: ABdhPJxqKEfC5Hxtew3L9zXoODc/qYspRNMPlj4jyLVFpVuVFbRFaATYQMjvv8dYHl/XG3KVuBP/7Q== X-Received: by 2002:adf:e611:: with SMTP id p17mr29571321wrm.161.1620633210617; Mon, 10 May 2021 00:53:30 -0700 (PDT) Return-Path: Received: from lmecxl0524.home (2a01cb058b850800452ff0effb46d5f4.ipv6.abo.wanadoo.fr. [2a01:cb05:8b85:800:452f:f0ef:fb46:d5f4]) by smtp.gmail.com with ESMTPSA id o13sm18237660wmh.34.2021.05.10.00.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 00:53:30 -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: [edk2-platforms][PATCH 4/4] Platform/StandaloneMm: build StandaloneMmRpmb for 32bit architectures Date: Mon, 10 May 2021 09:53:04 +0200 Message-Id: <20210510075304.9125-5-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210510075304.9125-1-etienne.carriere@linaro.org> References: <20210510075304.9125-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 --- 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..996d4e4ba9 100644 --- a/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc +++ b/Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc @@ -16,7 +16,7 @@ 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 @@ -68,6 +68,12 @@ # NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf +[LibraryClasses.ARM] + ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf + NULL|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.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