Wolfgang Denk wrote:
>
> In message <B9866264.5AEF%tchen@...> you wrote:
> >
> > i got the armboot to come up last week.... pretty easy
> > porting... (having an ICE helped a lot)... but i am in the
> > process of making LOTS of changes.... such as
>
> Be aware that I'm right now working on the merge of the ARMBoot
> sources back into a common source tree with PPCBoot, where it comes
> from. in this process, I am making _major_ changes, too.
>
> > a. THE ARMBOOT is not running with interrupt before, i am
> > changing it to enable interrupt
>
> I never tested this on ARM, but it's working fine with PPCBoot.
> Doesn't ARM use interrupts for the timer, too?
>
interrupt is NOT re-entrant.... right now on every IRQ, the stack
pointer is reloaded....
and i recognize that i only took a snapshot of the code... either i
will have to merge a later copy of the official source or my code would
be
obsolete (but it can still provide a reference for those who want to
merge it since i took care of most of the device handling/register
initialization....)
> > b. ARMBOOT load itself to RAM... i am changing it to just
> > move the data area to the RAM (leaving the code in ROM)
>
> Be careful; this cripples the tool because then it's impossible to
> store data into flash memory.
of course, but i have reorganize the data awawy from text... i just
dont have much memory to move the entire boot down, and then load the
kernel somewhere else in ram.... (at least this option should be
avaialble
for those with limited resources)
>
> > d. changing device drivers (timer, serial) to support IRQ
>
> What's the advantage to do so?
>
> IMHO it makes the code just more complicated (and probably bigger)
> without providing advantages to the user.
several reasons...
a. the current way (even timer is done by polling) is assuming that the
hardware has the TIME counter register... for some hardware/cpu
implementation, there is no such a thing except an OVERFLOW flag
indicating
the timer counter you loaded has reacehd the number.... the current
implementation assuming you can just go in read the current count and
then figure out the elapse time
b. without interrupt that means one device can run at a time, when you
are doing the output to terminal, basically serial_putc just sits there
and poll until tx buffer is empty... interrupt gives you ability to run
timer, ethernet, usb while serial port is going on....
>
> > f. adding more diagnostic capability... we are using the ARMBOOT
> > on our own production board... (it is based on oki chip, so i am
> > porting the armboot to oki board first and later to our board)
> > and testing it is important
i also move the timer somewhere to cpu/start.S,
the reason being that the memory initialization (initialing DRAM
controller,
spec says waiting 200us before starting the refreshing mechanism, )
being done there requires some kind of timer (some chips you have to
wait for
some time for something to settle down...etc0, instead of from
board/cpu.c
which initialize way later (in the interrupt_init routine)
>
> We have a lot of work for POST stuff going on right now for PPCBoot;
> once the merge to a common tree has been completed, at least the
> CPU-independend parts of this will be available for ARM, too.
true, but so far i am extremely impressed with the layout of the code
that was fairly easy to contain the changes in a few places... however
it would be better to have a PORTING guide so someone (like me) did not
have to read thru most of the code to figure out... (like figuring out
what each symbol CONFIG_XXX means to the big picture and by changing it
what does that effect everything)
but overall, very good stuff!!! much better than a few other bootloader
like blob and redboot that i looked at!
>
> Wolfgang Denk
>
> --
> Software Engineering: Embedded and Realtime Systems, Embedded Linux
> Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@...
> All he had was nothing, but that was something, and now it had been
> taken away. - Terry Pratchett, _Sourcery_
--
Thomas Chen
ShareMedia
tchen@...
|