grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [v6 PATCH 2/3] RISC-V: Update image header


From: Leif Lindholm
Subject: Re: [v6 PATCH 2/3] RISC-V: Update image header
Date: Wed, 9 Nov 2022 11:21:05 +0000

On Tue, Nov 08, 2022 at 17:36:51 +0100, Ard Biesheuvel wrote:
> > I can agree that hdr_offset makes more sense but
> > Documentation/riscv/boot-image-header.rst names this member as res3.
> > So, I would rename hdr_offset to res3 too. Or fix
> > Documentation/riscv/boot-image-header.rst in the kernel. Or, least
> > preferred, explain in the commit message why you do not rename this
> > member and add to the comment that this member is named res3 in the
> > documentation.
> 
> Can we get rid of these header definitions entirely?
> 
> The only GRUB code that seems to care about the fields that are not
> defined in the PE/COFF spec is grub_cmd_file(), which currently parses
> the magic field, but given that we only support EFI boot anyway, that
> code should just parse the PE machine type instead.

Right, so your patch from August dropped that check in the loader
itself. I missed that one.

The drawback to that is that not all EFI executables are destined for
the Linux loader. So while trying to boot them using the linux loader
is definitely user error, that change removed a potentially useful
user-visible error message.

/
    Leif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]