[U-Boot] [RFC]: always relocate u-boot before the framebuffer

Wolfgang Denk wd at denx.de
Thu Jan 3 11:41:34 CET 2013


Dear Jeroen,

In message <50E55D24.8000809 at myspectrum.nl> you wrote:
> 
> So the intention was to fix that while preserving the frame buffer and I
> don't want linux to steal so much memory. The minimum amount of
> memory the dss accepts is 2MB though (for reason unknown to me).
> Without the fb address set U-boot will allocate it at 1MB before the end
> of the ram, since it does not have the 2MB minimum. With the fb address
> set to -2MB u-boot will allocate itself over it, hence the patch, do 
> actually
> reserve the frame buffer (well in the most simplistic way, by placing
> everything before it).
> 
> As Wolfgang suggested, maybe I shouldn't point at U-boot but blame
> linux and get rid of the 2MB alignment. I haven't checked yet, but I
> don't see why that should not work. So this is resolved for my
> case (thanks for the suggestion) for now until I meet
> 
> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg80440.html

Hm...

In any case the code should behave the same in U-Boot and Linux.  If
we can lift this restriction in Linux, then OK.  If not, then the FB
allocation in U-Boot (by lcd_setmem()) should result in the same size
as allocated by Linux.  After all, the allocated size should be a
"resasonable" one ;-)

> > +                Define CONFIG_FB_ADDR if you want to use specific
> > +                address for frame buffer.  This is typically the case
> > +                when using a graphics controller has separate video
> > +                memory.  U-Boot will then reserve the frame buffer at
> > +                the given address instead of dynamically reserving it
> > +                in system RAM by calling lcd_setmem(), which grabs
> > +                the memory for the frame buffer depending on the
> > +                configured panel size.
> >   
> >   		Please see board_init_f function.
> >   
> Maybe it is clearer as "U-boot will then place the frame buffer at ... 
> instead of reserving"

OK, will repost.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
2000 pounds of chinese soup                               = 1 Won Ton


More information about the U-Boot mailing list