From: DaveKucharczyk <david.kucharczyk@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] porting u-boot, few final questions
Date: Tue, 11 Nov 2014 10:39:42 -0700 (MST) [thread overview]
Message-ID: <1415727582773-195618.post@n7.nabble.com> (raw)
In-Reply-To: <1415658068088-195488.post@n7.nabble.com>
So the issues of the variables changing were due to me initializing
everything in board_early_init_f(). I moved everything out of it except uart
setup. If I setup the uart in board_init() instead of board_early_init_f()
then the early cpu info stuff is missed. I guess there?s an opportunity for
improvement there.
I still have a question pertaining to the changing variables though. It has
to do with pre and post relocation. Variables declared in functions
pre-reloc will be different when used in functions post-reloc.
For instance. If I set a variable in board_early_init_f() and then, without
changing it, print it in board_late_init() then it will be different.
So my question is how can I get around this?
This is where I?m stuck?
I?m trying to write the reset cause to SRAM in board_late_init(). The reset
cause is printed early by default when defining CONFIG_DISPLAY_CPUINFO in
the header file.
When I access the register in board_late_init() it prints 0, which is wrong.
I tried?
and this(which is what arch/arm/imx-common/cpu.c uses to print reset cause)?
All return 0 when called in board_late_init() even though at startup the
correct reset cause is displayed, but I have to write it to SRAM later on.
And by that time it's 0.
I think this has to do with what Wolfgang said about ds, bss, and stack, but
if someone can shed some light that would be great. :) Thanks
--
View this message in context: http://u-boot.10912.n7.nabble.com/porting-u-boot-MMU-question-tp194761p195618.html
Sent from the U-Boot mailing list archive at Nabble.com.
prev parent reply other threads:[~2014-11-11 17:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 16:36 [U-Boot] porting u-boot, MMU question DaveKucharczyk
2014-11-05 16:58 ` Stefano Babic
2014-11-05 17:16 ` DaveKucharczyk
2014-11-05 21:04 ` Stefano Babic
2014-11-05 21:24 ` Otavio Salvador
2014-11-06 20:03 ` DaveKucharczyk
2014-11-10 15:14 ` [U-Boot] porting u-boot, few final questions DaveKucharczyk
2014-11-10 15:30 ` Fabio Estevam
2014-11-10 15:47 ` Wolfgang Denk
2014-11-10 16:04 ` Fabio Estevam
2014-11-10 17:54 ` Nikolay Dimitrov
2014-11-10 20:45 ` DaveKucharczyk
2014-11-10 22:21 ` DaveKucharczyk
2014-11-11 17:39 ` DaveKucharczyk [this message]
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=1415727582773-195618.post@n7.nabble.com \
--to=david.kucharczyk@gmail.com \
--cc=u-boot@lists.denx.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