[U-Boot] [PATCH] hwconfig: Utilize getenv_f before relocation to allow for larger buffer

Wolfgang Denk wd at denx.de
Fri Oct 22 09:19:38 CEST 2010


Dear Kumar Gala,

In message <1287731287-19240-1-git-send-email-galak at kernel.crashing.org> you wrote:
> Since we use hwconfig in cases before relocation (like getting DDR
> params on FSL PPC systems), we can have strings he exceed the early
--------------------------------------------------^^^ Typo?

> +DECLARE_GLOBAL_DATA_PTR;
> +

I don't see which part of your new code requires access to the global
data, so if that was notneeded before it should not be needed now
either.

> +#define CONFIG_SYS_HWCONFIG_PRE_RELOC_BUF_SIZE	128
> +

I'm not sure if it's a good idea to use the CONFIG_SYS_ prefix for a
strictly local macro name.

> +	if (gd->flags & GD_FLG_ENV_READY) {
> +		env_hwconfig = getenv("hwconfig");
> +	} else {
> +		/*
> +		 * Use our own on stack based buffer before relocation to allow
> +		 * accesing longer hwconfig strings that might be in the
-----------------------^^^ Typo.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I program, therefore I am.


More information about the U-Boot mailing list