From 6ba8deb56dc6c0506d628a7936a4e9f3ad1083c4 Mon Sep 17 00:00:00 2001 From: David James Date: Tue, 16 Apr 2013 17:11:32 -0700 Subject: [PATCH] Cast addresses and offsets to long long to work on all platforms. Right now, these offsets are not declared with the correct printf specifiers. Fix that. BUG=none TEST=launch trybots on all platforms Change-Id: Ic6ac0afe047ab7b61b5753cc5bab261d1a860ba6 Reviewed-on: https://gerrit.chromium.org/gerrit/48321 Reviewed-by: David James Tested-by: David James --- util/cbmem/cbmem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c index bc6bd6b9c8..f2ab049fd0 100644 --- a/util/cbmem/cbmem.c +++ b/util/cbmem/cbmem.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -84,7 +85,7 @@ static void *map_memory(u64 physical) /* Mapped memory must be aligned to page size */ p = physical & ~(page - 1); - debug("Mapping 1MB of physical memory at 0x%zx.\n", p); + debug("Mapping 1MB of physical memory at 0x%llx.\n", (unsigned long long) p); v = mmap(NULL, MAP_BYTES, PROT_READ, MAP_SHARED, fd, p); @@ -132,7 +133,7 @@ static int parse_cbtable(u64 address) int i, found = 0; void *buf; - debug("Looking for coreboot table at %lx\n", address); + debug("Looking for coreboot table at %" PRIu64 "\n", address); buf = map_memory(address); /* look at every 16 bytes within 4K of the base */