From: Sudeep Holla To: op-tee@lists.trustedfirmware.org Subject: Re: [PATCH v3 09/10] firmware: arm_ffa: Set up 32bit execution mode flag using partiion property Date: Thu, 08 Sep 2022 11:25:42 +0100 Message-ID: <20220908102542.a3g22ecjepodtmud@bogus> In-Reply-To: < > MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2795072580941602880==" List-Id: --===============2795072580941602880== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 08, 2022 at 12:08:00PM +0200, Jens Wiklander wrote: > On Wed, Sep 7, 2022 at 4:53 PM Sudeep Holla wrote: > > > > FF-A v1.1 adds a flag in the partition properties to indicate if the > > partition runs in the AArch32 or AArch64 execution state. Use the same > > to set-up the 32-bit execution flag mode in the ffa_dev automatically > > and ignore any requests to do the same from the ffa_driver. > > > > Signed-off-by: Sudeep Holla > > --- > > drivers/firmware/arm_ffa/driver.c | 13 ++++++++++++- > > include/linux/arm_ffa.h | 2 ++ > > 2 files changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa= /driver.c > > index 42bc22220c69..34e12a2a98fe 100644 > > --- a/drivers/firmware/arm_ffa/driver.c > > +++ b/drivers/firmware/arm_ffa/driver.c > > @@ -648,11 +648,19 @@ static int ffa_partition_info_get(const char *uuid_= str, > > return 0; > > } > > > > -static void ffa_mode_32bit_set(struct ffa_device *dev) > > +static void _ffa_mode_32bit_set(struct ffa_device *dev) > > { > > dev->mode_32bit =3D true; > > } > > > > +static void ffa_mode_32bit_set(struct ffa_device *dev) > > +{ > > + if (drv_info->version > FFA_VERSION_1_0) > > + return; > > + > > + _ffa_mode_32bit_set(dev); > > +} > > + > > static int ffa_sync_send_receive(struct ffa_device *dev, > > struct ffa_send_direct_data *data) > > { > > @@ -744,6 +752,9 @@ static void ffa_setup_partitions(void) > > __func__, tpbuf->id); > > continue; > > } > > + > > + if (!(tpbuf->properties & FFA_PARTITION_AARCH64_EXEC)) > > + _ffa_mode_32bit_set(ffa_dev); >=20 > For FF-A 1.0 it looks like we change the dev->mode_32bit default value > from false to true. Or am I missing something? > You are right, was trying to avoid additional check on version but we need that to keep the behaviour unchanged. I will add the check. Thanks again for spotting this. --=20 Regards, Sudeep --===============2795072580941602880==--