Le ven. 11 août 2023, 02:17, Pedro Miguel Justo <pm...@texair.net> a écrit :

> Hello!
>
> It seems as a recent change has caused a regression on Itanium (ia64),
> rendering the platform unbootable. GRUB will crash very early with:
>
>
> ```
> Welcome to GRUB!
>
> 7 0 0x00006B 0x000000000000001E unexpected trap
> 7 0 0x000066 0x000000000000001E trap taken, number in ext PE
> 7 0 0x00003C 0x0000000000005A00 trap taken, offset in ext PE
> ```
>
> I have bisected the issue and it resulted into the following change:
>
> ```
> 06edd40db76bb78457ac26156ed5f7b62381bbe8 is the first bad commit
> commit 06edd40db76bb78457ac26156ed5f7b62381bbe8
> Author: Oliver Steffen <ostef...@redhat.com>
> Date:   Fri May 26 13:35:43 2023 +0200
>
>     guid: Unify GUID types
>
>     There are 3 implementations of a GUID in GRUB. Replace them with
>     a common one, placed in types.h.
>
>     It uses the "packed" flavor of the GUID structs, the alignment
> attribute
>     is dropped, since it is not required.
>
>     Signed-off-by: Oliver Steffen <ostef...@redhat.com>
>     Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com>
> ```
>
> The issue is most likely related with an unaligned memory access exception
> resulting from may global GUID variables being changed from
> `grub_efi_guid_t` (which are decorated with `__attribute__ ((aligned(8)))`)
> to the new and unified `grub_guid_t` type (now decorated with
> `__attribute__ ((packed))`).
>
> Do you concur?
>
That makes perfect sense. Thank you for the analysis. When passing GUID to
EFI we need it to be aligned. I propose to partially revert the commit and
keep efi_guid either completely separate or to include common guid type as
the only structure in it.

>
> Pedro
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to