From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKSDU-0007Jf-L1 for qemu-devel@nongnu.org; Thu, 21 Aug 2014 09:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKSDO-0008Ov-Vr for qemu-devel@nongnu.org; Thu, 21 Aug 2014 09:15:48 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:56577) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKSDO-0008OL-Gi for qemu-devel@nongnu.org; Thu, 21 Aug 2014 09:15:42 -0400 Message-ID: <53F5F0FA.5050102@codeaurora.org> Date: Thu, 21 Aug 2014 09:15:38 -0400 From: Christopher Covington MIME-Version: 1.0 References: <7dadfa99c7a31615e6df922fb6e2084837e08033.1408584788.git.alistair23@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 1/1] target_arm: Make the reset rom_ptr a property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Alistair Francis , Peter Crosthwaite , "qemu-devel@nongnu.org Developers" , Konstanty Bialkowski On 08/21/2014 08:33 AM, Peter Maydell wrote: > On 21 August 2014 04:37, Peter Crosthwaite wrote: >> On Thu, Aug 21, 2014 at 11:40 AM, Alistair Francis wrote: >>> On Thu, Aug 21, 2014 at 11:36 AM, Alistair Francis wrote: >>>> This allows the board to set the reset address, which is required >>>> for some boards (the Netduino Plus 2 for example) > >> The change is armv7m specific right? You should mention that in the >> commit message. >> >> This also obsoletes my attempt at correcting armv7m elf loading which >> was trying to solve this issue a different way. > > I think the ELF loading thing is a separate issue -- if we're loading > an ELF file we should honour its entry point address instead of > trying to load from the vector table. (The question of what we > do about SP is an interesting one...) In my experience with A-profile, software is expected to either know enough about the platform to set the SP to something sane itself or make the SYS_HEAPINFO semihosting call, which despite the name returns both stack and heap information. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471j/pge1358787054284.html An example of the former option is the semihosting bootwrapper, which designates an address in RAM as the top of the stack. https://github.com/virtualopensystems/boot-wrapper/blob/master/model.lds.S#L57 For the latter option, my recollection is that ELF binaries built with Newlib and ARM's C library will make the semihosting call. Christopher -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation.