[PATCH v1 1/2] drivers: firmware: introduce Meson Secure Monitor driver

Alexey Romanov AVRomanov at sberdevices.ru
Fri Jul 7 10:43:04 CEST 2023


Hello, Simon!

On Thu, Jul 06, 2023 at 09:58:02AM -0600, Simon Glass wrote:
> Hi Alexey,
> 
> On Thu, 6 Jul 2023 at 14:16, Alexey Romanov <avromanov at sberdevices.ru> wrote:
> >
> > At the moment, only smc API is a set of functions in
> > arch/arm/mach-meson/sm.c. This approach is hard to configure
> > and also doesni't contain any generic API for calling smc.
> >
> > This patch add Meson SM driver with generic API (struct meson_sm_ops):
> >
> > - sm_call()
> > - sm_call_write()
> > - sm_call_read()
> >
> > A typical driver usage example is shown here:
> >
> > 1. uclass_get_device_by_driver(UCLASS_FIRMWARE, "secure-monitor", &dev);
> > 2. handle = meson_sm_get_handle(dev);
> > 3. handle->ops.sm_call(dev, cmd, ...);
> >
> > Signed-off-by: Alexey Romanov <avromanov at sberdevices.ru>
> > ---
> >  arch/arm/mach-meson/Kconfig       |   1 +
> >  drivers/firmware/Kconfig          |  10 ++
> >  drivers/firmware/Makefile         |   1 +
> >  drivers/firmware/meson/Kconfig    |   6 +
> >  drivers/firmware/meson/Makefile   |   3 +
> >  drivers/firmware/meson/meson_sm.c | 217 ++++++++++++++++++++++++++++++
> >  include/meson/sm_handle.h         |  38 ++++++
> >  7 files changed, 276 insertions(+)
> >  create mode 100644 drivers/firmware/meson/Kconfig
> >  create mode 100644 drivers/firmware/meson/Makefile
> >  create mode 100644 drivers/firmware/meson/meson_sm.c
> >  create mode 100644 include/meson/sm_handle.h
> 
> Please can you use the remoteproc uclass for this and add a proper driver?
> 

I don't see it architecturally well. Can you explain please?

This driver is just ARM SMC fw interface. There seems to be nothing to
do here for remoteproc uclass. 

> Regards,
> SImon

-- 
Thank you,
Alexey


More information about the U-Boot mailing list