util/cbfstool: Qualify struct e820entry as packed

In order to accord with grub (see include/grub/i386/linux.h) and
comments for offsets of members of struct linux_params,
struct e820entry should be defined as __packed, otherwise,
sizeof(struct linux_params) will become 4224 (0x1080).

Fortunately, the affected area is usually not occupied.

Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Change-Id: I09955c90e4eec337adca383e628a8821075381d6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74270
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Bill XIE 2023-04-07 02:04:21 +08:00 committed by Lean Sheng Tan
parent 7f66adbc71
commit cd3545556e
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ struct e820entry {
#define E820_RESERVED 2
#define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
#define E820_NVS 4
};
} __packed;
/* The header of Linux/i386 kernel */
struct linux_header {