[U-Boot-Users] U-Boot Memory Allocation for Framebuffer?
Michael Bendzick
michaelb at logicpd.com
Tue Jul 27 21:19:22 CEST 2004
Himba-
I had actually noticed the that size from size = lcd_setmem wasn't getting
used, and adjusted my own code to deal with that, it's just that I decided
to paste from CVS instead of my own code for some reason.
#ifdef CONFIG_LCD
/*
* reserve memory for LCD display (always full pages)
*/
/* bss_end is defined in the board-specific linker script */
addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
addr = lcd_setmem (addr);
gd->fb_base = addr;
#endif /* CONFIG_LCD */
...is what I actually was using, which matched lib_ppc/board.c...
/* round down to next 4 kB limit */
addr &= ~(4096 - 1);
#ifdef CONFIG_LCD
/* reserve memory for LCD display (always full pages) */
addr = lcd_setmem (addr);
gd->fb_base = addr;
#endif /* CONFIG_LCD */
In any case, I will give things a try with using the framebuffer at
0x110a2000.
-Michael Bendzick
-----Original Message-----
From: himba [mailto:himba at siol.net]
Sent: Tuesday, July 27, 2004 2:09 PM
To: Michael Bendzick
Cc: U-Boot-Users (E-mail)
Subject: Re: [U-Boot-Users] U-Boot Memory Allocation for Framebuffer?
Michael Bendzick 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.
>
> I make use of this code from lib_arm/board.c:
>
> #ifdef CONFIG_LCD
> /*
> * reserve memory for LCD display (always full pages)
> */
> /* bss_end is defined in the board-specific linker script */
> addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
> size = lcd_setmem (addr);
> gd->fb_base = addr;
> #endif /* CONFIG_LCD */
>
> I have a lcd_setmem function that works fine, but I don't think the memory
> map gets properly initialized once it knows how much framebuffer memory is
> needed.
>
If you look at the lcd_setmem() function in cpu/pxa/pxafb.c you
can see that it does nothing worth calling it - maybe just for
information that we are "reserving" FB mem. It just calculates the
size, prints it out and does nothing else on that chunk. Also note
that returned value by lcd_setmem() is not being used anywhere, for
that matter. For my pxa255 arm target board I commented out call to
lcd_setmem().
HTH,
himba
More information about the U-Boot
mailing list