[coreboot] r586 - in coreboot-v3: arch/x86 include
svn at coreboot.org
svn at coreboot.org
Mon Feb 11 01:41:18 CET 2008
Author: hailfinger
Date: 2008-02-11 01:41:17 +0100 (Mon, 11 Feb 2008)
New Revision: 586
Modified:
coreboot-v3/arch/x86/stage1.c
coreboot-v3/include/console.h
Log:
Add dump_mem_range to dump a memory range.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
Modified: coreboot-v3/arch/x86/stage1.c
===================================================================
--- coreboot-v3/arch/x86/stage1.c 2008-02-10 22:52:39 UTC (rev 585)
+++ coreboot-v3/arch/x86/stage1.c 2008-02-11 00:41:17 UTC (rev 586)
@@ -66,6 +66,19 @@
// 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)
{
Modified: coreboot-v3/include/console.h
===================================================================
--- coreboot-v3/include/console.h 2008-02-10 22:52:39 UTC (rev 585)
+++ coreboot-v3/include/console.h 2008-02-11 00:41:17 UTC (rev 586)
@@ -49,5 +49,6 @@
SHARED_WITH_ATTRIBUTES(printk, int, __attribute__((format (printf, 2, 3))),
int msg_level, const char *fmt, ...);
SHARED(banner, void, int msg_level, const char *msg);
+SHARED(dump_mem_range, void, int msg_level, unsigned char *buf, int size);
#endif /* CONSOLE_H */
More information about the coreboot
mailing list