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:   Thu, 06 Apr 2017 18:45:39 +0100
From:   Ben Hutchings <ben.hutchings@...ethink.co.uk>
To:     Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
        Sebastian Reichel <sre@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 4.4 23/26] power: reset: at91-poweroff: timely shutdown
 LPDDR memories

On Thu, 2017-04-06 at 10:38 +0200, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
> 
> commit 0b0408745e7ff24757cbfd571d69026c0ddb803c upstream.
> 
> LPDDR memories can only handle up to 400 uncontrolled power off. Ensure the
> proper power off sequence is used before shutting down the platform.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
> Signed-off-by: Sebastian Reichel <sre@...nel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
[...] 
> +static void at91_lpddr_poweroff(void)
> +{
> +	asm volatile(
> +		/* Align to cache lines */
> +		".balign 32\n\t"
> +
> +		/* Ensure AT91_SHDW_CR is in the TLB by reading it */
> +		"	ldr	r6, [%2, #" __stringify(AT91_SHDW_CR) "]\n\t"

This clobbers r6...

> +		/* Power down SDRAM0 */
> +		"	str	%1, [%0, #" __stringify(AT91_DDRSDRC_LPR) "]\n\t"
> +		/* Shutdown CPU */
> +		"	str	%3, [%2, #" __stringify(AT91_SHDW_CR) "]\n\t"
> +
> +		"	b	.\n\t"
> +		:
> +		: "r" (mpddrc_base),
> +		  "r" cpu_to_le32(AT91_DDRSDRC_LPDDR2_PWOFF),
> +		  "r" (at91_shdwc_base),
> +		  "r" cpu_to_le32(AT91_SHDW_KEY | AT91_SHDW_SHDW)
> +		: "r0");
[...]

...but the clobber list has r0.

Ben.

-- 
Ben Hutchings
Software Developer, Codethink Ltd.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ