From: Huang, Ying Date: Thu, 29 Nov 2007 00:21:55 +0000 (-0800) Subject: x86_64 EFI boot support: EFI frame buffer driver X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7c83172b98e569d9aabf947d8b3b089dadb2ff46;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git x86_64 EFI boot support: EFI frame buffer driver This patch adds Graphics Output Protocol support to the kernel. UEFI2.0 spec deprecates Universal Graphics Adapter (UGA) protocol and only Graphics Output Protocol (GOP) is produced. Therefore, the boot loader needs to query the UEFI firmware with appropriate Output Protocol and pass the video information to the kernel. As a result of GOP protocol, an EFI framebuffer driver is needed for displaying console messages. The patch adds a EFI framebuffer driver. The EFI frame buffer driver in this patch is based on the Intel Mac framebuffer driver. The ELILO bootloader takes care of passing the video information as appropriate for EFI firmware. The framebuffer driver has been tested in i386 kernel and x86_64 kernel on EFI platform. Signed-off-by: Chandramouli Narayanan Signed-off-by: Huang Ying Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andi Kleen Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 7d86e9eae915..5b3dbcfcda48 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -641,6 +641,17 @@ config FB_VESA You will get a boot time penguin logo at no additional cost. Please read . If unsure, say Y. +config FB_EFI + bool "EFI-based Framebuffer Support" + depends on (FB = y) && X86 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the EFI frame buffer device driver. If the firmware on + your platform is UEFI2.0, select Y to add support for + Graphics Output Protocol for early console messages to appear. + config FB_IMAC bool "Intel-based Macintosh Framebuffer Support" depends on (FB = y) && X86 && EFI diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 59d6c45a910d..83e02b3429b6 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -118,6 +118,7 @@ obj-$(CONFIG_FB_OMAP) += omap/ obj-$(CONFIG_FB_UVESA) += uvesafb.o obj-$(CONFIG_FB_VESA) += vesafb.o obj-$(CONFIG_FB_IMAC) += imacfb.o +obj-$(CONFIG_FB_EFI) += efifb.o obj-$(CONFIG_FB_VGA16) += vga16fb.o obj-$(CONFIG_FB_OF) += offb.o obj-$(CONFIG_FB_BF54X_LQ043) += bf54x-lq043fb.o diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c new file mode 100644 index 000000000000..bd779ae44b1e --- /dev/null +++ b/drivers/video/efifb.c @@ -0,0 +1,232 @@ +/* + * Framebuffer driver for EFI/UEFI based system + * + * (c) 2006 Edgar Hucek + * Original efi driver written by Gerd Knorr + * + */ + +#include +#include +#include +#include +#include +#include + +#include