From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mx.groups.io with SMTP id smtpd.web12.18435.1621255626132055452 for ; Mon, 17 May 2021 05:47:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=JNCDO1x5; spf=pass (domain: linaro.org, ip: 209.85.221.53, mailfrom: ilias.apalodimas@linaro.org) Received: by mail-wr1-f53.google.com with SMTP id r12so6277148wrp.1 for ; Mon, 17 May 2021 05:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ej7sVKQSAIWy0+EuE90epRqNUK7p9XtUXRk1nyIfiLM=; b=JNCDO1x5kPfUwS9Hnne0SXCgVBPVinQr6UGqEZwmXEwTAloT6lnaSw6ML1M/eAHKw2 4nJhHiV+4D2wBikte4vqNU56vW7yNG8S9APol022MMElUGZBmFg3g9kv1Zq9jLNpBjbP ZJMJ2ZowvPhiNisxK6EmE5TX01/D3coUjLM9aQKEdrNnQZLkE8LIKBI0xo6Dxz6wVObg GaNn+uCiqscy2qSsYW4vqdvGe052TZJ2YOQIEQs+oeNMFO1nRLksirbc9iRSvKuuu71B ZvkRAyRWNIGZr0xZj9RFcndRsZEwHppCJj3khnS8RuAdeHfKfQrFYVaqWoemGai5jIUY /uFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ej7sVKQSAIWy0+EuE90epRqNUK7p9XtUXRk1nyIfiLM=; b=oTlFelSxbN+X3UEwKEn37U3z/ChoMXN8IOth+XqDvC3tmcU97LPYraQ6XlzT3Zg2K5 bILTvPP3sbR+xFiVjaT2tntJJSrmBLyEhLwKEeSj0RtEOWpeRZ/ToTUowGrry1t/CqAw 4VXwZ4iice4EsrJOcLL78yCtAogQyUaEQrc1rbnjQUzMCcBsG0o8ap44FZoVcPA4v66Z 0u5KXU/NlffPGYq0F8tjjFOb8QB3EnsTsf9pqP/0xNtCJaX1UF2p7EZmpJZwnwultDOQ maA6tNkFg0vIYeZOpGmhGrM/NEST2DfOqG9UhU+OKIUFeYJVDxjSs8e3jxPtnCWzc1/E MQoA== X-Gm-Message-State: AOAM530HasVLOcbTPYkVb7sgBVS3tsmjrqrOR0VKY7jE5PWileBG+XTE y4wYNYNzCKtrynmzPjtL6GPIvQ== X-Google-Smtp-Source: ABdhPJzR0DnHLaEjx6V0+4qVkAwzgVkqEKQgLWz6pBfY4xYooOdZTkORczK5LlopMUb7U15Rm1zcCQ== X-Received: by 2002:a5d:618f:: with SMTP id j15mr4753205wru.273.1621255624787; Mon, 17 May 2021 05:47:04 -0700 (PDT) Return-Path: Received: from enceladus ([94.69.77.156]) by smtp.gmail.com with ESMTPSA id g10sm10672345wrq.12.2021.05.17.05.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 05:47:04 -0700 (PDT) Date: Mon, 17 May 2021 15:47:02 +0300 From: "Ilias Apalodimas" To: Etienne Carriere Cc: devel@edk2.groups.io, Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Sughosh Ganu , Thomas Abraham Subject: Re: [edk2-platforms][PATCH v2 6/6] Platform/StandaloneMm: build StandaloneMmRpmb for 32bit architectures Message-ID: References: <20210517055047.30814-1-etienne.carriere@linaro.org> <20210517055047.30814-6-etienne.carriere@linaro.org> MIME-Version: 1.0 In-Reply-To: <20210517055047.30814-6-etienne.carriere@linaro.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 17, 2021 at 07:50:47AM +0200, Etienne Carriere wrote: > 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 > Acked-by: Ilias Apalodimas