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>
This commit is contained in:
@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user