On 08/21/2014 08:33 AM, Peter Maydell wrote:
> On 21 August 2014 04:37, Peter Crosthwaite <peter.crosthwa...@xilinx.com> 
> wrote:
>> On Thu, Aug 21, 2014 at 11:40 AM, Alistair Francis <alistai...@gmail.com> 
>> wrote:
>>> On Thu, Aug 21, 2014 at 11:36 AM, Alistair Francis <alistai...@gmail.com> 
>>> 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.

Reply via email to