public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ilias Apalodimas" <ilias.apalodimas@linaro.org>
To: Etienne Carriere <etienne.carriere@linaro.org>
Cc: devel@edk2.groups.io, Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Leif Lindholm <leif@nuviainc.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Sughosh Ganu <sughosh.ganu@linaro.org>,
	Thomas Abraham <thomas.abraham@arm.com>
Subject: Re: [edk2-platforms][PATCH v2 6/6] Platform/StandaloneMm: build StandaloneMmRpmb for 32bit architectures
Date: Mon, 17 May 2021 15:47:02 +0300	[thread overview]
Message-ID: <YKJlxiAho9Sk6N+B@enceladus> (raw)
In-Reply-To: <20210517055047.30814-6-etienne.carriere@linaro.org>

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 <ardb+tianocore@kernel.org>
> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
> 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 <ilias.apalodimas@linaro.org>

  reply	other threads:[~2021-05-17 12:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17  5:50 [edk2-platforms][PATCH v2 1/6] Platform/ARM/SgiPkg: sync with edk2 StandaloneMmCpu path change Etienne Carriere
2021-05-17  5:50 ` [edk2-platforms][PATCH v2 2/6] Platform/Socionext/DeveloperBox: " Etienne Carriere
2021-05-18 14:42   ` Sami Mujawar
2021-05-17  5:50 ` [edk2-platforms][PATCH v2 3/6] Platform/StandaloneMm: " Etienne Carriere
2021-05-17 12:44   ` Ilias Apalodimas
2021-05-18 14:42   ` Sami Mujawar
2021-05-17  5:50 ` [edk2-platforms][PATCH v2 4/6] Drivers/OpTee: Add Aarch32 SVC IDs for 32bit Arm targets Etienne Carriere
2021-05-17 12:45   ` Ilias Apalodimas
2021-05-18 14:42   ` Sami Mujawar
2021-05-17  5:50 ` [edk2-platforms][PATCH v2 5/6] Drivers/OpTee: address cast build warning issue in 32b mode Etienne Carriere
2021-05-17 12:46   ` Ilias Apalodimas
2021-05-18 14:43   ` Sami Mujawar
2021-05-17  5:50 ` [edk2-platforms][PATCH v2 6/6] Platform/StandaloneMm: build StandaloneMmRpmb for 32bit architectures Etienne Carriere
2021-05-17 12:47   ` Ilias Apalodimas [this message]
2021-05-18 14:43   ` Sami Mujawar
2021-05-17 14:21 ` [edk2-platforms][PATCH v2 1/6] Platform/ARM/SgiPkg: sync with edk2 StandaloneMmCpu path change Thomas Abraham
2021-05-18 14:42 ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKJlxiAho9Sk6N+B@enceladus \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox