x86_64 EFI support -v3: EFI framebuffer driver
PATCH 4/5 x86_64 EFI support -v3: EFI framebuffer 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.
---
drivers/video/Kconfig | 11 ++ drivers/video/Makefile | 1 drivers/video/efifb.c | 242 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/screen_info.h | 1 4 files changed, 255 insertions(+)
include/linux/screen_info.h +1 -0
@@ -62,6 +62,7 @@#define VIDEO_TYPE_EGAC 0x21/* EGA in Color Mode */ #define VIDEO_TYPE_VGAC 0x22/* VGA+ in Color Mode */ #define VIDEO_TYPE_VLFB 0x23/* VESA VGA in graphic mode */ +#define VIDEO_TYPE_EFI 0x24/* EFI graphic mode */ #define VIDEO_TYPE_PICA_S3 0x30/* ACER PICA-61 local S3 video */ #define VIDEO_TYPE_MIPS_G364 0x31/* MIPS Magnum 4000 G364 video */
drivers/video/Kconfig +11 -0
@@ -605,6 +605,17 @@ 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_64 && EFI + 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 @@ # Platform or fallback drivers go here 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
drivers/video/efifb.c new file +242 -0
242 lines not on this page · raw message
Quoted 10 lines · Ying
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.
Quoted 2 lines
The ELILO bootloader takes care of passing the video information as appropriate for EFI firmware.
Am I correct in understanding that you are not using any of the efi runtime service infrastructure you have built up in other patches?
So far this looks like the only useful piece of the patchset. If this doesn't use the runtime services I don't see any point in having them.
Eric
Quoted 12 lines · Eric W. Biederman
Quoted 10 lines · Ying
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.
Quoted 5 lines
Quoted 2 lines
The ELILO bootloader takes care of passing the video information as appropriate for EFI firmware.
Am I correct in understanding that you are not using any of the efi runtime service infrastructure you have built up in other patches?
Yes. The EFI runtime service is not needed for this patch.
Best Regards,
Huang Ying
Quoted 9 lines · Ying
drivers/video/efifb.c new file +9
-0+ +#include <linux/delay.h> +#include <linux/errno.h> +#include <linux/fb.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/ioport.h> +#include <linux/mm.h> +#include <linux/module.h>
drivers/video/efifb.c line 26
Quoted 10 lines
drivers/video/efifb.c new file +10
-0+#include <linux/platform_device.h> +#include <linux/screen_info.h> +#include <linux/slab.h> +#include <linux/string.h> +#include <linux/dmi.h> +#include <linux/efi.h> +#include <linux/io.h> + +#include <video/vga.h> +
I don't see any problems with this driver, just a few minor nits.
Do you really need all the #include's?
I presume this driver only supports bpp 16 and above?
Tony
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
Quoted 24 lines · Antonino A. Daplas
Quoted 9 lines · Ying
drivers/video/efifb.c new file +9
-0+ +#include <linux/delay.h> +#include <linux/errno.h> +#include <linux/fb.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/ioport.h> +#include <linux/mm.h> +#include <linux/module.h> drivers/video/efifb.c line 26
Quoted 10 lines
drivers/video/efifb.c new file +10
-0+#include <linux/platform_device.h> +#include <linux/screen_info.h> +#include <linux/slab.h> +#include <linux/string.h> +#include <linux/dmi.h> +#include <linux/efi.h> +#include <linux/io.h> + +#include <video/vga.h> +I don't see any problems with this driver, just a few minor nits.
Quoted 1 line
Do you really need all the #include's?
There are some #include's that are not needed. I will remove them in the next version.
Quoted 1 line
I presume this driver only supports bpp 16 and above?
Yes. Only the true color visual is supported. I think only bpp 16 and above can support true color visual.
Best Regards,
Huang Ying