From ebf732b4a52874cf1579153d6f3d24e2b94e15dc Mon Sep 17 00:00:00 2001 From: Werner Zeh Date: Wed, 2 Mar 2016 17:55:31 +0100 Subject: [PATCH] cbfstool: Use fixed width data types for e820entry struct. In e820entry struct, the members are defined using standard types. This can lead to different structure size when compiling on 32 bit vs. 64 bit environment. This in turn will affect the size of the struct linux_params. Using the fixed width types resolves this issue and ensures that the size of the structures will have the same length on both 32 and 64 bit systems. Change-Id: I1869ff2090365731e79b34950446f1791a083d0f Signed-off-by: Werner Zeh Reviewed-on: https://review.coreboot.org/13875 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- util/cbfstool/linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/cbfstool/linux.h b/util/cbfstool/linux.h index 529d23915f..b96f447a07 100644 --- a/util/cbfstool/linux.h +++ b/util/cbfstool/linux.h @@ -31,9 +31,9 @@ typedef uint64_t u64; #define E820MAX 32 /* number of entries in E820MAP */ struct e820entry { - unsigned long long addr; /* start of memory segment */ - unsigned long long size; /* size of memory segment */ - unsigned long type; /* type of memory segment */ + u64 addr; /* start of memory segment */ + u64 size; /* size of memory segment */ + u32 type; /* type of memory segment */ #define E820_RAM 1 #define E820_RESERVED 2 #define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */