Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-03-01 Thread Graeme Russ
Hi Albert, On Fri, Mar 2, 2012 at 8:57 AM, Albert ARIBAUD wrote: > Hi Graeme, > > Le 29/02/2012 23:41, Graeme Russ a écrit : >> >> Hi Mike, >> >> On Thu, Mar 1, 2012 at 9:29 AM, Mike Frysinger  wrote: >>> >>> On Wednesday 29 February 2012 17:22:26 Graeme Russ wrote: On Thu, Mar 1, 2012

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-03-01 Thread Albert ARIBAUD
Hi Graeme, Le 29/02/2012 23:41, Graeme Russ a écrit : Hi Mike, On Thu, Mar 1, 2012 at 9:29 AM, Mike Frysinger wrote: On Wednesday 29 February 2012 17:22:26 Graeme Russ wrote: On Thu, Mar 1, 2012 at 6:04 AM, Mike Frysinger wrote: On Tuesday 28 February 2012 18:32:57 Graeme Russ wrote: And t

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-29 Thread Graeme Russ
Hi Mike, On Thu, Mar 1, 2012 at 9:29 AM, Mike Frysinger wrote: > On Wednesday 29 February 2012 17:22:26 Graeme Russ wrote: >> On Thu, Mar 1, 2012 at 6:04 AM, Mike Frysinger wrote: >> > On Tuesday 28 February 2012 18:32:57 Graeme Russ wrote: >> >> And this is why I dislike the implementation - You

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-29 Thread Mike Frysinger
On Wednesday 29 February 2012 17:22:26 Graeme Russ wrote: > On Thu, Mar 1, 2012 at 6:04 AM, Mike Frysinger wrote: > > On Tuesday 28 February 2012 18:32:57 Graeme Russ wrote: > >> And this is why I dislike the implementation - You have to do all sorts > >> of weird calucations to put things in the r

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-29 Thread Graeme Russ
Hi Mike, On Thu, Mar 1, 2012 at 6:04 AM, Mike Frysinger wrote: > On Tuesday 28 February 2012 18:32:57 Graeme Russ wrote: >> And this is why I dislike the implementation - You have to do all sorts of >> weird calucations to put things in the right place when, in fact, the >> location of gd and bd

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-29 Thread Mike Frysinger
On Tuesday 28 February 2012 18:32:57 Graeme Russ wrote: > And this is why I dislike the implementation - You have to do all sorts of > weird calucations to put things in the right place when, in fact, the > location of gd and bd in memory is totally irrelavent. right, that's why i minimized the pa

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-28 Thread Graeme Russ
Hi Albert, On Wed, Feb 29, 2012 at 10:24 AM, Albert ARIBAUD wrote: > Le 29/02/2012 00:20, Graeme Russ a écrit : > >> Hi Albert, >> >> No - GENERATED_GBL_DATA_SIZE should be sizeof(gd_t) >> >> The space reserved between U-Boot and the heap needs to be sizeof(gd_t) + >> sizeof(bd-t) (on the delica

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-28 Thread Albert ARIBAUD
Le 29/02/2012 00:20, Graeme Russ a écrit : Hi Albert, On Wed, Feb 29, 2012 at 9:55 AM, Albert ARIBAUD wrote: Hi Graeme, Le 28/02/2012 23:39, Graeme Russ a écrit : Hi Albert, On Wed, Feb 29, 2012 at 9:29 AM, Albert ARIBAUD wrote: Hi Alex, Le 21/02/2012 00:24, Alex Hornung a écrit :

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-28 Thread Graeme Russ
Hi Albert, On Wed, Feb 29, 2012 at 9:55 AM, Albert ARIBAUD wrote: > Hi Graeme, > > Le 28/02/2012 23:39, Graeme Russ a écrit : > >> Hi Albert, >> >> On Wed, Feb 29, 2012 at 9:29 AM, Albert ARIBAUD >>  wrote: >>> >>> Hi Alex, >>> >>> Le 21/02/2012 00:24, Alex Hornung a écrit : Hi, >

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-28 Thread Albert ARIBAUD
Hi Graeme, Le 28/02/2012 23:39, Graeme Russ a écrit : Hi Albert, On Wed, Feb 29, 2012 at 9:29 AM, Albert ARIBAUD wrote: Hi Alex, Le 21/02/2012 00:24, Alex Hornung a écrit : Hi, I've run into some memory corruption due to an error in the logic used to allocate the bd (and gd) during board

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-28 Thread Graeme Russ
Hi Albert, On Wed, Feb 29, 2012 at 9:29 AM, Albert ARIBAUD wrote: > Hi Alex, > > Le 21/02/2012 00:24, Alex Hornung a écrit : >> >> Hi, >> >> I've run into some memory corruption due to an error in the logic used >> to allocate the bd (and gd) during board_init of the nios2. >> >> >> #define CONFI

Re: [U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

2012-02-28 Thread Albert ARIBAUD
Hi Alex, Le 21/02/2012 00:24, Alex Hornung a écrit : Hi, I've run into some memory corruption due to an error in the logic used to allocate the bd (and gd) during board_init of the nios2. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_MALLOC_BASE - \