diff options
Diffstat (limited to 'src/console/console.c')
-rw-r--r-- | src/console/console.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/console/console.c b/src/console/console.c index 8a1c969987..39a30b5280 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -135,3 +135,23 @@ void console_init(void) #endif /* CONFIG_EARLY_CONSOLE */ } #endif + +#ifndef __ROMCC__ +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"); +} +#endif /* !__ROMCC__ */ |