[coreboot] [PATCH] v3: add dump_mem_range()
Stefan Reinauer
stepan at coresystems.de
Mon Feb 11 01:12:51 CET 2008
* Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> [080211 00:08]:
> Add dump_mem_range to dump a memory range.
>
> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
bloat, bloat, bloat - bloat the bootblock a little more.
Acked-by: Stefan Reinauer <stepan at coresystems.de>
> Index: LinuxBIOSv3-dumprange/include/console.h
> ===================================================================
> --- LinuxBIOSv3-dumprange/include/console.h (Revision 585)
> +++ LinuxBIOSv3-dumprange/include/console.h (Arbeitskopie)
> @@ -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 */
> Index: LinuxBIOSv3-dumprange/arch/x86/stage1.c
> ===================================================================
> --- LinuxBIOSv3-dumprange/arch/x86/stage1.c (Revision 585)
> +++ LinuxBIOSv3-dumprange/arch/x86/stage1.c (Arbeitskopie)
> @@ -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)
> {
>
>
> --
> http://www.hailfinger.org/
>
>
> --
> coreboot mailing list
> coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
>
--
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.de • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
More information about the coreboot
mailing list