
Dear Minkyu Kang,
In message AANLkTi=Dfipyi4-Qxs5sfCzsOyWjsUydUaY4_C6r+_Wv@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