From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.web08.15321.1621230693521303870 for ; Sun, 16 May 2021 22:51:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=Zulf517n; spf=pass (domain: linaro.org, ip: 209.85.221.48, mailfrom: etienne.carriere@linaro.org) Received: by mail-wr1-f48.google.com with SMTP id i17so4973238wrq.11 for ; Sun, 16 May 2021 22:51:33 -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=dUJFiHbK+TmIEfQgpr4sL280i+iicUhaQFNVgUUf9eI=; b=Zulf517nrfGOGtHKcg6NzNGBs+3IrBMmnKywc+0WvDm5lG1MD2FqM80MH5hUrEf3ZW d00BvY6o8Lgb91lqLzSX9L5DPUvK4SOx9xidKBTvMOPNn93uMVNX2gCq1++MwVLRyi9d 2p1tD24w0YYu+9GcPtyaUoem9owrc+W6G0Ohz5KcyCiy5G9eMl4WH6Z+LIzV8apqpMJz YbKiwL0CotbqArfO1vFxJnF9yfCCUw3TBWE+9X/do7ZOLzQ7/YJCochfOHG28q9dPkCb 5vHeVjb+TMxcFkG/hq1bJKpJnRhrLsnwPTkKBMC+Ct6mcaXEjfoiUP70aRH/Uy17bUe4 JHnQ== 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=dUJFiHbK+TmIEfQgpr4sL280i+iicUhaQFNVgUUf9eI=; b=B36fMcz6Nun1ST4/hhgijeuIe2hqCbPKOX53h41Ij1Ej4ovrsR3kz7aepFcT66zya+ rL2PYrh4ZK8d5zAiWqXyDwdr8Cn/71wF7WAPpvKUbpIUwrfRFHnX4pFAcXSDjNiEiJ/R qVnsNwDnOPIlBx/jT4M+8oJVZjNpYThshYthD3wn0oBpPabWNByDmoMg3WRproFiBUGc jA2cxNsbFoZzBt7VvmcUTIP/KgEPLsTHQBJG9TYQms+7eThfQqI3XH3KfN9ybmSx8jbi B+906+wl50HENx88wXMs9bXM/MLcLYi1PkQcFjRTay9y+0xZMlFsYQaBts7oMQFNbdyz CKXA== X-Gm-Message-State: AOAM530y0SoIEeeDHTGUKPzBhHu7cfoZrEmJEco+9EFoJW5g1PsYf1HY EYEGBnL/aj6Yg4oyULGBaY4ON0dm9gvNew10 X-Google-Smtp-Source: ABdhPJykls7g6YU3gbZDUUdAD5OPlULTTEiQ1MWL6BtXQ8tr0M5aPDJKZkTa3vnoC0t2dRuUJV+0WA== X-Received: by 2002:a5d:440d:: with SMTP id z13mr26758860wrq.134.1621230692091; Sun, 16 May 2021 22:51:32 -0700 (PDT) Return-Path: Received: from lmecxl0524.lme.st.com (2a01cb058b850800452ff0effb46d5f4.ipv6.abo.wanadoo.fr. [2a01:cb05:8b85:800:452f:f0ef:fb46:d5f4]) by smtp.gmail.com with ESMTPSA id a23sm82660wrc.22.2021.05.16.22.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 May 2021 22:51:31 -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 v2 6/6] Platform/StandaloneMm: build StandaloneMmRpmb for 32bit architectures Date: Mon, 17 May 2021 07:50:47 +0200 Message-Id: <20210517055047.30814-6-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517055047.30814-1-etienne.carriere@linaro.org> References: <20210517055047.30814-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 --- 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