Re: [PATCH V9 20/24] LoongArch: Add efistub booting support

From: Arnd Bergmann
Date: Fri May 06 2022 - 07:42:07 EST


On Fri, May 6, 2022 at 1:26 PM WANG Xuerui <kernel@xxxxxxxxxx> wrote:
> On 5/6/22 16:14, Ard Biesheuvel wrote:

> Or is there compatibility at all?
>
> It turns out that this port is already incompatible with shipped
> systems, in other ways, at least since the March revision or so.

I think we can treat user space compatibility separately from firmware
compatibility.

> So, in effect, this port is starting from scratch, and taking the chance
> to fix early mistakes and oversights all over; hence my opinion is,
> better do the Right Thing (tm) and give the generic codepath a chance.
>
> For the Loongson devs: at least, declare the struct boot_params flow
> deprecated from day one, then work to eliminate it from future products,
> if you really don't want to delay merging even further (it's already
> unlikely to land in 5.19, given the discussion happening in LKML [3]).
> It's not embarrassing to admit mistakes; we all make mistakes, and
> what's important is to learn from them so we don't collectively repeat
> ourselves.

Agreed. I think there can be limited compatibility support for old
firmware though, at least to help with the migration: As long as
the interface between grub and linux has a proper definition following
the normal UEFI standard, there can be both a modern grub
that is booted using the same protocol and a backwards-compatible
grub that can be booted from existing firmware and that is able
to boot the kernel.

The compatibility version of grub can be retired after the firmware
itself is able to speak the normal boot protocol.

Arnd