You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this is rather unproblematic for x86 C code, our Rust adaptation needs to know the alignment to avoid miscompilations. The obvious choice is to use 32-bit alignment and ignore the UEFI-specification. However, I wonder whether it is possible to get this mismatch fixed somehow? Is there a way to amend the specification to drop this requirement? I assume we cannot fix EDK2, since it would lead to alignment-mismatches when run against firmware compiled with 32-bit aligned GUIDs.
I also wonder what other implementations do, but have not investigated, yet.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi
There is currently a mismatch between the UEFI specification and EDK2 regarding alignment of
EFI_GUID
. The spec states aboutEFI_GUID
:However, EDK2 has no such alignment annotation and uses the native structure alignment (which in this case usually ends up as 32-bit aligned) (https://github.com/tianocore/edk2/blob/master/BaseTools/Source/C/Include/Common/UefiBaseTypes.h#L18)
While this is rather unproblematic for x86 C code, our Rust adaptation needs to know the alignment to avoid miscompilations. The obvious choice is to use 32-bit alignment and ignore the UEFI-specification. However, I wonder whether it is possible to get this mismatch fixed somehow? Is there a way to amend the specification to drop this requirement? I assume we cannot fix EDK2, since it would lead to alignment-mismatches when run against firmware compiled with 32-bit aligned GUIDs.
I also wonder what other implementations do, but have not investigated, yet.
Thanks
David
Beta Was this translation helpful? Give feedback.
All reactions