[U-Boot] [PATCH 0/20] Improvements to memory, hashing functions for sandbox
Tom Rini
trini at ti.com
Mon Feb 18 23:49:37 CET 2013
On Wed, Dec 26, 2012 at 10:56:53AM -0800, Simon Glass wrote:
> This series aims to get all the memory functions running correctly
> on sandbox.
>
> There was some discussion about this a while ago, and a commit was
> added to show a possible approach:
>
> 355a8357 sandbox: Change md command to use map_physmem
>
> This commit was subsequently reverted because it used map_physmem()
> instead of the NOP that most architectures need for the memory functions.
>
> This series introduces map_sysmem(), a NOP on all architectures
> except sandbox. It allows us to use a ram buffer to which all U-Boot
> addresses are relative. The memory commands (including hashing) are
> updated to use this so that sandbox can now use those commands.
>
> Half of the mtest code is behind #ifdefs and there is duplication of
> some functions in both versions of the memory test. Several patches
> here clean this up a bit and get it working on sandbox.
>
> The numeric setenv_ulong() function is a useful way of avoiding a
> 'char buf[17]; sprintf(buf, "%ld", ...); setenv("...", buf)' sequence.
> There is also setenv_addr(). What is missing is setenv_hex() which sets
> a ulong in hex format. Add this function and then make use of it in the
> main places: common/ drivers/ and net/.
>
> The recently added and very basic hash instructure can help reduce
> code duplication in some cases. Redo the crc32 command to use this, and
> make it available through the 'hash' command. Also a few bugs were
> found in hashing with verify disabled - the arg count was not checked and
> a variable declaration was missing.
>
> To permit the memory tester to run on sandbox, we need ctrl-C to work.
> To achieve this, add a proper implementation of sandbox's tstc(), with a
> simple FIFO for character input. An os_usleep() is added to ensure that
> U-Boot does not consume infinite CPU when setting at the command prompt.
>
> With all of this it is possible to use the memory commands in sandbox, as
> well as crc32 and the other hashing commands.
So, aside from a few posted comments:
Reviewed-by: Tom Rini <trini at ti.com>
And pending the answer to if you plan to v2 the hash command part (and
since everyone sets CONFIG_CMD_CRC32, we do want to be careful), I'm OK
with applying this bundle.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130218/ebf94f74/attachment.pgp>
More information about the U-Boot
mailing list