On Fri, 30 Jun 2023 at 03:35, Glenn Washburn <developm...@efficientek.com> wrote: > > On Thu, 29 Jun 2023 20:02:31 +0200 > Daniel Kiper <daniel.ki...@oracle.com> wrote: > > > ... because (surprisingly) it uses System V AMD64 ABI on x86-64 > > architecture... > > > > Fixes: 6a080b9cd (efi: Add calling convention annotation to all prototypes) > > > > Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> > > Acked-by: Ard Biesheuvel <a...@kernel.org> > > --- > > include/grub/efi/api.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h > > index 16161e1f0..f3c50ed5d 100644 > > --- a/include/grub/efi/api.h > > +++ b/include/grub/efi/api.h > > @@ -1777,7 +1777,7 @@ typedef struct grub_efi_block_io grub_efi_block_io_t; > > > > struct grub_efi_shim_lock_protocol > > { > > - grub_efi_status_t (__grub_efi_api *verify) (void *buffer, grub_uint32_t > > size); > > + grub_efi_status_t (*verify) (void *buffer, grub_uint32_t size); > > I would suggest adding a comment above this line, something like: > > The shim_lock_protcol uses System V AMD64 ABI on x86-64 as specified > in __insert specification reference here__, unlike most UEFI protocol > methods, which use the MSABI calling convention. > > I may have some details wrong in the above, so change as needed. Also, > I'm confused by your commit message. If this is only on x86-64, what > about the other EFI architectures? This change's contents suggest it > applies to all of them. Or is the shim lock protocol itself limited to > x86-64 architectures? >
Conceptually, it applies to all architectures. However, x86_64 is the only architecture where the EFI calling convention deviates from the Linux/SysV calling convention, which is what GRUB uses internally. For this reason, __grub_efi_api expands to an empty string on non-x86 architectures (on 32-bit x86, it expands to regparm(0) but this should be the default in any case) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel