|
|
Subscribe / Log in / New account

Add generic framebuffer support to EFI earlycon driver

From:  Markuss Broks <markuss.broks-AT-gmail.com>
To:  linux-kernel-AT-vger.kernel.org
Subject:  [PATCH 0/2] Add generic framebuffer support to EFI earlycon driver
Date:  Thu, 28 Jul 2022 17:28:17 +0300
Message-ID:  <20220728142824.3836-1-markuss.broks@gmail.com>
Cc:  ~postmarketos/upstreaming-AT-lists.sr.ht, phone-devel-AT-vger.kernel.org, Markuss Broks <markuss.broks-AT-gmail.com>, Jonathan Corbet <corbet-AT-lwn.net>, Ard Biesheuvel <ardb-AT-kernel.org>, Greg Kroah-Hartman <gregkh-AT-linuxfoundation.org>, Jiri Slaby <jirislaby-AT-kernel.org>, Helge Deller <deller-AT-gmx.de>, "Paul E. McKenney" <paulmck-AT-kernel.org>, Borislav Petkov <bp-AT-suse.de>, Andrew Morton <akpm-AT-linux-foundation.org>, Kees Cook <keescook-AT-chromium.org>, Randy Dunlap <rdunlap-AT-infradead.org>, Damien Le Moal <damien.lemoal-AT-opensource.wdc.com>, Thomas Zimmermann <tzimmermann-AT-suse.de>, Javier Martinez Canillas <javierm-AT-redhat.com>, Michal Suchanek <msuchanek-AT-suse.de>, Andy Shevchenko <andriy.shevchenko-AT-linux.intel.com>, Arnd Bergmann <arnd-AT-arndb.de>, Wei Ming Chen <jj251510319013-AT-gmail.com>, Bartlomiej Zolnierkiewicz <b.zolnierkie-AT-samsung.com>, Tony Lindgren <tony-AT-atomide.com>, linux-doc-AT-vger.kernel.org, linux-efi-AT-vger.kernel.org, linux-serial-AT-vger.kernel.org, linux-fbdev-AT-vger.kernel.org, dri-devel-AT-lists.freedesktop.org
Archive-link:  Article

Make the EFI earlycon driver be suitable for any linear framebuffers.
This should be helpful for early porting of boards with no other means of
output, like smartphones/tablets. There seems to be an issue with early_ioremap
function on ARM32, but I am unable to find the exact cause. It appears the mappings
returned by it are somehow incorrect, thus the driver is disabled on ARM. EFI early
console was disabled on IA64 previously, so I kept it in EFI earlycon Kconfig.

This patch also changes behavior on EFI systems, by selecting the mapping type
based on if the framebuffer region intersects with system RAM. If it does, it's
common sense that it should be in RAM as a whole, and so the system RAM mapping is
used. It was tested to be working on my PC (Intel Z490 platform).

Markuss Broks (2):
  drivers: serial: earlycon: Pass device-tree node
  efi: earlycon: Add support for generic framebuffers and move to fbdev
    subsystem

 .../admin-guide/kernel-parameters.txt         |  12 +-
 MAINTAINERS                                   |   5 +
 drivers/firmware/efi/Kconfig                  |   6 +-
 drivers/firmware/efi/Makefile                 |   1 -
 drivers/firmware/efi/earlycon.c               | 246 --------------
 drivers/tty/serial/earlycon.c                 |   3 +
 drivers/video/fbdev/Kconfig                   |  11 +
 drivers/video/fbdev/Makefile                  |   1 +
 drivers/video/fbdev/earlycon.c                | 301 ++++++++++++++++++
 include/linux/serial_core.h                   |   1 +
 10 files changed, 331 insertions(+), 256 deletions(-)
 delete mode 100644 drivers/firmware/efi/earlycon.c
 create mode 100644 drivers/video/fbdev/earlycon.c

-- 
2.37.0



Copyright © 2022, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds