mbox series

[v4,0/7] firmware: Add initial support for Arm FF-A

Message ID 20210212154614.38604-1-sudeep.holla@arm.com
Headers show
Series firmware: Add initial support for Arm FF-A | expand

Message

Sudeep Holla Feb. 12, 2021, 3:46 p.m. UTC
Hi all,

This is very basic implementation for in-kernel support for Arm FF-A
specification.

iArm Firmware Framework for Armv8-A specification[1] describes a software
architecture that provides mechanism to utilise the virtualization
extension to isolate software images and describes interfaces that
standardize communication between the various software images. This
includes communication between images in the Secure and Normal world.

The main idea here is to create FFA device to establish any communication
with a secure partition. This is currently tested with OPTEE(with changes
to OPTEE driver adding FFA as transport)

The series can be fetched from [2]

--
Regards,
Sudeep

[1] https://developer.arm.com/documentation/den0077/latest
[2] git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git v5.11/ffa

v3->v4:
	- Added support to allow partitions to set 32bit only mode
	- Addressed all the comments from Jens Wiklander

v2->v3:
	- Dropped hypervisor partitions and userspace support as it is
	  no longer in the list of requirements
	- Moved away from ioctl style interface for in-kernel users as
	  there is no need to keep in sync with userspace anymore
	- Some kerneldoc fixes as pointed out in earlier reviews

v1->v2:
	- Moved userspace code to a separate unit, will move to separate
	  module. Still working on minimizing initcall dependencies and
	  exported functions to reuse some of the code.
	- Fixed couple of minor issues pointed out
	- Dropped ASYNC send message as I haven't been able to test


Sudeep Holla (7):
  dt-bindings: Arm: Add Firmware Framework for Armv8-A (FF-A) binding
  arm64: smccc: Add support for SMCCCv1.2 input/output registers
  firmware: arm_ffa: Add initial FFA bus support for device enumeration
  firmware: arm_ffa: Add initial Arm FFA driver support
  firmware: arm_ffa: Add support for SMCCC as transport to FFA driver
  firmware: arm_ffa: Setup in-kernel users of FFA partitions
  firmware: arm_ffa: Add support for MEM_* interfaces

 .../devicetree/bindings/arm/arm,ffa.yaml      |  58 ++
 arch/arm64/kernel/asm-offsets.c               |   4 +
 arch/arm64/kernel/smccc-call.S                |  22 +
 drivers/firmware/Kconfig                      |   1 +
 drivers/firmware/Makefile                     |   1 +
 drivers/firmware/arm_ffa/Kconfig              |  21 +
 drivers/firmware/arm_ffa/Makefile             |   6 +
 drivers/firmware/arm_ffa/bus.c                | 181 +++++
 drivers/firmware/arm_ffa/common.h             |  32 +
 drivers/firmware/arm_ffa/driver.c             | 669 ++++++++++++++++++
 drivers/firmware/arm_ffa/smccc.c              |  54 ++
 include/linux/arm-smccc.h                     |  50 ++
 include/linux/arm_ffa.h                       | 277 ++++++++
 13 files changed, 1376 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/arm,ffa.yaml
 create mode 100644 drivers/firmware/arm_ffa/Kconfig
 create mode 100644 drivers/firmware/arm_ffa/Makefile
 create mode 100644 drivers/firmware/arm_ffa/bus.c
 create mode 100644 drivers/firmware/arm_ffa/common.h
 create mode 100644 drivers/firmware/arm_ffa/driver.c
 create mode 100644 drivers/firmware/arm_ffa/smccc.c
 create mode 100644 include/linux/arm_ffa.h

-- 
2.25.1

Comments

Sudeep Holla March 16, 2021, 2:34 p.m. UTC | #1
Hi Jens,

On Fri, Feb 12, 2021 at 03:46:07PM +0000, Sudeep Holla wrote:
> Hi all,

>

> This is very basic implementation for in-kernel support for Arm FF-A

> specification.

>

> Arm Firmware Framework for Armv8-A specification[1] describes a software

> architecture that provides mechanism to utilise the virtualization

> extension to isolate software images and describes interfaces that

> standardize communication between the various software images. This

> includes communication between images in the Secure and Normal world.

>

> The main idea here is to create FFA device to establish any communication

> with a secure partition. This is currently tested with OPTEE(with changes

> to OPTEE driver adding FFA as transport)

>


Since you reviewed the last version, it would be helpful if you provide
Reviewed-by or Tested-by if you happy with this version. I would like to
get this initial version merged for v5.13

--
Regards,
Sudeep
Jens Wiklander March 18, 2021, 2:09 p.m. UTC | #2
Hi Sudeep,

On Tue, Mar 16, 2021 at 3:34 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
>

> Hi Jens,

>

> On Fri, Feb 12, 2021 at 03:46:07PM +0000, Sudeep Holla wrote:

> > Hi all,

> >

> > This is very basic implementation for in-kernel support for Arm FF-A

> > specification.

> >

> > Arm Firmware Framework for Armv8-A specification[1] describes a software

> > architecture that provides mechanism to utilise the virtualization

> > extension to isolate software images and describes interfaces that

> > standardize communication between the various software images. This

> > includes communication between images in the Secure and Normal world.

> >

> > The main idea here is to create FFA device to establish any communication

> > with a secure partition. This is currently tested with OPTEE(with changes

> > to OPTEE driver adding FFA as transport)

> >

>

> Since you reviewed the last version, it would be helpful if you provide

> Reviewed-by or Tested-by if you happy with this version. I would like to

> get this initial version merged for v5.13


I've tested this in a few of my setups and everything looks over all
fine, so please apply:
Tested-by: Jens Wiklander <jens.wiklander@linaro.org>


I'm also double checking the details of the patches for some further
feedback. Stay tuned.

Thanks,
Jens
Jens Wiklander March 19, 2021, 7:56 a.m. UTC | #3
On Thu, Mar 18, 2021 at 3:09 PM Jens Wiklander
<jens.wiklander@linaro.org> wrote:
>

> Hi Sudeep,

>

> On Tue, Mar 16, 2021 at 3:34 PM Sudeep Holla <sudeep.holla@arm.com> wrote:

> >

> > Hi Jens,

> >

> > On Fri, Feb 12, 2021 at 03:46:07PM +0000, Sudeep Holla wrote:

> > > Hi all,

> > >

> > > This is very basic implementation for in-kernel support for Arm FF-A

> > > specification.

> > >

> > > Arm Firmware Framework for Armv8-A specification[1] describes a software

> > > architecture that provides mechanism to utilise the virtualization

> > > extension to isolate software images and describes interfaces that

> > > standardize communication between the various software images. This

> > > includes communication between images in the Secure and Normal world.

> > >

> > > The main idea here is to create FFA device to establish any communication

> > > with a secure partition. This is currently tested with OPTEE(with changes

> > > to OPTEE driver adding FFA as transport)

> > >

> >

> > Since you reviewed the last version, it would be helpful if you provide

> > Reviewed-by or Tested-by if you happy with this version. I would like to

> > get this initial version merged for v5.13

>

> I've tested this in a few of my setups and everything looks over all

> fine, so please apply:

> Tested-by: Jens Wiklander <jens.wiklander@linaro.org>

>

> I'm also double checking the details of the patches for some further

> feedback. Stay tuned.


I'm done reviewing this patchset. I had a comment about a TODO in
"arm64: smccc: Add support for SMCCCv1.2 input/output registers", I
suppose it isn't very urgent with a 32-bit implementation.

Cheers,
Jens
Sudeep Holla March 23, 2021, 9:49 a.m. UTC | #4
Hi Jens,

On Thu, Mar 18, 2021 at 03:09:46PM +0100, Jens Wiklander wrote:
> Hi Sudeep,

> 

> On Tue, Mar 16, 2021 at 3:34 PM Sudeep Holla <sudeep.holla@arm.com> wrote:

> >

> > Hi Jens,

> >

> > On Fri, Feb 12, 2021 at 03:46:07PM +0000, Sudeep Holla wrote:

> > > Hi all,

> > >

> > > This is very basic implementation for in-kernel support for Arm FF-A

> > > specification.

> > >

> > > Arm Firmware Framework for Armv8-A specification[1] describes a software

> > > architecture that provides mechanism to utilise the virtualization

> > > extension to isolate software images and describes interfaces that

> > > standardize communication between the various software images. This

> > > includes communication between images in the Secure and Normal world.

> > >

> > > The main idea here is to create FFA device to establish any communication

> > > with a secure partition. This is currently tested with OPTEE(with changes

> > > to OPTEE driver adding FFA as transport)

> > >

> >

> > Since you reviewed the last version, it would be helpful if you provide

> > Reviewed-by or Tested-by if you happy with this version. I would like to

> > get this initial version merged for v5.13

> 

> I've tested this in a few of my setups and everything looks over all

> fine, so please apply:

> Tested-by: Jens Wiklander <jens.wiklander@linaro.org>

> 

> I'm also double checking the details of the patches for some further

> feedback. Stay tuned.

> 


Thanks a lot, much appreciated !

-- 
Regards,
Sudeep
Sudeep Holla March 23, 2021, 9:50 a.m. UTC | #5
On Fri, Mar 19, 2021 at 08:56:47AM +0100, Jens Wiklander wrote:
> On Thu, Mar 18, 2021 at 3:09 PM Jens Wiklander

> <jens.wiklander@linaro.org> wrote:

> >

> > Hi Sudeep,

> >

> > On Tue, Mar 16, 2021 at 3:34 PM Sudeep Holla <sudeep.holla@arm.com> wrote:

> > >

> > > Hi Jens,

> > >

> > > On Fri, Feb 12, 2021 at 03:46:07PM +0000, Sudeep Holla wrote:

> > > > Hi all,

> > > >

> > > > This is very basic implementation for in-kernel support for Arm FF-A

> > > > specification.

> > > >

> > > > Arm Firmware Framework for Armv8-A specification[1] describes a software

> > > > architecture that provides mechanism to utilise the virtualization

> > > > extension to isolate software images and describes interfaces that

> > > > standardize communication between the various software images. This

> > > > includes communication between images in the Secure and Normal world.

> > > >

> > > > The main idea here is to create FFA device to establish any communication

> > > > with a secure partition. This is currently tested with OPTEE(with changes

> > > > to OPTEE driver adding FFA as transport)

> > > >

> > >

> > > Since you reviewed the last version, it would be helpful if you provide

> > > Reviewed-by or Tested-by if you happy with this version. I would like to

> > > get this initial version merged for v5.13

> >

> > I've tested this in a few of my setups and everything looks over all

> > fine, so please apply:

> > Tested-by: Jens Wiklander <jens.wiklander@linaro.org>

> >

> > I'm also double checking the details of the patches for some further

> > feedback. Stay tuned.

> 

> I'm done reviewing this patchset. I had a comment about a TODO in

> "arm64: smccc: Add support for SMCCCv1.2 input/output registers", I

> suppose it isn't very urgent with a 32-bit implementation.

> 


Thanks again, I will reply to that seperately. But yes, it is not
urgent as of now.

-- 
Regards,
Sudeep