[PATCH v5 01/11] efi: define struct efi_guid

Ilias Apalodimas ilias.apalodimas at linaro.org
Wed Jul 24 11:29:52 CEST 2024


On Fri, 19 Jul 2024 at 15:43, Caleb Connolly <caleb.connolly at linaro.org> wrote:
>
> This let's us forward declare efi_guid_t in the UUID code without
> pulling in efi.h
>
> Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
> ---
>  include/efi.h      | 2 +-
>  tools/eficapsule.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/efi.h b/include/efi.h
> index c3c4b93f860a..b92c961a2afd 100644
> --- a/include/efi.h
> +++ b/include/efi.h
> @@ -73,9 +73,9 @@ struct efi_device_path {
>   * EDK2 reference implementation both define EFI_GUID as
>   * struct { u32 a; u16; b; u16 c; u8 d[8]; }; which is 4-byte
>   * aligned.
>   */
> -typedef struct {
> +typedef struct efi_guid {
>         u8 b[16];
>  } efi_guid_t __attribute__((aligned(4)));
>
>  #define EFI_BITS_PER_LONG      (sizeof(long) * 8)
> diff --git a/tools/eficapsule.h b/tools/eficapsule.h
> index 6efd07d2eb6b..97d077536d5b 100644
> --- a/tools/eficapsule.h
> +++ b/tools/eficapsule.h
> @@ -23,9 +23,9 @@
>  #endif
>
>  #define ARRAY_SIZE(x)          (sizeof(x) / sizeof((x)[0]))
>
> -typedef struct {
> +typedef struct efi_guid {
>         uint8_t b[16];
>  } efi_guid_t __aligned(8);
>
>  #define EFI_GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \
>
> --
> 2.45.2
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>


More information about the U-Boot mailing list