Masahisa Kojima
1dd705cf99
efi: use 32-bit alignment for efi_guid_t
...
Current U-Boot implements 64-bit boundary for efi_guid_t structure.
It follows the UEFI specification, page 21 of the UEFI Specification v2.10
says about EFI_GUID:
128-bit buffer containing a unique identifier value. Unless
otherwise specified, aligned on a 64-bit boundary.
On the other hand, page 163 of the UEFI specification v2.10 and
EDK2 reference implementation both define EFI_GUID as
struct { u32 a; u16; b; u16 c; u8 d[8]; }; and so the implied
alignment is 32-bit not 64-bit like U-Boot efi_guid_t.
Due to this alignment difference, EDK2 application "CapsuleApp.efi -P"
does not work as expected.
This calls EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo()
and dump the EFI_FIRMWARE_IMAGE_DESCRIPTOR structure,
offsetof(EFI_FIRMWARE_IMAGE_DESCRIPTOR, ImageTypeId) is different,
8 in U-Boot and 4 in EDK2(CapsuleApp.efi).
Here is the wrong EFI_GUID dump.
wrong dump : ImageTypeId - 00000000-7D83-058B-D550-474CA19560D8
expected : ImageTypeId - 058B7D83-50D5-4C47-A195-60D86AD341C4
EFI_FIRMWARE_IMAGE_DESCRIPTOR structure is defined in UEFI specification:
typedef struct {
UINT8 ImageIndex;
EFI_GUID ImageTypeId;
UINT64 ImageId
<snip>
} EFI_FIRMWARE_IMAGE_DESCRIPTOR;
There was the relevant patch for linux kernel to use 32-bit alignment
for efi_guid_t [1].
U-Boot should get aligned to EDK2 reference implementation and
linux kernel.
Due to this alignment change, efi_hii_ref structure in include/efi_api.h
is affected, but it is not used in the current U-Boot code.
[1] https://lore.kernel.org/all/20190202094119.13230-5-ard.biesheuvel@linaro.org/
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-02-10 13:05:39 +01:00
..
2022-02-11 11:29:23 -05:00
2023-01-12 14:06:16 -05:00
2022-07-18 09:37:50 +01:00
2023-02-09 12:54:03 -05:00
2022-07-05 14:37:16 +02:00
2023-02-04 18:13:21 +01:00
2023-02-02 01:49:19 +01:00
2023-02-06 13:04:53 -05:00
2023-02-07 14:33:48 -05:00
2022-12-05 16:06:08 -05:00
2022-03-15 17:43:11 +08:00
2023-02-07 14:33:49 -05:00
2022-12-05 16:06:08 -05:00
2022-11-28 13:06:39 -05:00
2023-02-07 14:33:49 -05:00
2022-10-30 20:07:16 +01:00
2022-09-29 16:07:57 -04:00
2023-02-06 17:10:15 -05:00
2022-07-21 10:14:04 +02:00
2023-02-07 14:33:50 -05:00
2022-12-23 10:07:03 -05:00
2022-09-24 10:47:01 -04:00
2022-07-26 02:30:56 -06:00
2022-04-08 09:05:19 -04:00
2022-02-09 09:16:47 -05:00
2022-07-21 10:14:04 +02:00
2023-01-23 01:18:31 +00:00
2022-06-28 03:09:52 +01:00
2022-08-12 08:14:23 -04:00
2022-11-07 16:24:30 -07:00
2022-10-31 11:04:00 -04:00
2022-07-07 14:01:09 -04:00
2023-01-23 18:11:41 -05:00
2023-01-23 18:11:41 -05:00
2022-09-29 16:07:57 -04:00
2023-01-23 18:11:41 -05:00
2022-10-31 11:03:18 -04:00
2023-01-23 18:11:40 -05:00
2022-07-21 10:14:04 +02:00
2022-04-06 14:01:42 -04:00
2023-01-13 09:09:07 +01:00
2023-01-16 14:14:11 -05:00
2022-03-30 13:02:55 -04:00
2022-10-20 08:58:25 -04:00
2023-01-20 12:27:24 -05:00
2022-08-10 13:46:55 -04:00
2023-01-12 14:06:16 -05:00
2022-12-05 16:06:08 -05:00
2022-07-05 17:04:15 -04:00
2022-04-06 14:01:42 -04:00
2022-11-02 08:42:03 +01:00
2022-12-08 14:30:39 +01:00
2022-08-10 13:46:55 -04:00
2022-04-25 10:00:04 -04:00
2022-10-18 13:40:40 -04:00
2022-12-05 16:06:07 -05:00
2022-12-29 10:51:50 +01:00
2023-01-27 18:32:00 +01:00
2022-06-12 09:17:54 +02:00
2022-10-06 22:54:58 +02:00
2023-01-27 18:32:00 +01:00
2022-11-22 11:54:30 +01:00
2022-12-20 16:06:48 +01:00
2023-02-10 13:05:39 +01:00
2023-02-06 13:04:52 -05:00
2023-01-20 12:27:24 -05:00
2022-12-23 10:09:42 -05:00
2022-12-23 10:07:03 -05:00
2022-12-22 10:31:47 -05:00
2023-01-04 13:17:42 +01:00
2022-03-15 16:19:29 -04:00
2022-04-06 14:01:42 -04:00
2022-03-10 08:28:36 -05:00
2022-10-31 14:47:32 -04:00
2023-01-16 18:26:50 -05:00
2022-04-10 08:44:13 +03:00
2023-01-11 15:02:24 -05:00
2023-01-20 16:38:52 +01:00
2022-10-29 07:36:33 -06:00
2023-01-18 11:49:13 -07:00
2022-08-04 16:18:47 -04:00
2023-01-20 12:27:24 -05:00
2023-01-20 12:27:06 -05:00
2022-07-21 10:14:04 +02:00
2023-01-12 14:06:15 -05:00
2022-08-31 12:16:01 -04:00
2022-10-18 09:32:53 +08:00
2023-01-20 12:27:24 -05:00
2023-01-20 12:27:06 -05:00
2022-03-16 16:40:56 +09:00
2022-04-26 17:18:39 +05:30
2022-12-05 16:06:08 -05:00
2022-07-26 11:29:00 +02:00
2022-07-05 17:04:00 -04:00
2022-11-10 10:08:55 -05:00
2022-07-05 17:04:00 -04:00
2023-01-20 12:27:24 -05:00
2022-12-22 10:31:49 -05:00
2022-06-23 12:58:18 -04:00
2022-10-31 14:47:32 -04:00
2022-10-31 14:47:32 -04:00
2022-10-10 18:08:18 +02:00
2022-04-12 15:36:17 +02:00
2022-06-08 13:59:53 -04:00
2022-12-23 10:15:12 -05:00
2022-06-28 17:03:32 -04:00
2023-01-16 18:26:50 -05:00
2022-07-26 11:29:02 +02:00
2022-07-26 11:29:01 +02:00
2022-07-25 15:35:34 +02:00
2022-12-05 16:06:07 -05:00
2023-01-27 14:47:57 -05:00
2022-04-19 14:52:34 -04:00
2022-12-09 14:10:28 -05:00
2022-04-04 19:02:04 -04:00
2022-12-09 14:10:28 -05:00
2022-04-28 09:26:44 -04:00
2022-10-30 20:07:17 +01:00
2022-06-23 12:58:18 -04:00
2022-08-10 13:38:30 -04:00
2023-02-06 13:04:53 -05:00
2022-09-29 16:07:58 -04:00
2023-01-16 18:26:50 -05:00
2022-05-04 07:05:51 +02:00
2022-11-10 09:45:54 -05:00
2023-01-31 22:02:27 +09:00
2022-08-20 22:45:00 -04:00
2022-12-05 16:06:08 -05:00
2022-12-05 16:06:08 -05:00
2022-12-05 16:06:08 -05:00
2022-10-09 10:42:26 +02:00
2022-12-05 12:47:16 -05:00
2023-02-02 14:44:53 -05:00
2023-01-23 18:11:40 -05:00
2023-02-07 14:33:50 -05:00
2023-01-20 12:27:06 -05:00
2022-06-08 14:00:22 -04:00
2022-08-12 08:14:23 -04:00
2022-11-07 16:24:30 -07:00
2023-01-23 18:11:40 -05:00
2022-03-25 13:35:50 -04:00
2022-10-29 07:36:33 -06:00
2022-05-23 13:52:02 -04:00
2022-12-07 16:04:17 -05:00
2022-12-23 13:01:13 -05:00
2022-04-21 12:44:23 +02:00
2022-12-12 14:03:12 -05:00
2023-02-06 13:04:53 -05:00
2023-01-16 18:01:10 +08:00
2022-07-08 12:20:28 -04:00
2022-02-08 11:00:03 -05:00
2022-12-09 14:10:28 -05:00
2022-11-16 08:34:06 +01:00
2022-06-23 13:12:55 -04:00
2022-06-23 13:12:55 -04:00
2022-03-02 17:42:06 -05:00
2022-10-31 11:02:44 -04:00
2022-10-31 11:02:44 -04:00
2023-01-31 22:02:27 +09:00
2022-12-08 15:15:22 +08:00
2022-04-01 15:03:13 -04:00
2022-12-23 13:01:13 -05:00
2022-02-28 11:59:35 +05:30
2022-05-23 09:33:10 -04:00
2022-09-13 12:08:40 -04:00
2022-10-16 12:23:22 +02:00
2023-01-27 18:31:59 +01:00
2022-04-06 14:03:17 -04:00
2022-09-24 10:47:01 -04:00
2022-09-24 10:47:01 -04:00
2022-04-04 23:24:17 +01:00
2022-12-05 16:06:08 -05:00
2022-04-14 15:39:15 -04:00
2022-12-05 16:06:08 -05:00
2022-09-13 16:01:43 -04:00
2022-11-22 15:02:07 +01:00
2022-09-03 16:53:58 +03:00
2022-09-03 16:59:05 +03:00
2022-09-03 16:59:05 +03:00
2022-12-07 16:04:16 -05:00
2022-12-23 10:07:03 -05:00
2022-07-12 21:59:54 +02:00
2022-12-07 16:04:17 -05:00
2022-12-07 16:04:17 -05:00
2022-12-22 10:31:49 -05:00
2022-12-22 10:31:49 -05:00
2022-10-31 11:04:00 -04:00
2022-07-26 09:34:21 +02:00
2022-08-12 08:14:23 -04:00
2023-01-16 18:26:50 -05:00
2023-01-16 18:26:50 -05:00
2022-06-08 09:24:03 -04:00
2022-04-10 08:44:13 +03:00
2023-01-23 18:11:39 -05:00
2022-09-18 10:26:33 +02:00
2022-09-18 10:26:49 +02:00
2022-07-26 09:34:21 +02:00
2022-07-26 08:36:20 +02:00
2022-07-26 09:34:21 +02:00