x86_64 EFI boot support: EFI frame buffer driver
PATCH 1/2 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.
--- drivers/video/Kconfig | 11 ++ drivers/video/Makefile | 1 drivers/video/efifb.c | 232 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/screen_info.h | 2 4 files changed, 246 insertions(+)
include/linux/screen_info.h +2 -0
@@ -63,6 +63,8 @@ struct screen_info {#define VIDEO_TYPE_PMAC 0x60/* PowerMacintosh frame buffer. */ +#define VIDEO_TYPE_EFI 0x70/* EFI graphic mode */ +#ifdef __KERNEL__extern struct screen_info screen_info;
drivers/video/Kconfig +11 -0
@@ -641,6 +641,17 @@ config FB_VESA You will get a boot time penguin logo at no additional cost. Please read <file:Documentation/fb/vesafb.txt>. 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
drivers/video/Makefile +1 -0
@@ -118,6 +118,7 @@ obj-$(CONFIG_FB_OMAP) += oma 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
drivers/video/efifb.c new file +232 -0
232 lines not on this page · raw message