From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1035225AbcIWOpW (ORCPT ); Fri, 23 Sep 2016 10:45:22 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:57105 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1035212AbcIWOpO (ORCPT ); Fri, 23 Sep 2016 10:45:14 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Robin Murphy , Stuart Yoder , Alison Wang , "shawnguo@kernel.org" , "kernel@pengutronix.de" , Fabio Estevam Estevam , "linux@armlinux.org.uk" , "linux-kernel@vger.kernel.org" , Scott Wood , Leo Li , Jason Jin Subject: Re: [PATCH 1/2] armv8: aarch32: Execute 32-bit Linux for LayerScape platforms Date: Fri, 23 Sep 2016 16:44:25 +0200 Message-ID: <2017806.nj5EEu7nrO@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <15d69a29-6997-6af8-f121-ff253388626c@arm.com> References: <1474597146-33312-1-git-send-email-b18965@freescale.com> <15d69a29-6997-6af8-f121-ff253388626c@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:bI73OQCASKL49S1VM5WVb+PL1vTim8TxvMKH6Rsoc6Kgq7WYsDk nQzdessrO0kJV8dGN1DGvm/6NigBBEHerkR6ELBXU3+tA4SsEQKOVULHocJtinVq/UNu7Hl FIN5PnfXjabsnwuqrHO19YV4VN69VV8a89E6RSRunOCqzlJSbjRVG4YzCpjQ4E4X5fJ8ezc sTdCDAB0BtSeT4F0yDGHQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:66aIXcVuOV8=:bPFoZ93as0lJLaOkiw2bC7 Kq6ydFU33uowtDLX1bQCzKi91uQWG3K2IOPerDI3meBILcg/BRK4bV9xVB/i6xHYuDyQojt8y DyOe4p+5nJvx2vJUmFe7RaIJnHDznJjEwh7w6zHidoZGHwsuFjAUK+DdrOuOSq46B8+Lm5G/a BZVYpmu4Rf1M+4rKgmhxj2fvjplkzs7R0CmPItXMRy2XGGFxGWMFMl5idGBbvqmx2f1CdSp48 Ik7mW2++LR1pKaZ0Ite0yLcXOruigk4n+UEKNfnYZ37XPvcpN9+lCcPCf9M40kxdM2Z9Up4R3 nwTw7AJB3pwNUNX8J2AkNSaYcCYxAnolkfHR1AsQKwZtmM/zHZwSRXYqfgYs6/HbN+14a7zqc cBrLOW3NgX5xw+hiOIKG7WfxHTCAFHx4qrHl2JuAbTVvx5HeD7g/g2AJ0RtMhwypSbRc1USYq LZvRMv3iX8v1EPkIqcFcCuLWQLkc0OuNWj/7SwNn3QtE+aSq+FMhrvc4mrduziLVwiRSTFK8G GUZ//hqjq/zc+ta7bN1DGJTaMFYDPJsXfd3/ZyEsuxfCH/T7a3m9jnI/2Llj+KliGnnT9QC7E ELXUHwkmyniUhxNxzC0SPe46ZbS2UyBLi8sLgnmquoqr9nT5Xvl0jhnw7qiDrJKFnI42lSBy4 WVkNgh2GkZvPJAaJHgknKkYdbko873SY0ZjXzm9SpmYi4vn11zq+1kLj6qAHz3EA1tT8fpqKR LbMOMmMgDCZW6bDe Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, September 23, 2016 3:24:12 PM CEST Robin Murphy wrote: > On 23/09/16 15:01, Stuart Yoder wrote: > Otherwise you can > always simply run your own shim at EL2 to drive an AArch32 EL1 (it'll > need to trap and translate subsequent SMC calls for e.g. PSCI). > > > If there is such a requirement, it's something begging for standardization. > > Doesn't make sense for multiple divergent approaches for switching from > > aarch64/EL2 to aarch32/EL2. > > Perhaps - I did briefly look into how hard it would be to write a proper > SMC service handler to do this (since ATF does have a framework for such > things), but concluded it would be more than 10 minutes' work and just > cheated instead. It's certainly something which could be raised with the > firmware folks. If we end up allowing all arm64 platforms to be enabled in arch/arm, we could perhaps create a generic implementation that does both of those things, i.e. - Take the arm32 kernel Image or zImage file, wrap it inside of a binary that implements the arm64 boot protocol. - When that starts up, try to use the new PSCI call to jump into the arm32 kernel - If PSCI failed and we are running in EL2, implement the shim and start the arm32 kernel in EL1 mode Arnd