* [U-Boot-Users] clarifications u-boot for arm
@ 2006-07-14 7:29 Ram
2006-07-14 8:16 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Ram @ 2006-07-14 7:29 UTC (permalink / raw)
To: u-boot
Hi,
I am using a omap5912osk board which uses arm926-ejs CPU.
I am trying to understand the flow of u-boot - what really happens
when the board is powered on till i get the u-boot prompt which
accepts commands from the user.
I started with the file u-boot-1.1.4/cpu/arm926ejs/start.S
Is this the place where u-boot actually starts?.
It tries switch the cpu mode to SVC32 mode and relocates u-boot to
RAM, disables MMU
and does so many things which i dont really understand.
Could anyone explain it to me what really is happening out there and why?.
Then i figured out that a function start_armboot() is called. This
function is present in
lib_arm/board.c is this function called by start.S?
Where exactly it is called from?.
There is a reference to start_armboot in start.S not sure if it is the one?.
ldr pc, _start_armboot
_start_armboot:
.word start_armboot
Does this actually invoke start_armboot?.
I have got so far. could you please tell me am i right in my understarting?.
I understand that start_armboot initialises the the cpu, board, dram....
Once this is done - we can say that the board has been initialised.
Now start_armboot provides a prompt to accept and download the kernel.
Am i right in assuming this?.
Any other information and pointers u provide will be helpful
I am trying to understand u-boot sources and any help will be highly
appreciated.
I just wanted to clarify my understanding.
Thanks and Regards,
sriram
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] clarifications u-boot for arm
2006-07-14 7:29 [U-Boot-Users] clarifications u-boot for arm Ram
@ 2006-07-14 8:16 ` Wolfgang Denk
2006-07-14 13:51 ` Ram
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2006-07-14 8:16 UTC (permalink / raw)
To: u-boot
In message <8bf247760607140029l62f6c124idee300237361518f@mail.gmail.com> you wrote:
>
> I am trying to understand the flow of u-boot - what really happens
> when the board is powered on till i get the u-boot prompt which
> accepts commands from the user.
You've posted the same question before.
> I started with the file u-boot-1.1.4/cpu/arm926ejs/start.S
> Is this the place where u-boot actually starts?.
Yes.
> It tries switch the cpu mode to SVC32 mode and relocates u-boot to
> RAM, disables MMU
> and does so many things which i dont really understand.
I recommend toi follow the flow step by step. Most functions have
pretty descriptive names.
> Could anyone explain it to me what really is happening out there and why?.
We initialize the system step by step as needed to get a running
system capable of booting Linux.
> Then i figured out that a function start_armboot() is called. This
> function is present in
> lib_arm/board.c is this function called by start.S?
>
> Where exactly it is called from?.
Use grep to find the call.
> There is a reference to start_armboot in start.S not sure if it is the one?.
Why not?
> ldr pc, _start_armboot
> _start_armboot:
> .word start_armboot
>
> Does this actually invoke start_armboot?.
Guess what happens when you load a new address into the rpgram counter?
> I have got so far. could you please tell me am i right in my understarting?.
Yes.
> I understand that start_armboot initialises the the cpu, board, dram....
> Once this is done - we can say that the board has been initialised.
More or less.
> Any other information and pointers u provide will be helpful
Read the README, the manual, and the sources.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The lesser of two evils -- is evil." - Seymour (Sy) Leon
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] clarifications u-boot for arm
2006-07-14 8:16 ` Wolfgang Denk
@ 2006-07-14 13:51 ` Ram
2006-07-14 14:11 ` Russell Peterson
2006-07-18 10:54 ` Andreas Schweigstill
0 siblings, 2 replies; 6+ messages in thread
From: Ram @ 2006-07-14 13:51 UTC (permalink / raw)
To: u-boot
Hi,
Thanks for your response. I have gone much further and would like to know If
ldr pc, _start_armboot
_start_armboot:
.word start_armboot
Does this really invoke start_armboot?. This is because
_start_armboot is what is
stored in pc and not start_armboot and there is also a branch
point _start_armboot (underscore start_armboot) Please see above.
Actually the above declares a variable start_armboot and does not
invoke the function
start_armboot. If this is true, then who calls start_armboot?
According to me start_armboot ( ) which is present in
lib_arm/board.c never returns until u reset the board and probably
should be one of the last functions that needs to be called.
Correct?.
Rest agreed, What i have understood is
First, reset is called which set the cpu to SVC32 mode and
calls cpu_init_crit
which inturn calls lowlevel_init to setup memory and board
specific register values.
Then stack is setup and start_amboot is called.
start_armboot is the point of entry where code is C. ie
(Assembly to C) begins from start_armboot.
am i Correct?.
This is the function which does some remaining initialisation
and then starts initialising the for pheripherals.
am i Correct?
I didnt understand the things relating interrupt and thier processing though.
Thanks and Regards,
sriram
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] clarifications u-boot for arm
2006-07-14 13:51 ` Ram
@ 2006-07-14 14:11 ` Russell Peterson
2006-07-14 14:23 ` Jerry Van Baren
2006-07-18 10:54 ` Andreas Schweigstill
1 sibling, 1 reply; 6+ messages in thread
From: Russell Peterson @ 2006-07-14 14:11 UTC (permalink / raw)
To: u-boot
Hello,
The answer to your question "who calls start_armboot?" is answered by you
ASM code below. Hint... take a close look at the regsiter you are loading.
:-)
Regards,
Russell
On 7/14/06, Ram <vshrirama@gmail.com> wrote:
>
> Hi,
> Thanks for your response. I have gone much further and would like to
> know If
>
> ldr pc, _start_armboot
> _start_armboot:
> .word start_armboot
>
>
> Does this really invoke start_armboot?. This is because
> _start_armboot is what is
> stored in pc and not start_armboot and there is also a branch
> point _start_armboot (underscore start_armboot) Please see above.
>
> Actually the above declares a variable start_armboot and does not
> invoke the function
> start_armboot. If this is true, then who calls start_armboot?
>
>
> According to me start_armboot ( ) which is present in
> lib_arm/board.c never returns until u reset the board and probably
> should be one of the last functions that needs to be called.
>
> Correct?.
>
>
> Rest agreed, What i have understood is
> First, reset is called which set the cpu to SVC32 mode and
> calls cpu_init_crit
> which inturn calls lowlevel_init to setup memory and board
> specific register values.
>
> Then stack is setup and start_amboot is called.
>
>
> start_armboot is the point of entry where code is C. ie
> (Assembly to C) begins from start_armboot.
>
>
> am i Correct?.
>
>
> This is the function which does some remaining initialisation
> and then starts initialising the for pheripherals.
>
>
> am i Correct?
>
>
> I didnt understand the things relating interrupt and thier processing
> though.
>
> Thanks and Regards,
> sriram
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060714/21103c1e/attachment.htm
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] clarifications u-boot for arm
2006-07-14 14:11 ` Russell Peterson
@ 2006-07-14 14:23 ` Jerry Van Baren
0 siblings, 0 replies; 6+ messages in thread
From: Jerry Van Baren @ 2006-07-14 14:23 UTC (permalink / raw)
To: u-boot
See bottom posted reply.
Russell Peterson wrote:
> Hello,
>
> The answer to your question "who calls start_armboot?" is answered by
> you ASM code below. Hint... take a close look at the regsiter you are
> loading.
>
> :-)
>
> Regards,
>
> Russell
>
>
> On 7/14/06, *Ram* <vshrirama at gmail.com <mailto:vshrirama@gmail.com>> wrote:
>
> Hi,
> Thanks for your response. I have gone much further and would like
> to know If
>
> ldr pc, _start_armboot
> _start_armboot:
> .word start_armboot
>
>
> Does this really invoke start_armboot?. This is because
> _start_armboot is what is
> stored in pc and not start_armboot and there is also a branch
> point _start_armboot (underscore start_armboot) Please see above.
>
> Actually the above declares a variable start_armboot and does not
> invoke the function
> start_armboot. If this is true, then who calls start_armboot?
[snip - I believe your observations are correct, but am not an expert]
> Thanks and Regards,
> sriram
Sriram:
C compiler naming convention prepends an underscore to the C function
name so the C function start_armboot() can be referenced from assembly
as a branch (call) to the label _start_armboot.
gvb
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] clarifications u-boot for arm
2006-07-14 13:51 ` Ram
2006-07-14 14:11 ` Russell Peterson
@ 2006-07-18 10:54 ` Andreas Schweigstill
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Schweigstill @ 2006-07-18 10:54 UTC (permalink / raw)
To: u-boot
Dear Ram!
Ram schrieb:
> Does this really invoke start_armboot?. This is because
> _start_armboot is what is
> stored in pc and not start_armboot and there is also a branch
> point _start_armboot (underscore start_armboot) Please see above.
And why don't you learn the syntax and semantics of ARM assembler
before you send messages to this list?
> I didnt understand the things relating interrupt and thier processing though.
In order to understand the interrupt related things I recommend reading
some documents about ARM architecture, your processor datasheet(s) AND
U-BOOT DOCUMENTATION. Then you will find out by yourself why it is so
difficult to understand interrupt handling on most platforms... :-) And
why don't you just hook your JTAG debugger on the interrupt entry point
and try to follow the execution flow? Then you will also notice
something very important in U-Boot...
Andreas Schweigstill
--
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstra?e 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-07-18 10:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-14 7:29 [U-Boot-Users] clarifications u-boot for arm Ram
2006-07-14 8:16 ` Wolfgang Denk
2006-07-14 13:51 ` Ram
2006-07-14 14:11 ` Russell Peterson
2006-07-14 14:23 ` Jerry Van Baren
2006-07-18 10:54 ` Andreas Schweigstill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox