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 4/6] Drivers/OpTee: Add Aarch32 SVC IDs for 32bit Arm targets
Date: Mon, 17 May 2021 15:45:55 +0300	[thread overview]
Message-ID: <YKJlg2Kvcnu+HQ0y@enceladus> (raw)
In-Reply-To: <20210517055047.30814-4-etienne.carriere@linaro.org>

On Mon, May 17, 2021 at 07:50:45AM +0200, Etienne Carriere wrote:
> Add SMCCC function IDs for RPMB read/write service on 32bit architectures.
> Define generic SP_SVC_RPMB_READ/SP_SVC_RPMB_WRITE IDs for native target
> architecture (32b or 64b).
> 
> Changes OpTeeRpmbFvb.c to use architecture agnostic macro
> ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ for 32b and 64b support.
> 
> 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:
> - Use _AARCH64 (resp. _AARCH32) suffix instead of _64 (resp. _32) in
>   the added macros.
> ---
>  Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c |  2 +-
>  Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.h | 16 ++++++++++++++--
>  2 files changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c b/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c
> index 5197c95abd..6eb19bed0e 100644
> --- a/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c
> +++ b/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c
> @@ -68,7 +68,7 @@ ReadWriteRpmb (
>  
>    ZeroMem (&SvcArgs, sizeof (SvcArgs));
>  
> -  SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64;
> +  SvcArgs.Arg0 = ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ;
>    SvcArgs.Arg1 = mStorageId;
>    SvcArgs.Arg2 = 0;
>    SvcArgs.Arg3 = SvcAct;
> diff --git a/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.h b/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.h
> index c17fc287ef..9c2a4ea6a5 100644
> --- a/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.h
> +++ b/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.h
> @@ -13,8 +13,20 @@
>   contract between OP-TEE and EDK2.
>   For more details check core/arch/arm/include/kernel/stmm_sp.h in OP-TEE
>  **/
> -#define SP_SVC_RPMB_READ                0xC4000066
> -#define SP_SVC_RPMB_WRITE               0xC4000067
> +#define SP_SVC_RPMB_READ_AARCH64        0xC4000066
> +#define SP_SVC_RPMB_WRITE_AARCH64       0xC4000067
> +
> +#define SP_SVC_RPMB_READ_AARCH32        0x84000066
> +#define SP_SVC_RPMB_WRITE_AARCH32       0x84000067
> +
> +#ifdef MDE_CPU_AARCH64
> +#define SP_SVC_RPMB_READ                SP_SVC_RPMB_READ_AARCH64
> +#define SP_SVC_RPMB_WRITE               SP_SVC_RPMB_WRITE_AARCH64
> +#endif
> +#ifdef MDE_CPU_ARM
> +#define SP_SVC_RPMB_READ                SP_SVC_RPMB_READ_AARCH32
> +#define SP_SVC_RPMB_WRITE               SP_SVC_RPMB_WRITE_AARCH32
> +#endif
>  
>  #define FLASH_SIGNATURE            SIGNATURE_32 ('r', 'p', 'm', 'b')
>  #define INSTANCE_FROM_FVB_THIS(a)  CR (a, MEM_INSTANCE, FvbProtocol, \
> -- 
> 2.17.1
> 

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

  reply	other threads:[~2021-05-17 12:46 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 [this message]
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
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=YKJlg2Kvcnu+HQ0y@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