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

Wolfgang Denk wd at denx.de
Tue Jan 11 12:23:11 CET 2011


Dear Minkyu Kang,

In message <AANLkTi=Dfipyi4-Qxs5sfCzsOyWjsUydUaY4_C6r+_Wv at mail.gmail.com> you wrote:
>
> > 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?

Yes, immediately preceeding it: the reservation of the video memory is
part of the calculation of the relocation address.

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

This is not correct, if panel_info is really not initialized.

Normally panel_info should be initialized; see for example here:

"drivers/video/mx3fb.c":

...
110 vidinfo_t panel_info = {
111         .vl_col         = XRES,
112         .vl_row         = YRES,
113         .vl_bpix        = LCD_COLOR_IPU,
114         .cmap           = colormap,
115 };
...

Here panel_info is initialized and located in the data segment; this
is still read-only here, but that is sufficient.

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
God runs electromagnetics by wave theory on  Monday,  Wednesday,  and
Friday,  and the Devil runs them by quantum theory on Tuesday, Thurs-
day, and Saturday.                                   -- William Bragg


More information about the U-Boot mailing list