From: Wolfgang Denk Date: Fri, 22 Oct 2010 09:19:38 +0200 Subject: [U-Boot] [PATCH] hwconfig: Utilize getenv_f before relocation to allow for larger buffer In-Reply-To: <1287731287-19240-1-git-send-email-galak@kernel.crashing.org> References: <1287731287-19240-1-git-send-email-galak@kernel.crashing.org> Message-ID: <20101022071938.E44C2136320@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Kumar Gala, In message <1287731287-19240-1-git-send-email-galak@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.