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 <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/13875
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Werner Zeh 2016-03-02 17:55:31 +01:00
parent bbf508914d
commit ebf732b4a5
1 changed files with 3 additions and 3 deletions

View File

@ -31,9 +31,9 @@ typedef uint64_t u64;
#define E820MAX 32 /* number of entries in E820MAP */ #define E820MAX 32 /* number of entries in E820MAP */
struct e820entry { struct e820entry {
unsigned long long addr; /* start of memory segment */ u64 addr; /* start of memory segment */
unsigned long long size; /* size of memory segment */ u64 size; /* size of memory segment */
unsigned long type; /* type of memory segment */ u32 type; /* type of memory segment */
#define E820_RAM 1 #define E820_RAM 1
#define E820_RESERVED 2 #define E820_RESERVED 2
#define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */ #define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */