Re: [PATCH] efi: libstub: Always pass screen_info via config table

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

 



Hi,

On 2023/3/13 06:58, Ard Biesheuvel wrote:
In some cases, we expose the kernel's struct screen_info to the EFI stub
directly, so it gets populated before even entering the kernel.  This
means the early console is available as soon as the early param parsing
happens, which is nice. It also means we need two different ways to pass
this information, as this trick only works if the EFI stub is baked into
the core kernel image, which is not always the case.

Huacai reports that the preparatory refactoring that was needed to
implement this alternative method for zboot resulted in a non-functional
efifb earlycon for other cases as well, due to the reordering of the
kernel image relocation with the population of the screen_info struct,
and the latter now takes place after copying the image to its new
location, which means we copy the old, uninitialized state.

To fix this and simplify things at the same time, let's just always use
the config table method.

Cc: loongarch@xxxxxxxxxxxxxxx
Cc: Xuefeng Li <lixuefeng@xxxxxxxxxxx>
Cc: Xuerui Wang <kernel@xxxxxxxxxx>
Cc: loongson-kernel@xxxxxxxxxxxxxxxxx
Reported-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
Link: https://lore.kernel.org/linux-efi/20230310021749.921041-1-chenhuacai@xxxxxxxxxxx/
Fixes: 42c8ea3dca094ab8 ("efi: libstub: Factor out EFI stub entrypoint into separate file")
Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
---
  arch/arm64/kernel/image-vars.h             |  1 -
  arch/loongarch/kernel/image-vars.h         |  1 -
  arch/riscv/kernel/image-vars.h             |  1 -
  drivers/firmware/efi/libstub/efi-stub.c    |  9 ---------
  drivers/firmware/efi/libstub/screen_info.c | 19 -------------------
  5 files changed, 31 deletions(-)


The cleanup looks good to me, thanks!

I'm currently unable to verify though, because my loongarch box currently has an RX 6400 plugged in which won't get initialized by the firmware (likely related to newer x86 emulation capability required by the card's VBIOS) so I can't see the efifb. I'll swap that card out maybe this week to test this (and the other "Reprobe after parsing config tables" patch) though!

--
WANG "xen0n" Xuerui

Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux