Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/19567 )
Change subject: intelmetool: Use correct type for pointer ......................................................................
intelmetool: Use correct type for pointer
Use `uintptr_t` instead of `uint32_t`, fixing the error below on 64-bit systems, where pointers are 64-bit wide.
``` cc -O0 -g -Wall -W -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-sign-compare -Wno-unused-function -c -o intelmetool.o intelmetool.c intelmetool.c: In function ‘dump_me_memory’: intelmetool.c:85:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] dump = map_physical_exact((off_t)me_clone, (void *)me_clone, 0x2000000); ^ ```
BUG=https://ticket.coreboot.org/issues/111 Change-Id: Id8d778e97090668ad9308a82b44c6b2b599fd6c3 Signed-off-by: Paul Menzel pmenzel@molgen.mpg.de Reviewed-on: https://review.coreboot.org/19567 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Aaron Durbin adurbin@chromium.org Reviewed-by: Philipp Deppenwiese zaolin.daisuki@gmail.com Reviewed-by: Philippe Mathieu-Daudé philippe.mathieu.daude@gmail.com Reviewed-by: Paul Wise (Debian) pabs@debian.org --- M util/intelmetool/intelmetool.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Aaron Durbin: Looks good to me, approved Philippe Mathieu-Daudé: Looks good to me, but someone else must approve Philipp Deppenwiese: Looks good to me, approved Paul Wise (Debian): Looks good to me, but someone else must approve build bot (Jenkins): Verified
diff --git a/util/intelmetool/intelmetool.c b/util/intelmetool/intelmetool.c index 11c2120..b918c3e 100644 --- a/util/intelmetool/intelmetool.c +++ b/util/intelmetool/intelmetool.c @@ -79,7 +79,7 @@ * so we avoid cloning to this part. */ static void dump_me_memory() { - uint32_t me_clone = 0x60000000; + uintptr_t me_clone = 0x60000000; uint8_t *dump;
dump = map_physical_exact((off_t)me_clone, (void *)me_clone, 0x2000000);