[PATCH 3/5] efi: Drop all uses of efi_call_XX wrappers

2023-05-09 Thread Ard Biesheuvel
Now that GCC can generate function calls using the correct calling convention for us, we can stop using the efi_call_XX () wrappers, and just dereference the function pointers directly. This avoids the untyped variadic wrapper routines, which means better type checking for the method calls. Signe

[PATCH 4/5] efi: Remove x86_64 call wrappers

2023-05-09 Thread Ard Biesheuvel
The call wrappers are no longer needed now that GCC can generate function calls using MS calling convention, so let's get rid of them. Signed-off-by: Ard Biesheuvel --- grub-core/Makefile.core.def | 1 - grub-core/kern/x86_64/efi/callwrap.S | 129 include/grub/efi

[PATCH 1/5] efi: Make EFI PXE protocol methods non-callable

2023-05-09 Thread Ard Biesheuvel
The grub_efi_pxe_t struct definition has placeholders for the various protocol method pointers, given that they are never called in the code, and the prototypes have been omitted, and therefore do not comply with the UEFI spec. So let's convert them into void* pointers, so they cannot be called in

[PATCH 5/5] efi: Use generic EFI loader for x86_64

2023-05-09 Thread Ard Biesheuvel
Switch the x86_64 build to the generic EFI loader, which exposes the initrd via the LoadFile2 protocol instead of the x86-specific setup header. This will launch the Linux kernel via its EFI stub, which performs its own initialization in the EFI boot services context before calling ExitBootServices

[PATCH 0/5] efi: Implement generic EFI boot for x86_64

2023-05-09 Thread Ard Biesheuvel
Switch the x86_64-efi build to the generic EFI loader, which enters the Linux kernel via the EFI stub and provides the initrd via the LoadFile2 protocol. This unifies x86_64 with other EFI architectures, and removes the dependency on the setup header and struct bootparams. Do some preparatory clea

[PATCH 2/5] efi: Add calling convention annotation to all prototypes

2023-05-09 Thread Ard Biesheuvel
UEFI mandates MS calling convention on x86_64, which was not supported on GCC when UEFI support was first introduced into GRUB. However, now we can use the ms_abi function type attribute to annotate functions and function pointers as adhering to the MS calling convention, and the compiler will gene

Re: [PATCH] INSTALL: Document that building grub-mkfont requires xfonts-unifont

2023-05-09 Thread Daniel Kiper
On Sat, Apr 29, 2023 at 12:08:03AM -0500, Glenn Washburn wrote: > Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper > --- > Daniel you asked for this a couple months ago and I just remembered to send > it. Great! :-) Thank you! Daniel ___ Gru

Re: [PATCH v2 1/3] dns: simplify error handling of recv_hook() function

2023-05-09 Thread Daniel Kiper
On Wed, May 03, 2023 at 12:21:29PM +0200, Renaud Métrich wrote: > Signed-off-by: Renaud Métrich For all the patches Reviewed-by: Daniel Kiper ... Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH] grub-install-common: Fix the key of the --core-compress option

2023-05-09 Thread Daniel Kiper
On Fri, May 05, 2023 at 02:04:28PM +0200, Ákos Nagy wrote: > Commit f23bc6510 ("Transform -C option to grub-mkstandalone to > --core-compress available in all grub-install flavours.") declared a new > long option for specifying the compression method to use for the core > image. > > However, the op

Re: [PATCH] ns8250: Fix incorrect usage of access_size

2023-05-09 Thread Daniel Kiper
On Tue, May 09, 2023 at 01:01:11PM +1000, Benjamin Herrenschmidt wrote: > access_size is part of a union, so doesn't technically exist for a > PIO port (ie, not MMIO), but we set it anyways. > > This doesn't cause a bug today because the other leg of the union > doesn't have anything overlapping wi

Re: [PATCH] lib/relocator: always enforce the requested alignment in malloc_in_range()

2023-05-09 Thread Daniel Kiper
On Mon, May 08, 2023 at 09:34:15AM +0200, Roger Pau Monné wrote: > On Fri, Apr 28, 2023 at 04:15:24PM +0200, Daniel Kiper wrote: > > On Thu, Apr 27, 2023 at 05:06:54PM +0200, Roger Pau Monne via Grub-devel > > wrote: > > > On failure to allocate from grub_relocator_firmware_alloc_region() in > > >