From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Andr=c3=a9_Przywara?= Date: Tue, 6 Dec 2016 08:04:24 +0000 Subject: [U-Boot] [PATCH v2 03/23] armv8: add lowlevel_init.S In-Reply-To: <20161205215628.GY4248@bill-the-cat> References: <1480902750-839-1-git-send-email-andre.przywara@arm.com> <1480902750-839-4-git-send-email-andre.przywara@arm.com> <20161205215628.GY4248@bill-the-cat> Message-ID: <4f6d418a-1449-2d47-7e4f-a0e8a5689541@arm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/12/16 21:56, Tom Rini wrote: > On Mon, Dec 05, 2016 at 01:52:10AM +0000, Andre Przywara wrote: > >> For boards that call s_init() when the SPL runs, we are expected to >> setup an early stack before calling this C function. >> Implement the proper AArch64 version of this based on the ARMv7 code. >> This allows sunxi boards to setup the basic peripherals even on with a >> 64-bit SPL. >> >> Signed-off-by: Andre Przywara > > This is going to override lowlevel_init from arch/arm/cpu/armv8/start.S > and is that really desired? Thanks! Not sure if it is desired, but it's needed. The weak function in start.S just initialises the GIC (if configured), that looks like a NOP for sunxi to me (we do this already much better in ARM Trusted Firmware). For 32-bit sunxi we call s_init() through lowlevel_init(), which is what I copy here for armv8. Now there is this comment which discourages doing so and Alex already complained about it as well, so I might take a look at how we would skip this step. I was a bit wary going there as this would mean to rework the 32-bit code as well, which affects a lot of boards, which I can barely test here. Cheers, Andre.