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]
Date:   Sun, 7 Apr 2019 16:27:36 +0200
From:   Clément Péron <peron.clem@...il.com>
To:     Maxime Ripard <maxime.ripard@...tlin.com>
Cc:     Chen-Yu Tsai <wens@...e.org>, Rob Herring <robh+dt@...nel.org>,
        Icenowy Zheng <icenowy@...c.io>,
        Jagan Teki <jagan@...rulasolutions.com>,
        devicetree <devicetree@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Samuel Holland <samuel@...lland.org>
Subject: Re: [PATCH 2/2] arm64: dts: h6: Add watchdog node

Hi,

On Fri, 5 Apr 2019 at 18:24, Clément Péron <peron.clem@...il.com> wrote:
>
> Hi,
>
> On Fri, 5 Apr 2019 at 17:08, Maxime Ripard <maxime.ripard@...tlin.com> wrote:
> >
> > On Fri, Apr 05, 2019 at 10:59:35PM +0800, Chen-Yu Tsai wrote:
> > > On Fri, Apr 5, 2019 at 10:50 PM Maxime Ripard <maxime.ripard@...tlin.com> wrote:
> > > >
> > > > On Fri, Apr 05, 2019 at 10:35:08PM +0800, Chen-Yu Tsai wrote:
> > > > > On Fri, Apr 5, 2019 at 5:02 PM Maxime Ripard <maxime.ripard@...tlin.com> wrote:
> > > > > >
> > > > > > On Thu, Apr 04, 2019 at 03:57:36PM +0200, Clément Péron wrote:
> > > > > > > Allwinner H6 has a watchog compatible with A31.
> > > > > > >
> > > > > > > Declare it in the device tree.
> > > > > > >
> > > > > > > Signed-off-by: Clément Péron <peron.clem@...il.com>
> > > > > >
> > > > > > Applied both, thanks!
> > > > > > Maxime
> > > > >
> > > > > IIRC there are 3 watchdogs on the H6. One is the trusted watchdog,
> > > > > which should be reserved for underlying firmware.
> > > > >
> > > > > The other two are the normal and R-block watchdog. Although they
> > > > > look the same, the "normal" one can't reset the system. :(
> > > > > That one is actually the one ATF currently uses. So reboot doesn't
> > > > > work on the H6.
>
> Some users report that the reboot on the PineH64 actually works.
>
> Clement
>
> > > >
> > > > So that patch will not do anything then?

Did some test and only interrupts are working right now. If the WDOG
is configured to make the board reboot the system will be stuck :S
Maybe better to disabled it for now and leave a comment.
I will try to ask some Pine H64 users to do the same tests.

Test done on my Beelink GS1 :
/* This should reset the system after 0.5s */
# devmem $((0x030090a0 + 0x0014))
0x00000001
# devmem $((0x030090a0 + 0x0018))
0x00000000
# devmem $((0x030090a0 + 0x0018)) 32 0x1
#
/* System is Stuck*/

/* This should reset the system after 1s */
# devmem $((0x030090a0 + 0x0014))
0x00000001
# devmem $((0x030090a0 + 0x0018))
0x00000000
# devmem $((0x030090a0 + 0x0018)) 32 $((0x1 << 4 | 0x1))
#
/* System is Stuck*/

/* This should reset the system after 1s (as recommended in the User Manual) */
# devmem $((0x030090a0 + 0x0014))
0x00000001
# devmem $((0x030090a0 + 0x0018))
0x00000000
# devmem $((0x030090a0 + 0x0018)) 32 $((0x1 << 4))
# devmem $((0x030090a0 + 0x0018))
0x00000010
# devmem $((0x030090a0 + 0x0018)) 32 $((0x1 << 4 | 0x1))
#
/* System is Stuck*/

/* This should trig an interrupt after 0.5s */
# devmem $((0x030090a0 + 0x0014)) 32 0x32
# devmem $((0x030090a0 + 0x0014))
0x00000002
# devmem $((0x030090a0 + 0x0018))
0x00000000
# devmem $((0x030090a0 + 0x0018)) 32 $((0x1 << 4 | 0x1))
# devmem $((0x030090a0 + 0x0004))
0x00000001
/* INT is triggered */

Regards,
Clement

> > >
> > > I'm still on vacation, so I haven't checked the address of the new device.
> > > If it's the normal one, then yeah, it won't do anything. I've tried that.
> > > IIRC Samuel (or someone else) on IRC also mentioned this.
> >
> > It's the one in the timer that we've used since pretty much day 1 on
> > older SoCs, so I guess it qualifies as the normal one :)
> >
> > Maxime
> >
> > --
> > Maxime Ripard, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com

Powered by blists - more mailing lists