[U-Boot-Users] U-Boot Memory Allocation for Framebuffer?

Wolfgang Denk wd at denx.de
Tue Jul 27 23:49:22 CEST 2004

In message <31ADFA827355984B9E2A161514595B561C330E at lpdsrv04.logicpd.com> you wrote:
> I'm doing some development on a LCD framebuffer for the OMAP 1510 Innovator
> board (ARM925T CPU), and am encountering some difficulties with code flying
> off to strange places.
> I'm theorizing that the code flies off because memory is not properly
> allocated for the framebuffer.  I'm basing all of my new U-Boot related code
> on cpu/mpc8xx/lcd.c, and adding LCD code from the OMAP kernel to get a final
> product.

It is not a good idea to use the PPC code as a model as it  is  based
on  a  different  memory  map.  It  may  not work on ARM - on PPC, we
actually compute the relocation address depeding on how  much  memory
we need to reserve. All this is missing for ARM.

> I'm wondering how the code block above, which also appears in roughly the
> same form in lib_ppc/board.c, is supposed to grab a block of free memory for
> the framebuffer.  Do I need to just allocate uchar

It does not gram anything. It is just a copy of  PPC  code  which  is
used in a completely different context on PPC.

> framebuffer[col*row*depth+palette] and point the framebuffer address to that
> instead?  Something else?

Either you simply make sure not to use  the  framebuffer  area  which
follows  the  BSS  segment,  or  (more  complicated)  you fix the ARM
implementation and implement real relocation as  done  for  PPC.  I'd
prefer  to  see  (2)  because  this  is  long  overdue,  but  I could
understand if you chose the simple route.

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"Life sucks, but death doesn't put out at all...."   - Thomas J. Kopp

More information about the U-Boot mailing list