[PATCH v17 09/10] arm_ffa: efi: introduce FF-A MM communication

Abdellatif El Khlifi abdellatif.elkhlifi at arm.com
Fri Jul 28 11:37:18 CEST 2023


Hi Tom,

On Thu, Jul 27, 2023 at 12:43:45PM -0400, Tom Rini wrote:
> On Thu, Jul 27, 2023 at 05:07:11PM +0100, Abdellatif El Khlifi wrote:
> 
> > Add MM communication support using FF-A transport
> > 
> > This feature allows accessing MM partitions services through
> > EFI MM communication protocol. MM partitions such as StandAlonneMM
> > or smm-gateway secure partitions which reside in secure world.
> > 
> > An MM shared buffer and a door bell event are used to exchange
> > the data.
> > 
> > The data is used by EFI services such as GetVariable()/SetVariable()
> > and copied from the communication buffer to the MM shared buffer.
> > 
> > The secure partition is notified about availability of data in the
> > MM shared buffer by an FF-A message (door bell).
> > 
> > On such event, MM SP can read the data and updates the MM shared
> > buffer with the response data.
> > 
> > The response data is copied back to the communication buffer and
> > consumed by the EFI subsystem.
> > 
> > MM communication protocol supports FF-A 64-bit direct messaging.
> > 
> > Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
> > Tested-by: Gowtham Suresh Kumar <gowtham.sureshkumar at arm.com>
> > Reviewed-by: Simon Glass <sjg at chromium.org>
> > Cc: Tom Rini <trini at konsulko.com>
> > Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> > Cc: Jens Wiklander <jens.wiklander at linaro.org>
> > 
> > ---
> > 
> > Changelog:
> > ===============
> > 
> > v17:
> > 
> > * show a debug message rather than an error when FF-A is not detected
> [snip]
> > diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> > index c5835e6ef6..8fbadb9201 100644
> > --- a/lib/efi_loader/Kconfig
> > +++ b/lib/efi_loader/Kconfig
> > @@ -55,13 +55,53 @@ config EFI_VARIABLE_FILE_STORE
> >  	  stored as file /ubootefi.var on the EFI system partition.
> >  
> >  config EFI_MM_COMM_TEE
> > -	bool "UEFI variables storage service via OP-TEE"
> > -	depends on OPTEE
> > +	bool "UEFI variables storage service via the trusted world"
> > +	depends on OPTEE && ARM_FFA_TRANSPORT
> 
> You didn't get my changes in here however. If you can do EFI_MM_COMM_TEE
> without ARM_FFA_TRANSPORT (as lx2160ardb_tfa_stmm_defconfig does) then
> you don't make this option depend on EFI_MM_COMM_TEE.  If FF-A is only
> for use here, you make FF-A depend on this, and the FF-A specific
> variable depend on ARM_FFA_TRANSPORT.

Thanks for the suggestion.

EFI_MM_COMM_TEE needs ARM_FFA_TRANSPORT.

EFI_MM_COMM_TEE enables  efi_variable_tee.c

efi_variable_tee.c has new code  for FF-A and Optee. Detecting which method to use
is done at runtime. Ilias and I agreed on that.

ARM_FFA_TRANSPORT is meant to be generic and not tied to EFI.
Making it depends on EFI_MM_COMM_TEE will tie it to EFI. 

Cheers
Abdellatif

> 
> -- 
> Tom




More information about the U-Boot mailing list