diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-03-12 23:00:03 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2023-03-13 23:28:43 +0100 |
commit | 8b3a149db461d3286d1e211112de3b44ccaeaf71 (patch) | |
tree | 69be97ff89eb46cba2d8685fec4164b8d2d5049b /drivers/firmware/efi/efi-init.c | |
parent | 3c66bb1918c262dd52fb4221a8d372619c5da70a (diff) | |
download | lwn-8b3a149db461d3286d1e211112de3b44ccaeaf71.tar.gz lwn-8b3a149db461d3286d1e211112de3b44ccaeaf71.zip |
efi: earlycon: Reprobe after parsing config tables
Commit 732ea9db9d8a ("efi: libstub: Move screen_info handling to common
code") reorganized the earlycon handling so that all architectures pass
the screen_info data via a EFI config table instead of populating struct
screen_info directly, as the latter is only possible when the EFI stub
is baked into the kernel (and not into the decompressor).
However, this means that struct screen_info may not have been populated
yet by the time the earlycon probe takes place, and this results in a
non-functional early console.
So let's probe again right after parsing the config tables and
populating struct screen_info. Note that this means that earlycon output
starts a bit later than before, and so it may fail to capture issues
that occur while doing the early EFI initialization.
Fixes: 732ea9db9d8a ("efi: libstub: Move screen_info handling to common code")
Reported-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/efi-init.c')
-rw-r--r-- | drivers/firmware/efi/efi-init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/efi/efi-init.c b/drivers/firmware/efi/efi-init.c index 2c16080e1f71..ef0820f1a924 100644 --- a/drivers/firmware/efi/efi-init.c +++ b/drivers/firmware/efi/efi-init.c @@ -72,6 +72,9 @@ static void __init init_screen_info(void) if (memblock_is_map_memory(screen_info.lfb_base)) memblock_mark_nomap(screen_info.lfb_base, screen_info.lfb_size); + + if (IS_ENABLED(CONFIG_EFI_EARLYCON)) + efi_earlycon_reprobe(); } } |