[PATCH 10/10] ARM: pbl: Add an option to validate DRAM

Sascha Hauer s.hauer at pengutronix.de
Wed Jun 3 01:10:02 PDT 2015


On Mon, Jun 01, 2015 at 06:09:38AM -0700, Andrey Smirnov wrote:
> > How about testing only a small fragment of DRAM, say 8MB, in your
> > lowlevel board code and calling barebox_arm_entry() with the
> > membase/memsize you previously tested? This way you can make sure that
> > barebox only uses tested memory without having to test all memory before
> > calling barebox_arm_entry() and without having to call back into some
> > testing function.
> 
> I like that solution and it does allow to get rid of all of that nasty
> linking address agnostic code. The only problem that I see with it is
> that if I start Barebox with 8MB of memory and then try to boot Linux
> of_memory_fixup() will modify the devicetree file and cause Linux to
> think the machine only has 8MB of RAM as well. Any ideas on how to
> deal with that?

You should pass a size of 8MB to barebox_arm_entry(). This should not
influence the memory banks which are for determing the memory passed to
Linux. You can instrument barebox_add_memory_bank() which should be
called with the real amount of SDRAM, not with the 8MB. If not, add a
dump_stack() to see who calls this function with the wrong amount.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list