]> git.ipfire.org Git - thirdparty/grub.git/commit
types: Split aligned and packed guids
authorVladimir Serbinenko <phcoder@gmail.com>
Sun, 13 Aug 2023 07:18:23 +0000 (09:18 +0200)
committerVladimir Serbinenko <phcoder@gmail.com>
Wed, 8 Nov 2023 04:04:24 +0000 (05:04 +0100)
commit7de6fe9635f1275268116a0c835cb207d2d0aa6f
tree96b9e90a6a43486f5ab05b3cebd544e10b5e92de
parent5fc985bfdda8b04c65e3768a55412f8208bb6504
types: Split aligned and packed guids

On ia64 alignment requirements are strict. When we pass a pointer to
UUID it needs to be at least 4-byte aligned or EFI will crash.
On the other hand in device path there is no padding for UUID, so we
need 2 types in one formor another. Make 4-byte aligned and unaligned types

The code is structured in a way to accept unaligned inputs
in most cases and supply 4-byte aligned outputs.

Efiemu case is a bit ugly because there inputs and outputs are
reversed and so we need careful casts to account for this
inversion.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/commands/efi/lsefi.c
grub-core/efiemu/runtime/efiemu.c
grub-core/kern/efi/efi.c
grub-core/kern/misc.c
grub-core/loader/i386/xnu.c
include/grub/efi/api.h
include/grub/efiemu/efiemu.h
include/grub/efiemu/runtime.h
include/grub/types.h