Add dump_mem_range to dump a memory range.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@586 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Carl-Daniel Hailfinger 2008-02-11 00:41:17 +00:00
commit cd2b0ac19f
2 changed files with 14 additions and 0 deletions

View file

@ -66,6 +66,19 @@ void init_archive(struct mem_file *archive)
// FIXME check integrity
}
void dump_mem_range(int msg_level, unsigned char *buf, int size)
{
int i;
printk(msg_level, "dumping memrange %p size %i:\n", buf, size);
for (i = 0; i < size; i++) {
printk(msg_level, "%02x ", buf[i]);
if (i % 16 == 15)
printk(msg_level, "\n");
}
return;
}
/* until we get rid of elf */
int legacy(struct mem_file *archive, char *name, void *where, struct lb_memory *mem)
{