Re: [PATCH 0/2] arch: arm64: xilinx: Make zynqmp_firmware driver optional
From: Sudeep Holla
Date: Mon Jan 13 2020 - 10:13:38 EST
On Mon, Jan 13, 2020 at 06:46:52AM +0000, Rajan Vaja wrote:
> Hi Sudeep,
>
> Thanks for the reviewing patch.
>
> > -----Original Message-----
> > From: Sudeep Holla <sudeep.holla@xxxxxxx>
> > Sent: 10 January 2020 05:24 PM
> > To: Jolly Shah <JOLLYS@xxxxxxxxxx>
> > Cc: ard.biesheuvel@xxxxxxxxxx; mingo@xxxxxxxxxx; gregkh@xxxxxxxxxxxxxxxxxxx;
> > matt@xxxxxxxxxxxxxxxxxxx; hkallweit1@xxxxxxxxx; keescook@xxxxxxxxxxxx;
> > dmitry.torokhov@xxxxxxxxx; Michal Simek <michals@xxxxxxxxxx>; Rajan Vaja
> > <RAJANV@xxxxxxxxxx>; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-
> > kernel@xxxxxxxxxxxxxxx; Sudeep Holla <sudeep.holla@xxxxxxx>; Tejas Patel
> > <TEJASP@xxxxxxxxxx>
> > Subject: Re: [PATCH 0/2] arch: arm64: xilinx: Make zynqmp_firmware driver
> > optional
> >
> > EXTERNAL EMAIL
> >
> > On Thu, Jan 09, 2020 at 11:06:02AM -0800, Jolly Shah wrote:
> > > From: Tejas Patel <tejas.patel@xxxxxxxxxx>
> > >
> > > Zynqmp firmware driver requires firmware to be present in system.
> > > Zynqmp firmware driver will crash if firmware is not present in system.
> > > For example single arch QEMU, may not have firmware, with such setup
> > > Linux booting fails.
> > >
> > > So make zynqmp_firmware driver as optional to disable it if user don't
> > > have firmware in system.
> > >
> >
> > Why can't it be detected runtime ? How do you handle single binary if you
> > make this compile time option ?
> [Rajan] There is PMU register which indicates if firmware is present or not,
> but in case of single arch QEMU that register will not be available so
> there is no way to detect if firmware is present or not from Linux.
I am still not that convinced yet.
> Linux firmware crashes while arm_smccc_smc() call for firmware, but before
> this call there is no way to identify if firmware is present or not. So we
> are just giving user an option if they want to use it on single arch
So IIUC this platform used SMC as transport for EEMI communication. And
PSCI will act as bypass and send the command to PMU. If so why can't
platform PSCI implementation send error to OSPM if it is not implemented.
> Platform they can disable firmware driver.
>
Not an option. With this enable, single binary should work fine on both
QEMU and your platform with this EEMI firmware support. You need to find
a way to detect it dynamically.
--
Regards,
Sudeep