[U-Boot] [PATCH v5] arm: ep9315: Return back Cirrus Logic EDB9315A board support

sergey kostanbaev sergey.kostanbaev at gmail.com
Sun May 25 20:27:51 CEST 2014


Hi Albert,

See my comments below


> From V4 discussion:
>
> > > Is this needed? Can't the general get_ram_size() function be used?
> > >
> > This is REALLY needed. It's a key feature it calculates RAM size at
> > runtime otherwise you have to put constant of data-bus width, actual
> > memory installed. And this procedure does it and you don't have to
> > recompile it for the very specific board with similar processor
> > family.
>
> get_ram_size() does calculate the RAM size at run time, so I still fail
> to see why a dedicated function is needed. Can you please clarify this
> point?
>

If I understand correct function long get_ram_size(long *base, long
maxsize) in  common/memsize.c  does different job. It just calculate size
of continues memory region. But it's not always happen on EP93xx boards.
One board can have 32Mb but mapped as 4 region on 8Mb with 8Mb gap each.
Another may have 64Mb with 2*32Mb regions, and also 64*1Mb possible, etc.
So we need not just to calculate total size bu we need to understand dram
mapping configuration. E.g, for this EP9xx family on Windows CE you have to
set proper mapping during compilation. And compiled image won't work if you
have board with different DRAM chips. Some other bootloader exploits this
technique -- just to hardcode mapping. This solution calculate actual
mapping and one don't have to properly put defines and calculate it. So I
think, it's better to have very specific dedicated function but to leave it
working with many different EP-based boards.

Is it clear now?



> From V4 discussion:
>
> > > Does this board need a specific .lds file?
> > >
> > Yes. It must have special magic header to start booting otherwise it
> > will be considered as invalid image and internal boot ROOM ignore it.
>
> I guess the magic header is this portion:
>
> > +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
> > +OUTPUT_ARCH(arm)
> > +ENTRY(_start)
> > +SECTIONS
> > +{
> > +     . = 0x00000000;
> > +
> > +     . = ALIGN(4);
> > +     .text : {
> > +             *(.__image_copy_start)
> > +             arch/arm/cpu/arm920t/start.o (.text*)
> ----- start of 'magic header'
> > +             . = 0x1000;
> > +
> > +             LONG(0x53555243)
> ----- end of 'magic header'
> > +             *(.text*)
> > +     }
>
> If so, then I do understand that you currently need a specific lds
> file, but please document this through a comment in the linker script.
>

You point it right, I'll add a comment here

Best Regards,
Sergey


More information about the U-Boot mailing list