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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170705065559.6iehfacpiq74crz4@flea>
Date:   Wed, 5 Jul 2017 08:55:59 +0200
From:   Maxime Ripard <maxime.ripard@...e-electrons.com>
To:     Andre Przywara <andre.przywara@....com>
Cc:     Jassi Brar <jassisinghbrar@...il.com>,
        Sudeep Holla <sudeep.holla@....com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-sunxi@...glegroups.com, Chen-Yu Tsai <wens@...e.org>,
        Icenowy Zheng <icenowy@...c.xyz>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>, devicetree@...r.kernel.org
Subject: Re: [PATCH 0/8] mailbox: arm/arm64: introduce smc triggered mailbox

On Fri, Jun 30, 2017 at 01:56:04PM +0100, Andre Przywara wrote:
> Hi,
> 
> thanks for having a look!
> 
> On 30/06/17 13:25, Maxime Ripard wrote:
> > Hi,
> > 
> > On Fri, Jun 30, 2017 at 10:56:00AM +0100, Andre Przywara wrote:
> >> The remaining patches demonstrate usage of this feature to drive SCPI services
> >> implemented as part of the ARM Trusted Firmware implementation used for
> >> AArch64 based Allwinner SoCs, the Allwinner A64 in this example.
> >> It allows to provide DVFS services, sensors support, device power domains
> >> and potentially other services like clocks or regulators.
> >> This allows to abstract those features in firmware, without the need to
> >> implement explicit Linux support for each variant of some SoC design.
> >> Those DT changes are not necessarily meant to be merged at this point.
> >> I started implementing the firmware side of those services and put a WIP
> >> branch on my ATF Github repo [1]. With this branch and these patches here
> >> you get DVFS and temperature sensor support for the A64, just with this
> >> driver and the generic SCPI support.
> > 
> > I would go even further, and say that these changes should be done by
> > the bootloader itself once it installed the proper monitor.
> > 
> > These patches represent not a state of the hardware itself, but the
> > state the bootloader let the hardware in, and that state will change
> > from one bootloader to the other, and one version to the other
> > (obviously). This is already what we do for the other things the
> > bootloader initializes (like simplefb, or PSCI). It just feels natural
> > to do the same thing here.
> 
> Yes, indeed that was my thinking as well. I just put those DT changes in
> here to demonstrate how it would look like.
> 
> Technically ATF (as the provider for the SCPI services) should do the DT
> change. That would also assure that those changes are always in sync
> with what's implemented. Mainline ATF seems to include libfdt now, but I
> haven't checked in detail how much this covers and how easy it is to
> use.

Even with just the libfdt's DT manipulation functions, this should be
quite easy. The steps needed would be:
  - Retrieve the phandle of the CCU node
  - Delete the CCU node (or mark it disabled, and remove its phandle
    property)
  - Add the SCPI nodes with the original's CCU phandle in your
    variable clocks subnode

The last part especially might be a bit painful, especially the
generation of the indices and names.

You also have the option of using an overlay and applying it if your
libfdt is recent enough. That way, you'll just need to care about
keeping the phandle in your code, but that's all.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ