Patchwork [U-Boot,02/10] make the hwconfig buffer deeper

login
register
mail settings
Submitter York Sun
Date Dec. 9, 2010, 2:55 a.m.
Message ID <1291863340-4354-2-git-send-email-yorksun@freescale.com>
Download mbox | patch
Permalink /patch/74835/
State Superseded
Delegated to: Kumar Gala
Headers show

Comments

York Sun - Dec. 9, 2010, 2:55 a.m.
To temporarily fix buffer issue when running at flash, use bigger buffer
to push down the stack deeper.

Signed-off-by: York Sun <yorksun@freescale.com>
---
 common/hwconfig.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Wolfgang Denk - Dec. 9, 2010, 10:12 a.m.
Dear York Sun,

In message <1291863340-4354-2-git-send-email-yorksun@freescale.com> you wrote:
> To temporarily fix buffer issue when running at flash, use bigger buffer
> to push down the stack deeper.

What does this mean? "temporarily fix" ? Do you have another,
permanent fix in the works

> Signed-off-by: York Sun <yorksun@freescale.com>
> ---
>  common/hwconfig.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/common/hwconfig.c b/common/hwconfig.c
> index 3c9759f..1b33d95 100644
> --- a/common/hwconfig.c
> +++ b/common/hwconfig.c
> @@ -71,7 +71,7 @@ next:
>  const char *cpu_hwconfig __attribute__((weak));
>  const char *board_hwconfig __attribute__((weak));
>  
> -#define HWCONFIG_PRE_RELOC_BUF_SIZE	128
> +#define HWCONFIG_PRE_RELOC_BUF_SIZE	256

Is this really, really necessary?  Memory is a scarce resource
pre relocation.

Best regards,

Wolfgang Denk
York Sun - Dec. 10, 2010, 6:50 p.m.
Wolfgang,

On Thu, 2010-12-09 at 11:12 +0100, Wolfgang Denk wrote:
> Dear York Sun,
> 
> In message <1291863340-4354-2-git-send-email-yorksun@freescale.com> you wrote:
> > To temporarily fix buffer issue when running at flash, use bigger buffer
> > to push down the stack deeper.
> 
> What does this mean? "temporarily fix" ? Do you have another,
> permanent fix in the works

I am not happy with this "fix" either. Kumar changed the code to use
deeper buffer as a workaround. This is the only way I can make it work
following him.

> 
> > Signed-off-by: York Sun <yorksun@freescale.com>
> > ---
> >  common/hwconfig.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/common/hwconfig.c b/common/hwconfig.c
> > index 3c9759f..1b33d95 100644
> > --- a/common/hwconfig.c
> > +++ b/common/hwconfig.c
> > @@ -71,7 +71,7 @@ next:
> >  const char *cpu_hwconfig __attribute__((weak));
> >  const char *board_hwconfig __attribute__((weak));
> >  
> > -#define HWCONFIG_PRE_RELOC_BUF_SIZE	128
> > +#define HWCONFIG_PRE_RELOC_BUF_SIZE	256
> 
> Is this really, really necessary?  Memory is a scarce resource
> pre relocation.

Let me work with Kumar on this.

York
Kumar Gala - Dec. 14, 2010, 4:59 a.m.
On Dec 10, 2010, at 12:50 PM, York Sun wrote:

> Wolfgang,
> 
> On Thu, 2010-12-09 at 11:12 +0100, Wolfgang Denk wrote:
>> Dear York Sun,
>> 
>> In message <1291863340-4354-2-git-send-email-yorksun@freescale.com> you wrote:
>>> To temporarily fix buffer issue when running at flash, use bigger buffer
>>> to push down the stack deeper.
>> 
>> What does this mean? "temporarily fix" ? Do you have another,
>> permanent fix in the works
> 
> I am not happy with this "fix" either. Kumar changed the code to use
> deeper buffer as a workaround. This is the only way I can make it work
> following him.
> 
>> 
>>> Signed-off-by: York Sun <yorksun@freescale.com>
>>> ---
>>> common/hwconfig.c |    2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>> 
>>> diff --git a/common/hwconfig.c b/common/hwconfig.c
>>> index 3c9759f..1b33d95 100644
>>> --- a/common/hwconfig.c
>>> +++ b/common/hwconfig.c
>>> @@ -71,7 +71,7 @@ next:
>>> const char *cpu_hwconfig __attribute__((weak));
>>> const char *board_hwconfig __attribute__((weak));
>>> 
>>> -#define HWCONFIG_PRE_RELOC_BUF_SIZE	128
>>> +#define HWCONFIG_PRE_RELOC_BUF_SIZE	256
>> 
>> Is this really, really necessary?  Memory is a scarce resource
>> pre relocation.
> 
> Let me work with Kumar on this.

Got any ideas?  I'm not a fan but not sure what else we can do.

- k

Patch

diff --git a/common/hwconfig.c b/common/hwconfig.c
index 3c9759f..1b33d95 100644
--- a/common/hwconfig.c
+++ b/common/hwconfig.c
@@ -71,7 +71,7 @@  next:
 const char *cpu_hwconfig __attribute__((weak));
 const char *board_hwconfig __attribute__((weak));
 
-#define HWCONFIG_PRE_RELOC_BUF_SIZE	128
+#define HWCONFIG_PRE_RELOC_BUF_SIZE	256
 
 static const char *__hwconfig(const char *opt, size_t *arglen)
 {