[PATCH v11 06/10] arm_ffa: introduce sandbox FF-A support

Simon Glass sjg at chromium.org
Wed Apr 19 03:49:58 CEST 2023


Hi Abdellatif,

On Wed, 12 Apr 2023 at 03:43, Abdellatif El Khlifi
<abdellatif.elkhlifi at arm.com> wrote:
>
> Emulate Secure World's FF-A ABIs and allow testing U-Boot FF-A support
>
> Features of the sandbox FF-A support:
>
> - Introduce an FF-A emulator
> - Introduce an FF-A device driver for FF-A comms with emulated Secure World
> - Provides test methods allowing to read the status of the inspected ABIs
>
> The sandbox FF-A emulator supports only 64-bit direct messaging.
>
> Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> Cc: Jens Wiklander <jens.wiklander at linaro.org>
> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
>
> ---
> Changelog:
> ===============
>
> v11:
>
> * rename ffa_try_discovery() to sandbox_ffa_discover()
> * rename sandbox_ffa_query_core_state() to sandbox_query_ffa_emul_state()
> * store the sandbox emulator pointer in the FF-A device uc_priv (struct ffa_priv)
> * set the emulator as parent of the sandbox FF-A device

This is close, but not quite what I expected.

I suspect the emulator should be the child of the FF-A device, not the
parent? You should update the devicetree to show that. You should not
need to reparent anything.

Then you put this in your FFA uclass so it binds the emulator:

.post_bind = dm_scan_fdt_dev,

Finding the emulator is probably then just a case of calling
device_find_first_child().

I notice that you are sometimes breaking lines very short, e.g. the
memset() lines. Please try to use all 80cols if you can.

Regards,
Simon


More information about the U-Boot mailing list