[U-Boot] [PATCH RFC] armv7: fixloop: don't fixup if location is NULL

Minkyu Kang promsoft at gmail.com
Tue Jan 11 12:13:21 CET 2011


On 11 January 2011 20:03, Wolfgang Denk <wd at denx.de> wrote:
> Dear Minkyu Kang,
>
> In message <AANLkTikj4LCUUukDKVCG8Shbi6ZHKU9vzGDz0fNG=87b at mail.gmail.com> you wrote:
>>
>> This problem is not belong to my code.
>> Move after relocation? it's easy.
>> but, how we can reserve the memory for LCD?
>
> Reservation of video memory is a standard task in the init sequence.
> See this section in "arch/arm/lib/board.c":
>
> 358 #ifdef CONFIG_LCD
> 359         /* reserve memory for LCD display (always full pages) */
> 360         addr = lcd_setmem (addr);
> 361         gd->fb_base = addr;
> 362 #endif /* CONFIG_LCD */
>
>

Yes I know...
This init sequence is run before the relocation, right?

Please see lcd_setmem function.
This function access panel_info that is uninitialized.
Is it correct?

 438 ulong lcd_setmem (ulong addr)
 439 {
 440         ulong size;
 441         int line_length = (panel_info.vl_col * NBITS
(panel_info.vl_bpix)) / 8;
 442
 443         debug ("LCD panel info: %d x %d, %d bit/pix\n",
 444                 panel_info.vl_col, panel_info.vl_row, NBITS
(panel_info.vl_bpix) );
 445
 446         size = line_length * panel_info.vl_row;
 447
 448         /* Round up to nearest full page */
 449         size = (size + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
 450
 451         /* Allocate pages for the frame buffer. */
 452         addr -= size;
 453
 454         debug ("Reserving %ldk for LCD Framebuffer at: %08lx\n",
size>>10, addr);
 455
 456         return (addr);
 457 }

Thanks
Minkyu Kang.
-- 
from. prom.
www.promsoft.net


More information about the U-Boot mailing list