diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-01-26 14:44:18 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-02-11 21:54:34 +0100 |
commit | 972d5cf040aebbb8052767a4a88ad99a961ad2bf (patch) | |
tree | ff06c3b5adfc9e6826bd7e67690e3f7a05e5534d /src/lib/hexdump.c | |
parent | 4d77ed9d99af5442d9fce889ce2199de773c4f08 (diff) | |
download | coreboot-972d5cf040aebbb8052767a4a88ad99a961ad2bf.tar.xz |
Move hexdump32() to lib/hexdump.
Needs printk and is not a console core function.
Change-Id: Id90a363eca133af4469663c1e8b504baa70471e0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5155
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/lib/hexdump.c')
-rw-r--r-- | src/lib/hexdump.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/hexdump.c b/src/lib/hexdump.c index 82b0a3ba5b..61009203eb 100644 --- a/src/lib/hexdump.c +++ b/src/lib/hexdump.c @@ -62,4 +62,20 @@ void hexdump(const void* memory, size_t length) } } +void hexdump32(char LEVEL, const void *d, int len) +{ + int count=0; + + while (len > 0) { + if (count % 8 == 0) { + printk(LEVEL,"\n"); + printk(LEVEL, "%p:", d); + } + printk(LEVEL, " 0x%08lx", *(unsigned long*)d); + count++; + len--; + d += 4; + } + printk(LEVEL,"\n\n"); +} |