lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 11 Jan 2018 01:13:57 +0000
From:   Jolly Shah <JOLLYS@...inx.com>
To:     Julien Thierry <julien.thierry@....com>
CC:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Rajan Vaja <RAJANV@...inx.com>,
        "ard.biesheuvel@...aro.org" <ard.biesheuvel@...aro.org>,
        "mingo@...nel.org" <mingo@...nel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "matt@...eblueprint.co.uk" <matt@...eblueprint.co.uk>,
        "sudeep.holla@....com" <sudeep.holla@....com>,
        "hkallweit1@...il.com" <hkallweit1@...il.com>,
        "keescook@...omium.org" <keescook@...omium.org>,
        "dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
        "michal.simek@...inx.com" <michal.simek@...inx.com>
Subject: RE: [PATCH] drivers: firmware: xilinx: Add ZynqMP firmware driver

Hi Julien,
Thanks for the review,

> -----Original Message-----
> From: Julien Thierry [mailto:julien.thierry@....com]
> Sent: Tuesday, January 09, 2018 6:07 AM
> To: Jolly Shah <JOLLYS@...inx.com>; ard.biesheuvel@...aro.org;
> mingo@...nel.org; gregkh@...uxfoundation.org; matt@...eblueprint.co.uk;
> sudeep.holla@....com; hkallweit1@...il.com; keescook@...omium.org;
> dmitry.torokhov@...il.com; michal.simek@...inx.com
> Cc: linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; Jolly
> Shah <JOLLYS@...inx.com>; Rajan Vaja <RAJANV@...inx.com>
> Subject: Re: [PATCH] drivers: firmware: xilinx: Add ZynqMP firmware driver
> 
> Hi Jolly,
> 
> On 08/01/18 22:07, Jolly Shah wrote:
> > This patch is adding communication layer with firmware.
> > Firmware driver provides an interface to firmware APIs.
> > Interface APIs can be used by any driver to communicate to
> > PMUFW(Platform Management Unit). All requests go through ATF.
> > Firmware-debug provides debugfs interface to all APIs.
> > Firmware-ggs provides read/write interface to
> > global storage registers.
> >
> > Signed-off-by: Jolly Shah <jollys@...inx.com>
> > Signed-off-by: Rajan Vaja <rajanv@...inx.com>
> > ---
> >   .../firmware/xilinx/xlnx,zynqmp-firmware.txt       |   16 +
> >   arch/arm64/Kconfig.platforms                       |    1 +
> >   drivers/firmware/Kconfig                           |    1 +
> >   drivers/firmware/Makefile                          |    1 +
> >   drivers/firmware/xilinx/Kconfig                    |    4 +
> >   drivers/firmware/xilinx/Makefile                   |    4 +
> >   drivers/firmware/xilinx/zynqmp/Kconfig             |   23 +
> >   drivers/firmware/xilinx/zynqmp/Makefile            |    5 +
> >   drivers/firmware/xilinx/zynqmp/firmware-debug.c    |  540 +++++++++++
> >   drivers/firmware/xilinx/zynqmp/firmware-ggs.c      |  298 ++++++
> >   drivers/firmware/xilinx/zynqmp/firmware.c          | 1024
> ++++++++++++++++++++
> >   .../linux/firmware/xilinx/zynqmp/firmware-debug.h  |   32 +
> >   include/linux/firmware/xilinx/zynqmp/firmware.h    |  573 +++++++++++
> >   13 files changed, 2522 insertions(+)
> >   create mode 100644
> Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt
> >   create mode 100644 drivers/firmware/xilinx/Kconfig
> >   create mode 100644 drivers/firmware/xilinx/Makefile
> >   create mode 100644 drivers/firmware/xilinx/zynqmp/Kconfig
> >   create mode 100644 drivers/firmware/xilinx/zynqmp/Makefile
> >   create mode 100644 drivers/firmware/xilinx/zynqmp/firmware-debug.c
> >   create mode 100644 drivers/firmware/xilinx/zynqmp/firmware-ggs.c
> >   create mode 100644 drivers/firmware/xilinx/zynqmp/firmware.c
> >   create mode 100644 include/linux/firmware/xilinx/zynqmp/firmware-
> debug.h
> >   create mode 100644 include/linux/firmware/xilinx/zynqmp/firmware.h
> >
> 
> > +
> > +static u32 pm_api_version;
> > +
> > +/**
> > + * zynqmp_pm_get_api_version - Get version number of PMU PM firmware
> > + * @version:	Returned version value
> > + *
> > + * Return:	Returns status, either success or error+reason
> > + */
> > +static int zynqmp_pm_get_api_version(u32 *version)
> > +{
> > +	u32 ret_payload[PAYLOAD_ARG_CNT];
> > +
> > +	if (!version)
> > +		return zynqmp_pm_ret_code(XST_PM_CONFLICT);
> > +
> > +	/* Check is PM API version already verified */
> > +	if (pm_api_version > 0) {
> > +		*version = pm_api_version;
> > +		return XST_PM_SUCCESS;
> > +	}
> > +	invoke_pm_fn(GET_API_VERSION, 0, 0, 0, 0, ret_payload);
> > +	*version = ret_payload[1];
> > +
> 
> I think you forgot to save the result to pm_api_version, unless I am
> missing something.
> 

Pm_api_version is initialized in init routine. So no need to save it again as version will remain same.

Rest all comments will be fixed in next version.

Thanks,
Jolly Shah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ