[U-Boot-Users] ARM cleanup - was: [GIT PULL] [ARM] Please pull fromgit://denx.de/git/u-boot-arm.git
Peter Pearse
peter.pearse at arm.com
Thu Aug 30 15:11:15 CEST 2007
Wolfgang
I've got a bit lost here - can you explain a bit more.
please excuse me if the following seems a bit basic - I just want to
understand
what I need to clean up.
You said:
--- snip ---
> > I'm afraid I don't understand. We are not talking about any startup
> > code, but about the code of the "reset" function, i. e. what
> > casues the board to reset.
--- snip ---
I can't find a reference to the reset function.
There is do_reset() and set_cpu(), which the arm code supplies.
The only use of reset I can see is as a label in the ARM start.S.
The standard arm entry point to the U-Boot image is something like:-
.globl _start
_start: b reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
ldr pc, _data_abort
ldr pc, _not_used
ldr pc, _irq
ldr pc, _fiq
which is a (never currently used) imitation of the ARM architecture vector
table.
So when U-Boot runs it jumps to code of the form
reset:
Code to set the cpu to SVC32 mode
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
Code to e.g. remap RAM
#endif
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
Copy U-Boot code to RAM
#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
Code to
set up the stack
clear BSS
Jump to board.c::start_armboot()
--- snip ---
>> The writers (and cut & pasters) of ARM code seem to have assumed that
>> reset:
>> is the entry to the code which runs immediately after the processor is
>> reset, rather than the code which makes the processor reset.
> Well, if that was the assumption, that all this code has obviously
never been tested on any real hardware.
>> Could we accept Ulf's code whilst I give this more consideration?
> It's so utterly wrong that I think we have to clean this up before the
next release.
> If nobody submits a better patch, we will have to remove the bogus code.
--- snip ---
Is there anything that needs changing about the process I have described
above?
I could add ifdeffed code to really install the vector table at the ARM
reset point(s),
but it seems to me that the code will work OK as it is.
I do need to work with Ulf to put his code down into cpu_init_crit.
Both he & I missed the fact that CONFIG_BOOTBINFUNC got split &
changed into the two CONFIG_SKIP defines.
Regards
Peter
More information about the U-Boot
mailing list