[PATCH 4/9] omap_uart: add low level port serial initialization
vj
vicencb at gmail.com
Sun Mar 10 19:09:35 EDT 2013
On Mon, Mar 11, 2013 at 12:01 AM, Sascha Hauer <s.hauer at pengutronix.de> wrote:
> On Sun, Mar 10, 2013 at 11:44:31PM +0100, vj wrote:
>> >
>> > You can't access global variables at that state. They are
>> > addressed with their absolute address which will not be correct
>> > when you are not running at the linked address. You can simply
>> > verify that by doing a PUTHEX_LL("somestring"); You will see
>> > the address the string is located when running from the correct
>> > address.
>> >
>> > Sascha
>> >
>> > --
>> > Pengutronix e.K. | |
>> > Industrial Linux Solutions | http://www.pengutronix.de/ |
>> > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
>> > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>>
>> So the problem is not with PUTS_LL, it's with who calls it that should
>> modify the string pointer accordingly.
>> And what are the limitations of not having stack? local variables,
>> calling non-inline functions, more?
>
> Local variables work fine.
> Without stack you can only use __naked functions. With these the
> compiler does not save the registers to the stack and you can't return
> from them. This means a function should always end with a call to
> another function. Normally you should only setup a stack here and call
> a function which then can use it.
>
> Another limitation is that you can only pass three arguments to a
> function, more arguments would be pushed on the stack.
>
> Also functions must not become too complex, because otherwise the
> compiler would make use of the stack inside the function.
>
> The typical register write stuff you normally do in such lowlevel
> init work fine.
>
> Sascha
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Thanks for the explanation!
Regards,
Vicente.
More information about the barebox
mailing list