[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] efi: stub out __grub_efi_api when GRUB_UTIL is defined
From: |
Ard Biesheuvel |
Subject: |
Re: [PATCH] efi: stub out __grub_efi_api when GRUB_UTIL is defined |
Date: |
Sun, 1 Dec 2024 13:57:50 +0100 |
On Sat, 30 Nov 2024 at 22:46, Mike Gilbert <floppym@gentoo.org> wrote:
>
> ms_abi is not a valid attribute on x32 (__x86_64__ && __ILP32__).
> This ABI should be unnecessary for utils anyway.
>
These utils are host tools, right? E.g., grub-install, update-grub,
etc running under the OS?
Why are those using headers that define EFI APIs?
> Bug: https://bugs.gentoo.org/927826
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
> include/grub/efi/api.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
> index b686e8afe..8b70be5e7 100644
> --- a/include/grub/efi/api.h
> +++ b/include/grub/efi/api.h
> @@ -590,6 +590,7 @@ typedef grub_efi_uintn_t grub_efi_status_t;
> * annotation. (This includes protocols implemented by GRUB that are
> installed
> * into the EFI protocol database.)
> */
> +#if !defined(GRUB_UTIL)
> #if defined(__i386__)
> #define __grub_efi_api __attribute__((regparm(0)))
> #elif defined(__x86_64__)
> @@ -597,6 +598,9 @@ typedef grub_efi_uintn_t grub_efi_status_t;
> #else
> #define __grub_efi_api
> #endif
> +#else /* defined(GRUB_UTIL) */
> +#define __grub_efi_api
> +#endif
>
> #define GRUB_EFI_ERROR_CODE(value) \
> ((((grub_efi_status_t) 1) << (sizeof (grub_efi_status_t) * 8 - 1)) |
> (value))
> --
> 2.47.1
>
- Re: [PATCH] efi: stub out __grub_efi_api when GRUB_UTIL is defined,
Ard Biesheuvel <=