Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-17 Thread Tom Rini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/16/2014 07:06 PM, Alexey Brodkin wrote: On Fri, 2014-01-17 at 00:40 +0400, Alexey Brodkin wrote: On Thu, 2014-01-16 at 21:27 +0100, Albert ARIBAUD wrote: Well, I've just realized that very similar thing is done in fixup_cmdtable. So I

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-16 Thread Alexey Brodkin
On Wed, 2014-01-15 at 22:43 +0100, Albert ARIBAUD wrote: Hi Alexey, On Wed, 15 Jan 2014 15:19:56 +0400, Alexey Brodkin alexey.brod...@synopsys.com wrote: init_sequence_r is just an array that consists of compile-time adresses of init functions. Since this is basically an array of

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-16 Thread Alexey Brodkin
On Wed, 2014-01-15 at 09:56 -0700, Simon Glass wrote: I have not checked to make sure that the array contents remains un-relocated. Did you see this? Hi Simon, yes, I do see it. Please refer to my outputs below: 1. Without manual init_sequence_r modification: U-Boot

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-16 Thread Albert ARIBAUD
Hi Alexey, On Thu, 16 Jan 2014 17:48:45 +, Alexey Brodkin alexey.brod...@synopsys.com wrote: On Wed, 2014-01-15 at 22:43 +0100, Albert ARIBAUD wrote: Hi Alexey, On Wed, 15 Jan 2014 15:19:56 +0400, Alexey Brodkin alexey.brod...@synopsys.com wrote: init_sequence_r is just an

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-16 Thread Alexey Brodkin
On Thu, 2014-01-16 at 21:27 +0100, Albert ARIBAUD wrote: GOT relocation does not relocate references within data, contrary to ELF. Maybe it's just my faulty implementation of relocation but it might be that nobody ever noticed this because I think only initcalls are affected. Well,

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-16 Thread Alexey Brodkin
On Fri, 2014-01-17 at 00:40 +0400, Alexey Brodkin wrote: On Thu, 2014-01-16 at 21:27 +0100, Albert ARIBAUD wrote: Well, I've just realized that very similar thing is done in fixup_cmdtable. So I believe with addition of CONFIG_NEEDS_MANUAL_RELOC wrapper my change may make some sense. Any

[U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-15 Thread Alexey Brodkin
init_sequence_r is just an array that consists of compile-time adresses of init functions. Since this is basically an array of integers (pointers to void to be more precise) it won't be modified during relocation - it will be just copied to new location as it is. As a consequence on execution

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-15 Thread thomas.langer
Hello Alexey, Alexey Brodkin wrote on 2014-01-15: init_sequence_r is just an array that consists of compile-time adresses of init functions. Since this is basically an array of integers (pointers to void to be more precise) it won't be modified during relocation - it will be just copied to

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-15 Thread Alexey Brodkin
On Wed, 2014-01-15 at 11:27 +, thomas.lan...@lantiq.com wrote: I think this is only required/possible for architectures which define CONFIG_NEEDS_MANUAL_RELOC, others don't have gd-reloc_off if (initcall_run_list(init_sequence_r)) hang(); Hi Thomas, I think it's a

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-15 Thread thomas.langer
Alexey Brodkin wrote on 2014-01-15: On Wed, 2014-01-15 at 11:27 +, thomas.lan...@lantiq.com wrote: I think this is only required/possible for architectures which define CONFIG_NEEDS_MANUAL_RELOC, others don't have gd-reloc_off if (initcall_run_list(init_sequence_r))

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-15 Thread Simon Glass
Hi Alexey, On 15 January 2014 04:19, Alexey Brodkin alexey.brod...@synopsys.comwrote: init_sequence_r is just an array that consists of compile-time adresses of init functions. Since this is basically an array of integers (pointers to void to be more precise) it won't be modified during

Re: [U-Boot] [PATCH] board_r - fixup functions table after relocation

2014-01-15 Thread Albert ARIBAUD
Hi Alexey, On Wed, 15 Jan 2014 15:19:56 +0400, Alexey Brodkin alexey.brod...@synopsys.com wrote: init_sequence_r is just an array that consists of compile-time adresses of init functions. Since this is basically an array of integers (pointers to void to be more precise) it won't be modified