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

2011-01-11 Thread Andreas Bießmann
Dear Minkyu Kang, Am 11.01.2011 14:00, schrieb Andreas Bießmann: > Dear Minkyu Kang, > > Am 11.01.2011 11:57, schrieb Minkyu Kang: > >>> Regardless of the patch, if your code writes to panel_info or any other BSS >>> variable before relocation it will trash the relocation tables that exist at >>

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

2011-01-11 Thread Andreas Bießmann
Dear Minkyu Kang, Am 11.01.2011 11:57, schrieb Minkyu Kang: >> Regardless of the patch, if your code writes to panel_info or any other BSS >> variable before relocation it will trash the relocation tables that exist at >> BSS location at this point. >> >> IOW, accessing BSS before relocation is f

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

2011-01-11 Thread Wolfgang Denk
Dear Minkyu Kang, In message 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_s

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

2011-01-11 Thread Minkyu Kang
On 11 January 2011 20:03, Wolfgang Denk wrote: > Dear Minkyu Kang, > > In message 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.

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

2011-01-11 Thread Wolfgang Denk
Dear Minkyu Kang, In message 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 CONF

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

2011-01-11 Thread Minkyu Kang
Dear Albert ARIBAUD, On 11 January 2011 02:21, Albert ARIBAUD wrote: > Le 10/01/2011 15:04, Minkyu Kang a écrit : > How about lcd_setmem function? panel_info is located at bss area, but lcd_setmem access this structure. Is it illegal? >>> >>> This must not be done before relocation

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

2011-01-10 Thread Albert ARIBAUD
Le 10/01/2011 15:04, Minkyu Kang a écrit : >>> How about lcd_setmem function? >>> panel_info is located at bss area, but lcd_setmem access this structure. >>> Is it illegal? >> >> This must not be done before relocation. > > No, please see 360 line of arch/arm/lib/board.c > This function is called

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

2011-01-10 Thread Minkyu Kang
Dear Wolfgang Denk, On 10 January 2011 21:14, Wolfgang Denk wrote: > Dear Minkyu Kang, > > In message you > wrote: >> >> >> int (*test_func)(void); >> > >> > This results in a symbol in bss segment, right? >> > >> >> And then, set to NULL at arch_cpu_init() >> > >> > Such an assignment is illeg

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

2011-01-10 Thread Wolfgang Denk
Dear Minkyu Kang, In message you wrote: > > >> int (*test_func)(void); > > > > This results in a symbol in bss segment, right? > > > >> And then, set to NULL at arch_cpu_init() > > > > Such an assignment is illegal then. Bss has not been initalized before > > relocation, and must not be accesse

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

2011-01-10 Thread Minkyu Kang
Dear Wolfgang Denk, On 10 January 2011 19:20, Wolfgang Denk wrote: > Dear Minkyu Kang, > > In message you > wrote: >> >> Declared function pointer. >> >> int (*test_func)(void); > > This results in a symbol in bss segment, right? > >> And then, set to NULL at arch_cpu_init() > > Such an assignm

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

2011-01-10 Thread Wolfgang Denk
Dear Minkyu Kang, In message you wrote: > > Declared function pointer. > > int (*test_func)(void); This results in a symbol in bss segment, right? > And then, set to NULL at arch_cpu_init() Such an assignment is illegal then. Bss has not been initalized before relocation, and must not be ac

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

2011-01-09 Thread Minkyu Kang
Hello, On 8 January 2011 19:49, Albert ARIBAUD wrote: >>> diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S >>> index 684f2d2..4eeb12a 100644 >>> --- a/arch/arm/cpu/armv7/start.S >>> +++ b/arch/arm/cpu/armv7/start.S >>> @@ -195,6 +195,8 @@ copy_loop: >>>      add     r3, r3, r0

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

2011-01-09 Thread Andreas Bießmann
Hi Albert, Am 09.01.2011 um 10:00 schrieb Albert ARIBAUD: > Hi Andreas, > > Le 08/01/2011 17:51, Andreas Bießmann a écrit : >> Dear Albert ARIBAUD, >> >> Am 08.01.2011 um 13:18 schrieb Albert ARIBAUD: >> >>> Le 08/01/2011 11:49, Albert ARIBAUD a écrit : >>> > In my investigations for 'NUL

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

2011-01-09 Thread Albert ARIBAUD
Hi Andreas, Le 08/01/2011 17:51, Andreas Bießmann a écrit : > Dear Albert ARIBAUD, > > Am 08.01.2011 um 13:18 schrieb Albert ARIBAUD: > >> Le 08/01/2011 11:49, Albert ARIBAUD a écrit : >> In my investigations for 'NULL fixup' (-> see http://thread.gmane.org/gmane.comp.boot-loaders.u-boo

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

2011-01-08 Thread Andreas Bießmann
Dear Albert ARIBAUD, Am 08.01.2011 um 13:18 schrieb Albert ARIBAUD: > Le 08/01/2011 11:49, Albert ARIBAUD a écrit : > >>> In my investigations for 'NULL fixup' (-> see >>> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/89864/focus=89906) >>> pointed out that only symbols in 'absolute fix

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

2011-01-08 Thread Joakim Tjernlund
> > Le 08/01/2011 11:49, Albert ARIBAUD a écrit : > > >> In my investigations for 'NULL fixup' (-> see > >> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/89864/focus=89906) > >> pointed out that only symbols in 'absolute fixup' loop could be 'NULL' > >> if there is a not aliased/empty weak

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

2011-01-08 Thread Albert ARIBAUD
Le 08/01/2011 11:49, Albert ARIBAUD a écrit : >> In my investigations for 'NULL fixup' (-> see >> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/89864/focus=89906) >> pointed out that only symbols in 'absolute fixup' loop could be 'NULL' >> if there is a not aliased/empty weakly linked sym

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

2011-01-08 Thread Albert ARIBAUD
Le 08/01/2011 11:32, Andreas Bießmann a écrit : > Dear Minkyu Kang, > > Am 27.12.2010 um 11:27 schrieb Minkyu Kang: > >> There is possibility that pointers set to NULL before relocation. >> In this case, system is hang, because of r0 is invalid location in RAM. >> >> Signed-off-by: Minkyu Kang >> -

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

2011-01-08 Thread Andreas Bießmann
Dear Minkyu Kang, Am 27.12.2010 um 11:27 schrieb Minkyu Kang: > There is possibility that pointers set to NULL before relocation. > In this case, system is hang, because of r0 is invalid location in RAM. > > Signed-off-by: Minkyu Kang > --- > arch/arm/cpu/armv7/start.S |3 +++ > 1 files chan

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

2010-12-27 Thread Minkyu Kang
There is possibility that pointers set to NULL before relocation. In this case, system is hang, because of r0 is invalid location in RAM. Signed-off-by: Minkyu Kang --- arch/arm/cpu/armv7/start.S |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/start.