From: "Sami Mujawar" <sami.mujawar@arm.com>
To: Etienne Carriere <etienne.carriere@linaro.org>, devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Leif Lindholm <leif@nuviainc.com>,
Sughosh Ganu <sughosh.ganu@linaro.org>,
Thomas Abraham <thomas.abraham@arm.com>,
nd@arm.com
Subject: Re: [edk2-platforms][PATCH 2/4] Drivers/OpTee: Add Aarch32 SVC IDs for 32bit Arm targets
Date: Wed, 12 May 2021 11:11:58 +0100 [thread overview]
Message-ID: <8b08b464-6293-f8a6-cbc6-835acd99c157@arm.com> (raw)
In-Reply-To: <20210510075304.9125-3-etienne.carriere@linaro.org>
Hi Etienne,
I have some minor suggestion marked inline as [SAMI].
With that addressed.
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Regards,
Sami Mujawar
On 10/05/2021 08:53 AM, 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>
> ---
> 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..bf4a39b9db 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_64 0xC4000066
> +#define SP_SVC_RPMB_WRITE_64 0xC4000067
> +
> +#define SP_SVC_RPMB_READ_32 0x84000066
> +#define SP_SVC_RPMB_WRITE_32 0x84000067
[SAMI] Is it possible to change the _64 and _32 postfixes to AARCH64 and
AARCH32 appropriately, please?
[/SAMI]
> +
> +#ifdef MDE_CPU_AARCH64
> +#define SP_SVC_RPMB_READ SP_SVC_RPMB_READ_64
> +#define SP_SVC_RPMB_WRITE SP_SVC_RPMB_WRITE_64
> +#endif
> +#ifdef MDE_CPU_ARM
> +#define SP_SVC_RPMB_READ SP_SVC_RPMB_READ_32
> +#define SP_SVC_RPMB_WRITE SP_SVC_RPMB_WRITE_32
> +#endif
>
> #define FLASH_SIGNATURE SIGNATURE_32 ('r', 'p', 'm', 'b')
> #define INSTANCE_FROM_FVB_THIS(a) CR (a, MEM_INSTANCE, FvbProtocol, \
next prev parent reply other threads:[~2021-05-12 10:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 7:53 [edk2-platforms][PATCH 0/4] Arm 32bit support in StandaloneMmRpmb Etienne Carriere
2021-05-10 7:53 ` [edk2-platforms][PATCH 1/4] sync with edk2 where StandaloneMmCpu moved to AArch64/ parent directory Etienne Carriere
2021-05-12 10:11 ` Sami Mujawar
2021-05-10 7:53 ` [edk2-platforms][PATCH 2/4] Drivers/OpTee: Add Aarch32 SVC IDs for 32bit Arm targets Etienne Carriere
2021-05-12 10:11 ` Sami Mujawar [this message]
2021-05-10 7:53 ` [edk2-platforms][PATCH 3/4] Drivers/OpTee: address cast build warning issue in 32b mode Etienne Carriere
2021-05-12 10:24 ` Sami Mujawar
2021-05-10 7:53 ` [edk2-platforms][PATCH 4/4] Platform/StandaloneMm: build StandaloneMmRpmb for 32bit architectures Etienne Carriere
2021-05-12 10:13 ` Sami Mujawar
2021-05-10 15:57 ` [edk2-platforms][PATCH 0/4] Arm 32bit support in StandaloneMmRpmb Ard Biesheuvel
2021-05-10 18:04 ` Ilias Apalodimas
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=8b08b464-6293-f8a6-cbc6-835acd99c157@arm.com \
--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