From 3dd0e72d3b9ad5fb6593db6c81c9ad712711e330 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Thu, 26 Dec 2013 22:53:52 -0500 Subject: lib/hexdump: Take const void * and size_t as arguments Representing a memory location as an unsigned long is specific to 32-bit architectures. It also doesn't make sense to represent a length assumed to be positive as a signed integer. With this change, it is no longer necessary to cast a pointer to unsigned long when passing it to hexdump. Change-Id: I641777d940ceac6f37c363051f1e9c1b3ec3ed95 Signed-off-by: Alexandru Gagniuc Reviewed-on: http://review.coreboot.org/4575 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/include/lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/include/lib.h') diff --git a/src/include/lib.h b/src/include/lib.h index 3a515332b1..8de49d3508 100644 --- a/src/include/lib.h +++ b/src/include/lib.h @@ -22,6 +22,7 @@ #ifndef __LIB_H__ #define __LIB_H__ #include +#include #if !defined(__ROMCC__) /* Conflicts with inline function in arch/io.h */ /* Defined in src/lib/clog2.c */ @@ -57,6 +58,6 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx); void post_cache_as_ram(void); /* Defined in src/lib/hexdump.c */ -void hexdump(unsigned long memory, int length); +void hexdump(const void *memory, size_t length); #endif /* __LIB_H__ */ -- cgit v1.2.3