From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.web12.18422.1621255559847279229 for ; Mon, 17 May 2021 05:46:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=uuHKjOXd; spf=pass (domain: linaro.org, ip: 209.85.221.45, mailfrom: ilias.apalodimas@linaro.org) Received: by mail-wr1-f45.google.com with SMTP id i17so6230527wrq.11 for ; Mon, 17 May 2021 05:45:59 -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=/+8MMqtIIJQDjgja/iygz5qe+8UXIjPbc2alOlyyKgc=; b=uuHKjOXd+Z9jo+1Sc29gsexlwR2S/Lvw5255tIVDT7gLRNNWiMhIJxjPG7Ym4bvjny HP3vEWo75txg7AcirLh3R9Kr/zuQkySOnlPAz6/FItAGWUKnQ2ZCxRPVKv8dIxKzWTNx tqRaFslwLU0W+SEWdkipYc1oqOgb6P/HmokLud18lYwmZlMwP28yHlWnvkLaUSeyAbGD XAdXQkKcyrddml5IKUZLf0KQwv1oWLTmt2Nn1lplB3cfVzqLG52gSUmQVJfqWRGocmD4 xkUgJOPJv555STQ9IvSiO4IaC0jIGAPEEVsLnXmuLq+klAxebD6VZwt79/K0NEelebuF vIog== 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=/+8MMqtIIJQDjgja/iygz5qe+8UXIjPbc2alOlyyKgc=; b=SqjLroa1EcN9gxnUD5OY1kadd1C5N8NzTfm4eWGX0CXDvuDn6YyYfGr3G4PQX/tkEa hMh5mNgQV4nTgfPw0uO6OS6XN9Kc7z576J6Beuw9HDfoqGaYqkxmO4aXIquqnFpjKXua my/d7GAd9lKHbuKPAYG8xRWR0rZgxj+OhsKO8sUX4qXjkoupZcWlFDuiauLt6h3H+Fr3 XiiMIdb8kZOZB/9DT7whcrBHZZyLq7NoadmONPVJ2pV8I1948FfWn4ObfZa45ltv/Auh CS0pJWIEfGHyOThWc5g7LuxACur5V4+u41gB8r1/LLFebYlmUiGLjuvrZddMuyLUMUx5 3iNg== X-Gm-Message-State: AOAM532hbrwVdPJe8/v2KfbZ9b0fjCfGRZUYTIOvuaAF3NapRyye9l35 ZolSdGN1hA4g9FbxpRQ5sBu0/A== X-Google-Smtp-Source: ABdhPJy6xeEeC/T+T4zC3KCu/oEhvNiOVQGP01AvXMjCjOyMwaisXjGXL/XA+jhGzIImc9Gdfiu39g== X-Received: by 2002:a5d:40cd:: with SMTP id b13mr18918726wrq.356.1621255558283; Mon, 17 May 2021 05:45:58 -0700 (PDT) Return-Path: Received: from enceladus ([94.69.77.156]) by smtp.gmail.com with ESMTPSA id a23sm1696442wrc.22.2021.05.17.05.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 05:45:57 -0700 (PDT) Date: Mon, 17 May 2021 15:45:55 +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 4/6] Drivers/OpTee: Add Aarch32 SVC IDs for 32bit Arm targets Message-ID: References: <20210517055047.30814-1-etienne.carriere@linaro.org> <20210517055047.30814-4-etienne.carriere@linaro.org> MIME-Version: 1.0 In-Reply-To: <20210517055047.30814-4-etienne.carriere@linaro.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > Cc: Ilias Apalodimas > Cc: Leif Lindholm > Cc: Sami Mujawar > Signed-off-by: Etienne Carriere > --- > 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