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:	Wed, 25 Jun 2014 23:54:34 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Tomasz Figa <t.figa@...sung.com>
Cc:	linux-samsung-soc@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Kukjin Kim <kgene.kim@...sung.com>,
	Olof Johansson <olof@...om.net>, Arnd Bergmann <arnd@...db.de>,
	Alexandre Courbot <acourbot@...dia.com>,
	Stephen Warren <swarren@...dia.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Tomasz Figa <tomasz.figa@...il.com>
Subject: Re: [PATCH 2/2] ARM: EXYNOS: Add support for firmware-assisted
	suspend/resume

On Wed, Jun 25, 2014 at 06:18:34PM +0200, Tomasz Figa wrote:
> +static int exynos_suspend(void)
> +{
> +	/* Save Power control and Diagnostic registers */
> +	asm ("mrc p15, 0, %0, c15, c0, 0\n"
> +		"mrc p15, 0, %1, c15, c0, 1\n"
> +		: "=r" (cp15_power), "=r" (cp15_diag) : : "cc");
> +
> +	writel(EXYNOS_SLEEP_MAGIC, sysram_ns_base_addr + EXYNOS_BOOT_FLAG);
> +	writel(virt_to_phys(cpu_resume),
> +		sysram_ns_base_addr + EXYNOS_BOOT_ADDR);
> +
> +	return cpu_suspend(0, exynos_cpu_suspend);
> +}
> +
> +static int exynos_resume(void)
> +{
> +	exynos_smc(SMC_CMD_C15RESUME, cp15_power, cp15_diag, 0);

I am told that these two registers are not expected to change value
once the MMU is on.  This presents something of a problem where the
secure monitor is involved, because what that means is that this
really needs to be done before we get to C code.

OMAP has similar issues where it needs to restore the L2 cache
setup via SMC calls before the MMU is enabled, and they deal with
this via some hand-crafted assembly code which runs prior to calling
into cpu_resume.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists