From: vj <vicencb@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/9] omap_uart: add low level port serial initialization
Date: Mon, 11 Mar 2013 00:09:35 +0100 [thread overview]
Message-ID: <CAAMcf8Beuk6n9zoyEhpHVMbp99Y6FROR8-QmuN60=GM_ceSzCg@mail.gmail.com> (raw)
In-Reply-To: <20130310230119.GT1906@pengutronix.de>
On Mon, Mar 11, 2013 at 12:01 AM, Sascha Hauer <s.hauer@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.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-03-10 23:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-09 23:19 [PATCH 0/9] Add support for booting ArchosG9 from sd-card Vicente Bergas
2013-03-09 23:19 ` [PATCH 1/9] defaultenv-2: don't load nonexistent file Vicente Bergas
2013-03-09 23:19 ` [PATCH 2/9] omap4_romusb: rename omap4_usbboot_pdata to omap4_usbboot_data Vicente Bergas
2013-03-09 23:19 ` [PATCH 3/9] omap_uart: rename OMAP3EVM_UARTx to OMAP_UARTx Vicente Bergas
2013-03-09 23:19 ` [PATCH 4/9] omap_uart: add low level port serial initialization Vicente Bergas
2013-03-10 13:16 ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-10 22:16 ` vj
2013-03-10 22:35 ` Sascha Hauer
2013-03-10 22:44 ` vj
2013-03-10 23:01 ` Sascha Hauer
2013-03-10 23:09 ` vj [this message]
2013-03-09 23:19 ` [PATCH 5/9] panda: remove unused configuration items Vicente Bergas
2013-03-09 23:19 ` [PATCH 6/9] omap4_romusb: allow adding usb-serial when not booting from usb Vicente Bergas
2013-03-14 7:50 ` Sascha Hauer
2013-03-09 23:19 ` [PATCH 7/9] menu: avoid errors when building submenus Vicente Bergas
2013-03-10 13:16 ` Jean-Christophe PLAGNIOL-VILLARD
2013-03-10 22:29 ` vj
2013-03-11 8:50 ` Sascha Hauer
2013-03-09 23:19 ` [PATCH 8/9] archos: add atag appender for all features Vicente Bergas
2013-03-11 8:36 ` Sascha Hauer
2013-03-09 23:19 ` [PATCH 9/9] archosg9: enable booting from sd-card Vicente Bergas
2013-03-11 21:25 ` [PATCH 0/9] Add support for booting ArchosG9 " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAMcf8Beuk6n9zoyEhpHVMbp99Y6FROR8-QmuN60=GM_ceSzCg@mail.gmail.com' \
--to=vicencb@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox