From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753454AbbETKKK (ORCPT ); Wed, 20 May 2015 06:10:10 -0400 Received: from down.free-electrons.com ([37.187.137.238]:38123 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752660AbbETKKG (ORCPT ); Wed, 20 May 2015 06:10:06 -0400 Date: Wed, 20 May 2015 12:08:31 +0200 From: Maxime Ripard To: Chen-Yu Tsai Cc: Nicolas Pitre , Dave Martin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [RFC 7/7] ARM: dts: sun9i: Add secure SRAM node used for MCPM SMP hotplug Message-ID: <20150520100831.GE4004@lukather> References: <1431583811-25780-1-git-send-email-wens@csie.org> <1431583811-25780-8-git-send-email-wens@csie.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GbmqUSNq0sb1y8iS" Content-Disposition: inline In-Reply-To: <1431583811-25780-8-git-send-email-wens@csie.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --GbmqUSNq0sb1y8iS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 14, 2015 at 02:10:11PM +0800, Chen-Yu Tsai wrote: > The A80 stores some magic flags in a portion of the secure SRAM. The > BROM jumps directly to the software entry point set by the SMP code > if the flags are set. This is required for CPU0 hotplugging. >=20 > Signed-off-by: Chen-Yu Tsai > --- > arch/arm/boot/dts/sun9i-a80.dtsi | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) >=20 > diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a= 80.dtsi > index 1507bd2a88f0..0695215634d4 100644 > --- a/arch/arm/boot/dts/sun9i-a80.dtsi > +++ b/arch/arm/boot/dts/sun9i-a80.dtsi > @@ -366,6 +366,26 @@ > */ > ranges =3D <0 0 0 0x20000000>; > =20 > + sram_b: sram@00020000 { > + /* 256 KiB secure SRAM at 0x20000 */ > + compatible =3D "mmio-sram"; > + reg =3D <0x00020000 0x40000>; > + We should probably add a property to that SRAM to tell the driver not to access it if we're not booted in secure mode. Otherwise, bad things might happen. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --GbmqUSNq0sb1y8iS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVXF0fAAoJEBx+YmzsjxAgn0UP/jS2C9Sr7STJ3x8h23N9/BLx vNBg6SmfXnQiqTJwHYR2TGpskoSi17DWsiDKR9XM1sgKnzfED2EkKeQxNZNtZBMi QMo1AII7CNPL3kj+lLsuS3sSMRLAahWOSmTDYGSP/fA1vWXnnIybYf4YbYOTeki2 2tLiKvKxHFsQkBzulfmeekxdoBBuDRemLWeS/2BJBAJjQU9LINwRpMyv/v6PdoiA SpgIj6tb9laku7JS+mpwp1F5XDbHyhFhcdBn4aD/NnlUbPmALqSrheDjSyMzPOEn fO9lx8xXVYy0qzWpgpVTGVteZenMvBMGZn/5RcDsXI5lBGMTknn94Xuq6N16SV18 +HpZNyWRi2tyFFhNt4ZKLUUjGulmiVfjZYNFV0ZbkD5Mv/6G3i6uIqM0ryxPeMXd QzUPdIYyQZEnXy1auvsnnQv6/Kv8ioAaqEsKCKLyWdxrKRvvOQ103Ds6O1JeJEbx V8AIJK2MMgm5pGR7XZ8rWC5EEBZnIQLfroIf6yUR21b6QhHlttNhz6ffEHr0GFx2 KcvTfY62uzm+aTPdfNidS9s8Ajg0abK5EQXYjRSwt8f52ngcXngUwl92o9QsdOHH LCZUdldCHG/TOmiv9qA/axCcn+0oQ6DTfWK70XIFALYyQz2cTnfFcmDCMTmANtM1 a9TDgpKI/NqRciJCo45h =yUDm -----END PGP SIGNATURE----- --GbmqUSNq0sb1y8iS-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@free-electrons.com (Maxime Ripard) Date: Wed, 20 May 2015 12:08:31 +0200 Subject: [RFC 7/7] ARM: dts: sun9i: Add secure SRAM node used for MCPM SMP hotplug In-Reply-To: <1431583811-25780-8-git-send-email-wens@csie.org> References: <1431583811-25780-1-git-send-email-wens@csie.org> <1431583811-25780-8-git-send-email-wens@csie.org> Message-ID: <20150520100831.GE4004@lukather> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, May 14, 2015 at 02:10:11PM +0800, Chen-Yu Tsai wrote: > The A80 stores some magic flags in a portion of the secure SRAM. The > BROM jumps directly to the software entry point set by the SMP code > if the flags are set. This is required for CPU0 hotplugging. > > Signed-off-by: Chen-Yu Tsai > --- > arch/arm/boot/dts/sun9i-a80.dtsi | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi > index 1507bd2a88f0..0695215634d4 100644 > --- a/arch/arm/boot/dts/sun9i-a80.dtsi > +++ b/arch/arm/boot/dts/sun9i-a80.dtsi > @@ -366,6 +366,26 @@ > */ > ranges = <0 0 0 0x20000000>; > > + sram_b: sram at 00020000 { > + /* 256 KiB secure SRAM at 0x20000 */ > + compatible = "mmio-sram"; > + reg = <0x00020000 0x40000>; > + We should probably add a property to that SRAM to tell the driver not to access it if we're not booted in secure mode. Otherwise, bad things might happen. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: