[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] types: Split aligned and packed guids
From: |
Daniel Kiper |
Subject: |
Re: [PATCH 3/4] types: Split aligned and packed guids |
Date: |
Tue, 7 Nov 2023 19:32:17 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Nov 06, 2023 at 10:59:08PM +0100, Vladimir 'phcoder' Serbinenko wrote:
> > These casts looks strange for me. Could not we change the functions
> > declarations in the grub_efi_runtime_services? If not I think this
> > change should be explained in the commit message.
>
> New commit message:
>
> 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.
LGTM though after more thinking I would add something similar
as a comment before the casts in the efiemu code.
Daniel