From cd3545556ee410dc722e7046c96ac0fc7da51ade Mon Sep 17 00:00:00 2001 From: Bill XIE Date: Fri, 7 Apr 2023 02:04:21 +0800 Subject: [PATCH] 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 Change-Id: I09955c90e4eec337adca383e628a8821075381d6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74270 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Paul Menzel Reviewed-by: Nico Huber --- util/cbfstool/linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cbfstool/linux.h b/util/cbfstool/linux.h index dc4575ca95..2905f35b97 100644 --- a/util/cbfstool/linux.h +++ b/util/cbfstool/linux.h @@ -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 {